@shoppercontextprotocol/local-mcp-server
v0.1.0
Published
Local MCP server for Shopper Context Protocol
Maintainers
Readme
SCP Local MCP Server
Local MCP server for Shopper Context Protocol (SCP).
Installation
npm install
npm run buildUsage
With Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"scp": {
"command": "node",
"args": ["/path/to/local_mcp/dist/index.js"]
}
}
}Direct Usage
npm startDevelopment
npm run dev # Watch mode
npm run build # Production build
npm test # Run testsConfiguration
Configuration file: ~/.scp/config.json
{
"dns_resolver": "1.1.1.1",
"dns_cache_ttl": 86400,
"poll_interval": 2,
"max_poll_attempts": 150,
"token_refresh_threshold": 300,
"request_timeout": 30000,
"demo_mode": true,
"demo_endpoint": "http://localhost:8787/v1"
}Demo Mode
By default, demo mode is enabled and all SCP requests will be directed to http://localhost:8787/v1. This is useful for local testing and demos without needing to set up DNS records or configure domain discovery.
To disable demo mode and use real DNS-based discovery:
- Edit
~/.scp/config.jsonand set"demo_mode": false - Or delete the config file - it will regenerate with demo mode enabled by default
Environment Variable Override
You can also override the endpoint for all requests using an environment variable:
SCP_TEST_ENDPOINT=http://localhost:8787/v1 node dist/index.jsThis takes precedence over both demo mode and DNS discovery.
Data Storage
- Tokens:
~/.scp/tokens.db(SQLite, encrypted) - Config:
~/.scp/config.json
MCP Tools
scp_authorize- Authorize access to a merchantscp_check_authorization- Check authorization statusscp_revoke_authorization- Revoke access to a merchantscp_discover- Discover SCP endpoint for a domain
MCP Resources
scp://{domain}/orders- Order historyscp://{domain}/loyalty- Loyalty statusscp://{domain}/offers- Active offersscp://{domain}/preferences- Customer preferencesscp://{domain}/intents- Shopping intents
