https://github.com/x402node/x402-mcp
MCP server bringing 100+ x402-paid APIs to AI agents. Auto-syncs from CDP Bazaar. Stablecoin micropayments via x402 protocol across multi-chain (Base, Solana, Polygon, BNB, EVM). Built for agentic commerce: developer utilities, validators, encoders, generators, M2M payments, autonomous workflows. Works with Claude, Cursor, and any MCP-aware client.
https://github.com/x402node/x402-mcp
agentic agentic-commerce ai-agent base-network claude cursor m2m-payment machine-to-machine mcp mcp-server micropayment model-context-protocol multi-chain pay-per-call polygon solana stablecoin usdc x402 x402-payment
Last synced: 14 days ago
JSON representation
MCP server bringing 100+ x402-paid APIs to AI agents. Auto-syncs from CDP Bazaar. Stablecoin micropayments via x402 protocol across multi-chain (Base, Solana, Polygon, BNB, EVM). Built for agentic commerce: developer utilities, validators, encoders, generators, M2M payments, autonomous workflows. Works with Claude, Cursor, and any MCP-aware client.
- Host: GitHub
- URL: https://github.com/x402node/x402-mcp
- Owner: x402node
- License: mit
- Created: 2026-05-24T22:18:23.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-27T03:12:34.000Z (about 2 months ago)
- Last Synced: 2026-05-27T03:13:13.134Z (about 2 months ago)
- Topics: agentic, agentic-commerce, ai-agent, base-network, claude, cursor, m2m-payment, machine-to-machine, mcp, mcp-server, micropayment, model-context-protocol, multi-chain, pay-per-call, polygon, solana, stablecoin, usdc, x402, x402-payment
- Language: JavaScript
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crypto-mcp-servers - x402 MCP - MCP server for discovering x402-paid APIs from CDP Bazaar and automatically handling USDC micropayments on Base through the `x402node-mcp` package; use a fresh burner wallet, set `MAX_PRICE_USD`, and treat `X402_PRIVATE_KEY` as a spend-capable secret. (Agent Wallets and On-chain Actions)
README
# x402-mcp
MCP server bringing 100+ x402-paid APIs to AI agents (Claude, Cursor, MCP-aware clients). Auto-discovers tools from CDP Bazaar; handles USDC micropayments on Base + Solana.
## Features
- Auto-discovers x402 endpoints from CDP Bazaar (no hard-coded list)
- Reads metadata directly from Bazaar (description, schema, pricing)
- Refreshes every 5 min — new endpoints appear without restart
- Handles HTTP 402 + USDC payment automatically
- Multi-chain: Base + Solana mainnet live (USDC on both); Polygon/BNB/EVM expandable
## Install (Claude Desktop)
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"x402-mcp": {
"command": "npx",
"args": ["-y", "x402node-mcp"],
"env": { "X402_PRIVATE_KEY": "0xYOUR_BASE_PRIVATE_KEY" }
}
}
}
```
Set `X402_PRIVATE_KEY` to a Base EOA private key (hex, 0x-prefixed) with USDC on Base mainnet (Solana payment via SPL USDC also supported). Restart Claude Desktop. The server auto-discovers ~117 tools on first run.
## Cost Safety
- Each tool call costs $0.0001-$0.10 USDC depending on endpoint
- Hard cap: `MAX_PRICE_USD` env var (default $0.10/call); calls above are blocked
- Use a fresh burner wallet, not your main wallet
## How it works
Agent calls tool -> HTTP 402 -> x402-fetch signs EIP-3009 -> CDP Facilitator settles on Base or Solana -> response returned. Buyer pays no gas.
## Development
```bash
git clone https://github.com/x402node/x402-mcp
cd x402-mcp
npm install
cp .env.example .env # edit X402_PRIVATE_KEY
node mcp-server.js
```
## Links
- x402 protocol: https://x402.org
- CDP Bazaar: https://docs.cdp.coinbase.com/x402/bazaar
- MCP: https://modelcontextprotocol.io
- npm: https://www.npmjs.com/package/x402node-mcp
- Glama: https://glama.ai/mcp/servers/x402node/x402-mcp
## License
MIT