X402 MCP logo

X402 MCP

by x402node

MCP server auto-discovers 100+ x402-paid APIs with USDC micropayment handling on Base and Solana mainnets.

Install X402 MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "x402node-x402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402node-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio x402node-x402-mcp -- npx -y x402node-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y x402node-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

This MCP server provides AI agents access to over 100 x402-paid APIs by auto-discovering tools from the Coinbase CDP Bazaar without a hard-coded list. It supports automatic handling of HTTP 402 payment requests using USDC on Base and Solana mainnets, with multi-chain expandability. The server refreshes its tool list every 5 minutes, enabling dynamic updates without restarts. It is suitable for AI clients needing programmatic access to paid APIs with integrated micropayment management.

Use cases

  • Integrate paid x402 APIs into AI agent workflows
  • Automate USDC micropayments for API calls on Base and Solana
  • Dynamically discover and update available API tools from CDP Bazaar
  • Control spending with configurable maximum payment per call

Key features

  • Auto-discovers x402 API endpoints and metadata from CDP Bazaar
  • Refreshes tool list every 5 minutes without restart
  • Handles HTTP 402 payment flow with USDC on Base and Solana
  • Supports multi-chain usage with Base and Solana mainnets
  • Configurable maximum price per API call to limit costs

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

26/27 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · x402node-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads283Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

From the project README

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:

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

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

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about X402 MCP

It auto-discovers x402 endpoints by reading metadata directly from the Coinbase CDP Bazaar every 5 minutes.

The server handles USDC micropayments on Base mainnet and Solana via SPL USDC tokens.

A MAX_PRICE_USD environment variable sets a hard cap on per-call spending; calls exceeding this are blocked.

You must provide a Base EOA private key with USDC funds via the X402_PRIVATE_KEY environment variable.

No, the payment facilitator settles on-chain transactions so the buyer pays no gas.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewX402 MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/x402node-x402-mcp?style=directory)](https://allmcps.com/mcp/x402node-x402-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/x402node-x402-mcp"><img src="https://allmcps.com/api/badge/x402node-x402-mcp?style=directory" alt="X402 MCP on AllMCPs" /></a>