{"_id":"@codespar/mcp-x402","_rev":"6-f10b221fcfa752c304e8675156b4a16e","name":"@codespar/mcp-x402","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@codespar/mcp-x402","version":"0.1.0","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"license":"MIT","_id":"@codespar/mcp-x402@0.1.0","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-x402":"dist/index.js"},"dist":{"shasum":"49f334574631d4ef59dd652edf000967cb0071a3","tarball":"https://registry.npmjs.org/@codespar/mcp-x402/-/mcp-x402-0.1.0.tgz","fileCount":5,"integrity":"sha512-lj08n4LJev6HV4Zn4NNeC0N6/MN3nTNBsgRDdbVLf1ge1PRb8xA18UiAMsSJlW8mt+cOILM2T2QcCYGEq1bTjQ==","signatures":[{"sig":"MEYCIQCIjzu3zKReXtAGiZNMdv2xcdSdbKJnG7xiL1xvnV8oSQIhANeI720lHhJ60208E78Zo9lcX03yZWvsZOaYtYqTFwqb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28148},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"407310ff60d4f2b1799152d53eb9338c1a913d1f","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-x402_0.1.0_1775611191097_0.4349853610502725","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codespar/mcp-x402","version":"0.1.1","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"license":"MIT","_id":"@codespar/mcp-x402@0.1.1","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-x402":"dist/index.js"},"dist":{"shasum":"1ae80fff55c021ded45c114e5b0d66cba8dd8cea","tarball":"https://registry.npmjs.org/@codespar/mcp-x402/-/mcp-x402-0.1.1.tgz","fileCount":4,"integrity":"sha512-nm49eBCYaB/cY5XSW8nb2a5TDfRS7XE+L01Li0+EAffJZReAoqAbpBceFIhlQFwyY5Vwb6Dy8Eq2EmgoPWmUrw==","signatures":[{"sig":"MEYCIQChhaLi4E63z4W8tZVw7CpEsb2WzGFcDsDuaB0MNXCnBgIhAOvS/8eWmgRt4FawsWwzVUbMF6lAkAf9Gnu5uSIGuiUh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18399},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"addd0a1b4db9cce64f3e2fe4a94eb122f9989442","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-x402_0.1.1_1775644754955_0.19135600288166632","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@codespar/mcp-x402","version":"0.1.2","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"license":"MIT","_id":"@codespar/mcp-x402@0.1.2","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-x402":"dist/index.js"},"dist":{"shasum":"356a97d1bc5db8b7565e3889a44531f4e4e2e012","tarball":"https://registry.npmjs.org/@codespar/mcp-x402/-/mcp-x402-0.1.2.tgz","fileCount":4,"integrity":"sha512-4PxWZliytbtHZ5xiuxY5uIDVGJmr6vtwKqfZBz0kA87ATI9L3DiDOmYNrZKq06iP5k+oQqHomsHJz9pUO/eL9w==","signatures":[{"sig":"MEUCIG/vpwcTwT/gyUa5ZCSTFHW9scyb2O4wD2h6Q2lmL16yAiEA2R+Qor9AYhKYZ0ymfVcrWMe7nk+UUSs9dNONNfr87sU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20986},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"8fd47fad095cdf96618460a39345eddfe2a4af21","mcpName":"io.github.codespar/mcp-x402","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-x402_0.1.2_1775953691544_0.23527283222683337","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@codespar/mcp-x402","version":"0.1.3","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"license":"MIT","_id":"@codespar/mcp-x402@0.1.3","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-x402":"dist/index.js"},"dist":{"shasum":"4a6d69cf5a7ff45725f8ad3f407e1d1657ad1785","tarball":"https://registry.npmjs.org/@codespar/mcp-x402/-/mcp-x402-0.1.3.tgz","fileCount":4,"integrity":"sha512-9kF/i1foFyatxvkoAWizlAS4AstEtILzc21HhITGK6weB9QYoh7eJIJII6Sg/bG4wthm0YsKoMWA0JbRjPfeOw==","signatures":[{"sig":"MEYCIQDnLheAEj92jZoEAKfzE7tqofzF7s2BGTj7GC1ObA3rhAIhAIEKed5lJK2GBq2Xs2adQBDrPGKISmweTAwCzIHKNcMP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21017},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"0ab801a863239f0cb986bbda65abbaee3c621b44","mcpName":"io.github.codespar/mcp-x402","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-x402_0.1.3_1777123035522_0.5771788245890292","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@codespar/mcp-x402","version":"0.1.4","description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","type":"module","main":"./dist/index.js","bin":{"mcp-x402":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.8.0"},"license":"MIT","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"mcpName":"io.github.codespar/mcp-x402","_id":"@codespar/mcp-x402@0.1.4","gitHead":"e8f2ad023876683538fe7b66a2fc88ab8d8ef92f","types":"./dist/index.d.ts","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-QiBSnxlzzn/q71KVtz4wb/fAo3axosslSqVRKHa7TDMLrYpy1jt3xLJM/rTRZuZAdVgkJAR2cqdZdjm02qrfLg==","shasum":"7799c7adf4a0048c99bb4f74df6be6580bd19f28","tarball":"https://registry.npmjs.org/@codespar/mcp-x402/-/mcp-x402-0.1.4.tgz","fileCount":4,"unpackedSize":21496,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICyJ+nFcyBR8QLOhJ0TOd5BVD6CNkx2DHizwWiAx8TWLAiBako/D5Cs1T6YuFIfGV5uETwb6g9OW4gCw35LL9NsisQ=="}]},"_npmUser":{"name":"codespar-npm","email":"fabiano@codespar.dev"},"directories":{},"maintainers":[{"name":"codespar-npm","email":"fabiano@codespar.dev"},{"name":"dangazineu","email":"daniel.gazineu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-x402_0.1.4_1782153555804_0.2856349980716819"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T01:19:50.997Z","modified":"2026-06-22T18:39:16.106Z","0.1.0":"2026-04-08T01:19:51.235Z","0.1.1":"2026-04-08T10:39:15.108Z","0.1.2":"2026-04-12T00:28:11.696Z","0.1.3":"2026-04-25T13:17:15.676Z","0.1.4":"2026-06-22T18:39:15.970Z"},"license":"MIT","keywords":["mcp","x402","coinbase","micropayments","usdc","http-402","machine-to-machine","agentic-payments","base","solana"],"description":"MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)","maintainers":[{"name":"codespar-npm","email":"fabiano@codespar.dev"},{"name":"dangazineu","email":"daniel.gazineu@gmail.com"}],"readme":"# @codespar/mcp-x402\n\n> MCP server for **x402** — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)\n\n[![npm](https://img.shields.io/npm/v/@codespar/mcp-x402)](https://www.npmjs.com/package/@codespar/mcp-x402)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## What is x402?\n\nx402 is an open protocol that enables **machine-to-machine micropayments at the HTTP layer**. When an AI agent requests a resource and receives HTTP `402 Payment Required`, it automatically sends a USDC payment on-chain and retries — no checkout UI, no merchant integration, pure HTTP.\n\nThis is the payment rail purpose-built for **agentic commerce**.\n\n## Quick Start\n\n### Claude Desktop\n\nAdd to `~/.config/claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"x402\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codespar/mcp-x402\"],\n      \"env\": {\n        \"X402_API_KEY\": \"your-key\",\n        \"X402_WALLET_ADDRESS\": \"your-wallet-address\"\n      }\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add x402 -- npx @codespar/mcp-x402\n```\n\n### Cursor / VS Code\n\nAdd to `.cursor/mcp.json` or `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"x402\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codespar/mcp-x402\"],\n      \"env\": {\n        \"X402_API_KEY\": \"your-key\",\n        \"X402_WALLET_ADDRESS\": \"your-wallet-address\"\n      }\n    }\n  }\n}\n```\n\n## Tools (10)\n\n| Tool | Purpose |\n|---|---|\n| `pay_request` | Pay for a 402-protected resource. |\n| `verify_payment` | Verify if a x402 payment was received and settled on-chain |\n| `create_paywall` | Create a x402 paywall configuration for an endpoint. |\n| `get_paywall` | Get paywall configuration for a specific URL |\n| `list_paywalls` | List all configured x402 paywalls |\n| `delete_paywall` | Remove a x402 paywall from an endpoint |\n| `get_balance` | Get available USDC balance for x402 payments |\n| `list_payments` | List x402 payment history with optional filters |\n| `get_payment` | Get details of a specific x402 payment |\n| `get_supported_networks` | List supported blockchain networks, tokens, and facilitators for x402 payments |\n\n## Authentication\n\nx402 uses a Bearer API key from a registered facilitator.\n\n### Get your credentials\n\n1. Visit the [x402 documentation](https://github.com/coinbase/x402)\n2. Set up a facilitator or use Coinbase's hosted facilitator\n3. Generate an API key\n4. Get your wallet address (Base or Solana)\n5. Set the environment variables\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `X402_API_KEY` | Yes | API key for x402 facilitator |\n| `X402_WALLET_ADDRESS` | Yes | Wallet address for sending/receiving payments |\n| `X402_NETWORK` | No | Blockchain network: `base` (default) or `solana` |\n\n## Use Cases\n\n- **Agent accessing premium APIs** — AI agent pays per-request for data feeds, LLM APIs, or premium content\n- **Micropayment monetization** — Protect your API endpoints with sub-cent paywalls\n- **Machine-to-machine commerce** — Agents autonomously purchasing compute, data, or services\n\n## Roadmap\n\n### v0.2 (planned)\n- `create_subscription` — Set up recurring micropayments for an endpoint\n- `estimate_cost` — Estimate cost before paying for a resource\n- `batch_pay` — Pay for multiple resources in a single transaction\n\n### v0.3 (planned)\n- Multi-token support (ETH, SOL beyond USDC)\n- Streaming payments for long-running agent tasks\n\nWant to contribute? [Open a PR](https://github.com/codespar/mcp-dev-latam) or [request a tool](https://github.com/codespar/mcp-dev-latam/issues).\n\n## Links\n\n- [x402 Protocol (Coinbase)](https://github.com/coinbase/x402)\n- [x402 Specification](https://www.x402.org)\n- [MCP Dev LATAM](https://github.com/codespar/mcp-dev-latam)\n- [Landing Page](https://codespar.dev/mcp)\n\n## Enterprise\n\nNeed governance, budget limits, and audit trails for agent payments? [CodeSpar Enterprise](https://codespar.dev/enterprise) adds policy engine, payment routing, and compliance templates on top of these MCP servers.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}