← Back to docs

Add x402 to any MCP-compatible tool in 30 seconds

x402 lets agents pay per API call with stablecoins (USDC/USDm) using HTTP 402 micropayments, so you can access premium tools without API keys/accounts for each provider.

Fastest working command (tested)

node /Users/moltboyxd/x402engine-mcp/dist/index.js

Fallback package command: npx -y x402engine-mcp

Claude Code

1) Add

claude mcp add x402engine -- node /Users/moltboyxd/x402engine-mcp/dist/index.js

2) Verify

claude mcp get x402engine

Expected: Status: ✓ Connected

One-line: x402 adds paid, on-demand APIs to Claude Code with per-request micropayments.

Claude Desktop

1) Add

mkdir -p ~/Library/Application\ Support/Claude
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json <<'JSON'
{
  "mcpServers": {
    "x402engine": {
      "command": "node",
      "args": ["/Users/moltboyxd/x402engine-mcp/dist/index.js"]
    }
  }
}
JSON

2) Verify

Restart Claude Desktop and run discover_services.

One-line: x402 turns Claude Desktop into a pay-per-call MCP tool client.

OpenClaw

1) Add

claude mcp add x402engine -- node /Users/moltboyxd/x402engine-mcp/dist/index.js

2) Verify

claude mcp get x402engine

One-line: x402 gives OpenClaw workflows MCP access to paid external tools with per-call economics.

Other MCP-compatible tools (5)

Universal verification checklist

  1. Server shows connected/alive
  2. discover_services appears in tool list
  3. Calling discover_services returns x402 metadata JSON
  4. Optional: call a paid endpoint like get_crypto_price

Tested on this Mac mini: project at /Users/moltboyxd/x402engine-mcp, 20 tools detected, Claude Code connection verified.