Command Palette

Search for a command to run...

UnylyUnyly
Browse all

X402

FreeNot checked

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 Ba

GitHubEmbed

About

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.

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:

{
  "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

Links

License

MIT

from github.com/x402node/x402-mcp

Install X402 in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install x402-mcp

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add x402-mcp -- npx -y x402node-mcp

FAQ

Is X402 MCP free?

Yes, X402 MCP is free — one-click install via Unyly at no cost.

Does X402 need an API key?

No, X402 runs without API keys or environment variables.

Is X402 hosted or self-hosted?

A hosted option is available: Unyly runs the server in the cloud, no local setup required.

How do I install X402 in Claude Desktop, Claude Code or Cursor?

Open X402 on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare X402 with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs