{"_id":"@autopayprotocol/mcp","_rev":"3-0af7078cceaf698bf0445ee9781fd847","name":"@autopayprotocol/mcp","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@autopayprotocol/mcp","version":"0.1.0","license":"Apache-2.0","_id":"@autopayprotocol/mcp@0.1.0","maintainers":[{"name":"apeoverflow","email":"kieranmarcus@gmail.com"}],"homepage":"https://github.com/apeoverflow/Auto-Pay-Protocol#readme","bugs":{"url":"https://github.com/apeoverflow/Auto-Pay-Protocol/issues"},"bin":{"autopay-mcp":"dist/index.js"},"dist":{"shasum":"34d5ae02f3b6af2e78bb0d6b839cc89b59464152","tarball":"https://registry.npmjs.org/@autopayprotocol/mcp/-/mcp-0.1.0.tgz","fileCount":7,"integrity":"sha512-xkbfCjCZxBT3lPOuxzv00RyX5w7zOyFoMQPy96rG7leq5s3zgm2CLiInOa0vfUdowSM2aAj9QHice6T8FO5Q/A==","signatures":[{"sig":"MEUCIEGuEzspkUNcYchxPnIyUtF8+i0b+h+SnQVo/unVPXApAiEAzfhJcYXJphAJxc0XigP8X7N/Ot+yV2toGcf03P1tVzA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72056},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"55f56a92eb3dd134a4cadb03f226b5dc899a3843","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"apeoverflow","email":"kieranmarcus@gmail.com"},"repository":{"url":"git+https://github.com/apeoverflow/Auto-Pay-Protocol.git","type":"git","directory":"packages/mcp"},"_npmVersion":"11.4.2","description":"MCP server for AutoPay Protocol — lets AI agents manage crypto subscriptions via tool calls","directories":{},"_nodeVersion":"24.3.0","dependencies":{"zod":"^3.23.0","viem":"^2.21.0","@modelcontextprotocol/sdk":"^1.12.0","@autopayprotocol/agent-sdk":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.3.3","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.1.0_1772593332359_0.9815355795795553","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@autopayprotocol/mcp","version":"0.1.1","license":"Apache-2.0","_id":"@autopayprotocol/mcp@0.1.1","maintainers":[{"name":"apeoverflow","email":"kieranmarcus@gmail.com"}],"homepage":"https://github.com/apeoverflow/Auto-Pay-Protocol#readme","bugs":{"url":"https://github.com/apeoverflow/Auto-Pay-Protocol/issues"},"bin":{"autopay-mcp":"dist/index.js"},"dist":{"shasum":"38ef8ae39aa1d59e4568b577e22bc852de8289b3","tarball":"https://registry.npmjs.org/@autopayprotocol/mcp/-/mcp-0.1.1.tgz","fileCount":7,"integrity":"sha512-+hAb3GvgWaNvRITNwrTac3WCNalchOwOxkDN/RtZz/5Qy7N8B4MvSZCxf7yxjlNf154uOroswdvvg4W9G3hROQ==","signatures":[{"sig":"MEYCIQCqkRMnxkvBj2/6dxQCeW3Vu7i3banbW47qbpXri//wNwIhAIhOgI4nWEl+MK968jlpIeMfq4NYS0UWeVGFz4AkNmVs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72056},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"55f56a92eb3dd134a4cadb03f226b5dc899a3843","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"apeoverflow","email":"kieranmarcus@gmail.com"},"repository":{"url":"git+https://github.com/apeoverflow/Auto-Pay-Protocol.git","type":"git","directory":"packages/mcp"},"_npmVersion":"11.4.2","description":"MCP server for AutoPay Protocol — lets AI agents manage crypto subscriptions via tool calls","directories":{},"_nodeVersion":"24.3.0","dependencies":{"zod":"^3.23.0","viem":"^2.21.0","@modelcontextprotocol/sdk":"^1.12.0","@autopayprotocol/agent-sdk":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.3.3","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.1.1_1772595392555_0.6492334165797649","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@autopayprotocol/mcp","version":"0.1.2","description":"MCP server for AutoPay Protocol — lets AI agents manage crypto subscriptions via tool calls","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apeoverflow/Auto-Pay-Protocol.git","directory":"packages/mcp"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"autopay-mcp":"dist/index.js"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"engines":{"node":">=20"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:unit":"vitest run","test:integration":"vitest run src/__tests__/server.test.ts","test:watch":"vitest","typecheck":"tsc --noEmit"},"dependencies":{"@autopayprotocol/agent-sdk":"^0.1.0","@modelcontextprotocol/sdk":"^1.12.0","viem":"^2.21.0","zod":"^3.23.0"},"devDependencies":{"@types/node":"^20.11.0","tsup":"^8.0.1","typescript":"^5.3.3","vitest":"^4.0.18"},"_id":"@autopayprotocol/mcp@0.1.2","gitHead":"55f56a92eb3dd134a4cadb03f226b5dc899a3843","bugs":{"url":"https://github.com/apeoverflow/Auto-Pay-Protocol/issues"},"homepage":"https://github.com/apeoverflow/Auto-Pay-Protocol#readme","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-BGj8Cdo5FXafmwZv+jHunEej5xUz0uedGang/ihY8cycTqJrVs25SAY5fnhsXKLH/7KIHvwxFfyMbvaH2i4Jpw==","shasum":"b0c1c94165fdffcb8c5ccfd56f0159d92345b0fa","tarball":"https://registry.npmjs.org/@autopayprotocol/mcp/-/mcp-0.1.2.tgz","fileCount":8,"unpackedSize":76151,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDPeAkhIITc872aF1klg5WHk0DIAeK4iIX+oEil3LAU5AiEA84zps/29Bzlz3HuZgNiZy91ibC1Ertn+LKZfrLjBOnA="}]},"_npmUser":{"name":"apeoverflow","email":"kieranmarcus@gmail.com"},"directories":{},"maintainers":[{"name":"apeoverflow","email":"kieranmarcus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.1.2_1772678129135_0.12929627580344438"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T03:02:12.266Z","modified":"2026-03-05T02:35:29.483Z","0.1.0":"2026-03-04T03:02:12.510Z","0.1.1":"2026-03-04T03:36:32.701Z","0.1.2":"2026-03-05T02:35:29.333Z"},"bugs":{"url":"https://github.com/apeoverflow/Auto-Pay-Protocol/issues"},"license":"Apache-2.0","homepage":"https://github.com/apeoverflow/Auto-Pay-Protocol#readme","repository":{"type":"git","url":"git+https://github.com/apeoverflow/Auto-Pay-Protocol.git","directory":"packages/mcp"},"description":"MCP server for AutoPay Protocol — lets AI agents manage crypto subscriptions via tool calls","maintainers":[{"name":"apeoverflow","email":"kieranmarcus@gmail.com"}],"readme":"# @autopayprotocol/mcp\n\n[Model Context Protocol](https://modelcontextprotocol.io) server that gives AI agents (Claude, Cursor, Windsurf) the ability to manage USDC subscriptions on [AutoPay Protocol](https://autopayprotocol.com). Zero-code integration — just add to your MCP config.\n\n## Install\n\n```bash\nnpm install -g @autopayprotocol/mcp\n```\n\n## Setup\n\nAdd to your MCP configuration file:\n\n### Claude Code (`~/.claude/settings.json`)\n\n```json\n{\n  \"mcpServers\": {\n    \"autopay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@autopayprotocol/mcp\"],\n      \"env\": {\n        \"AUTOPAY_PRIVATE_KEY\": \"0x...\",\n        \"AUTOPAY_CHAIN\": \"base\"\n      }\n    }\n  }\n}\n```\n\n### Cursor (`.cursor/mcp.json`)\n\n```json\n{\n  \"mcpServers\": {\n    \"autopay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@autopayprotocol/mcp\"],\n      \"env\": {\n        \"AUTOPAY_PRIVATE_KEY\": \"0x...\",\n        \"AUTOPAY_CHAIN\": \"base\"\n      }\n    }\n  }\n}\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `AUTOPAY_PRIVATE_KEY` | Yes | Agent wallet private key (0x...) |\n| `AUTOPAY_CHAIN` | No | Chain to use: `base` (default), `flowEvm`, `baseSepolia` |\n| `AUTOPAY_RPC_URL` | No | Override the default public RPC URL |\n\nAliases: `AGENT_PRIVATE_KEY` (for `AUTOPAY_PRIVATE_KEY`), `CHAIN` (for `AUTOPAY_CHAIN`).\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `autopay_balance` | Check wallet USDC and gas token balance |\n| `autopay_subscribe` | Create an on-chain subscription (first payment immediate) |\n| `autopay_unsubscribe` | Cancel a subscription by revoking the policy |\n| `autopay_get_policy` | Read on-chain policy details (status, amount, cap, etc.) |\n| `autopay_fetch` | Fetch a URL with auto-subscription on HTTP 402 |\n| `autopay_approve_usdc` | Pre-approve USDC spending to PolicyManager |\n| `autopay_bridge_usdc` | Bridge USDC from another chain via LiFi |\n| `autopay_swap_native_to_usdc` | Swap native tokens (ETH, FLOW) to USDC |\n\n### Tool Details\n\n#### `autopay_subscribe`\n\n| Input | Type | Description |\n|-------|------|-------------|\n| `merchant` | `string` | Merchant EVM address |\n| `amount` | `number` | USDC per billing cycle |\n| `interval` | `string \\| number` | Preset (`monthly`, `weekly`, etc.) or seconds |\n| `spendingCap?` | `number` | Max total spend. Default: `amount * 30` |\n| `metadataUrl?` | `string` | Optional plan metadata URL |\n\n#### `autopay_fetch`\n\n| Input | Type | Description |\n|-------|------|-------------|\n| `url` | `string` | URL to fetch |\n| `method?` | `string` | HTTP method (GET, POST, etc.) |\n| `headers?` | `object` | Request headers |\n| `body?` | `string` | Request body |\n\nIf the server returns HTTP 402 with an AutoPay discovery body, the tool automatically subscribes and retries with authentication.\n\n#### `autopay_bridge_usdc`\n\n| Input | Type | Description |\n|-------|------|-------------|\n| `fromChainId` | `number` | Source chain ID |\n| `amount` | `number` | USDC amount to bridge |\n| `sourceRpcUrl` | `string` | RPC URL for the source chain |\n| `slippage?` | `number` | Slippage tolerance in %. Default: 0.5 |\n\nSupported source chains: Ethereum (1), Optimism (10), Polygon (137), Arbitrum (42161), Avalanche (43114), BSC (56), Base (8453), Flow EVM (747).\n\n## How It Works\n\n1. Agent starts the MCP server with a funded wallet\n2. When the agent encounters a paid API, it uses `autopay_fetch` or `autopay_subscribe`\n3. The server creates an on-chain subscription policy (first charge immediate)\n4. Subsequent requests reuse cached subscriptions automatically\n5. The agent can check status with `autopay_get_policy` and cancel with `autopay_unsubscribe`\n\n## Links\n\n- [Full Documentation](https://autopayprotocol.com/docs)\n- [Agent SDK](https://www.npmjs.com/package/@autopayprotocol/agent-sdk)\n- [Middleware](https://www.npmjs.com/package/@autopayprotocol/middleware)\n","readmeFilename":"README.md"}