HTTP-native micropayments by Coinbase. USDC on Base and Solana. Machine-to-machine payments with HTTP 402.
$ npm install @codespar/mcp-x402Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"x402": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-x402"
],
"env": {
"X402_API_KEY": "<your_x402_api_key>"
}
}
}
}After restart, your agent can call any of the 10 tools below โ try pay_request first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
X402_API_KEYAPI key for x402
Each tool is independent โ your agent loads only what it needs to reduce context and response time.
pay_requestverify_paymentcreate_paywallget_paywalllist_paywallsdelete_paywallget_balancelist_paymentsMCP is a protocol โ any framework that speaks it can mount this server.