io.github.x402node/x402-mcp

Official registry Other

Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.

What can you do with 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

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package x402node-mcp
Claude Code
claude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "x402-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "x402node-mcp@1.0.4"
            ],
            "env": {
                "X402_PRIVATE_KEY": "<your x402_private_key>"
            }
        }
    }
}

Environment variables

  • X402_PRIVATE_KEY required secret Base EOA private key (hex, 0x-prefixed) with USDC for signing x402 payments

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. x402-mcp
  2. Features
  3. Install (Claude Desktop)
  4. Cost Safety
  5. How it works
  6. Development
  7. Links
  8. License

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_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

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

License

MIT

Frequently asked questions

What is io.github.x402node/x402-mcp?

Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.

How do I install io.github.x402node/x402-mcp?

It runs on your machine. In Claude Code: claude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.x402node/x402-mcp need an API key?

Yes. It expects X402_PRIVATE_KEY, which you set in its configuration.

Is io.github.x402node/x402-mcp open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.x402node/x402-mcp?

It is published by x402node. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.