io.github.x402node/x402-mcp
Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.
Que pouvez-vous faire avec io.github.x402node/x402-mcp ?
- 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
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
x402node-mcpclaude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4
{
"mcpServers": {
"x402-mcp": {
"command": "npx",
"args": [
"-y",
"x402node-mcp@1.0.4"
],
"env": {
"X402_PRIVATE_KEY": "<your x402_private_key>"
}
}
}
}
Variables d'environnement
X402_PRIVATE_KEYobligatoire secret Base EOA private key (hex, 0x-prefixed) with USDC for signing x402 payments
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
x402-mcp
MCP server bringing hundreds of 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:
{
"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_USDenv 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
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
Questions fréquentes
Qu'est-ce que io.github.x402node/x402-mcp ?
Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.
Comment installer io.github.x402node/x402-mcp ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.x402node/x402-mcp ?
Oui. Il attend X402_PRIVATE_KEY, à renseigner dans sa configuration.
io.github.x402node/x402-mcp est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient io.github.x402node/x402-mcp ?
Il est publié par x402node. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.