Back to Browse

X402 MCP Server

Developer ToolsUse Caution3.3MCP RegistryLocal
Free

Server data from the Official MCP Registry

Paid data APIs (weather, finance, geo, AI) via USDC x402 micropayments.

About

Paid data APIs (weather, finance, geo, AI) via USDC x402 micropayments.

Security Report

3.3
Use Caution3.3High Risk

The server signs and pays real USDC per call when X402_PRIVATE_KEY is set, with no spending cap and no check that the amount or payee demanded by a 402 response matches the catalog price. Tool definitions and target URLs come from a remote catalog that is fetched without integrity checks or a host allowlist, so the catalog operator controls where signed payments and user-supplied arguments are sent. The key is read from the environment and not logged, and the network access matches the server's purpose, but these payment and trust issues justify a score below 7.0. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.

3 files analyzed · 13 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

x402 private key (0x...) used to pay for API calls in USDC. If unset, the server runs in discovery mode and only lists endpoints/prices.Required

Environment variable: X402_PRIVATE_KEY

CAIP-2 network to pay on. One of eip155:8453 (Base), eip155:137 (Polygon), eip155:42161 (Arbitrum), eip155:480 (World Chain).Optional

Environment variable: X402_NETWORK

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "x402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@kopachelli/x402-mcp@0.1.1"
      ],
      "env": {
        "X402_NETWORK": "your-x402-network-here",
        "X402_PRIVATE_KEY": "your-x402-private-key-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

x402-mcp

Glama

mcprush

Glama

Also listed on FiatDock — the x402-native MCP marketplace — and MCP Server Hub.

MCP (Model Context Protocol) server exposing the Kopachelli x402 paid-API fleet as tools. Works with Claude Desktop, Cursor, Devin, and any stdio MCP client.

Tools

  • x402_catalog — list all products, prices, endpoints
  • x402_<product>_<method>_<path> — one tool per paid endpoint, generated live from https://x402-catalog.kopachelli.workers.dev/v1/catalog (5-min cache).

Tool args: path parameters are exposed as named arguments (e.g. lat, lon), other declared params fold into the query string automatically, plus query (object → extra URL params), body (object → JSON body), operationId, and restart for the durable operation ledger.

Payment modes

ModeEnvBehavior
Catalog(none)Calls return HTTP 402 payment_required details for out-of-band payment
Auto-payX402_PRIVATE_KEYSigns EIP-712 authorization per call, pays via facilitator, returns result + settlement tx

Testnet only by default (eip155:84532, worthless faucet USDC). For mainnet set X402_NETWORK=eip155:8453 — real USDC will be spent.

Client config (Claude Desktop / Cursor / Devin)

{
  "mcpServers": {
    "x402-fleet": {
      "command": "node",
      "args": ["F:/x402/x402-mcp/index.mjs"],
      "env": {
        "X402_PRIVATE_KEY": "0x...testnet-key..."
      }
    }
  }
}

Omit X402_PRIVATE_KEY for catalog-only mode.

Operation ledger (v0.2.0)

Every tool call that can spend USDC now goes through effect-ledger, a durable record of external action outcomes (SQLite at ~/.x402-mcp/ledger.db, override with X402_LEDGER_PATH).

  • Replay: repeating an identical call returns the recorded result instead of paying again.
  • Dedupe: concurrent duplicate calls collapse to a single execution.
  • Unknown ≠ failed: if the paid request's response is lost after payment may have settled, the tool reports ledger_status: "unknown" and tells you not to retry blindly. There is no provider status lookup for these endpoints, so unknown records stay unknown until you decide.
  • Fingerprint binding: reusing an operationId with different arguments is rejected.

Tool args added:

ArgPurpose
operationIdYour durable intent id (job id, run id). Omit to derive one from the arguments — identical arguments dedupe, which may not match your intent for repeat purchases.
restartExplicitly re-run a failed/unknown operation. Only for failed; for unknown use it only if you are certain no payment settled.

Pre-payment failures (network down, 402 with no key) are recorded as failed — safe to retry. Failures after the signed request was sent are unknown.

Requires Node >= 22.13 (node:sqlite).

Built with

This server and the fleet it fronts are built on Kopachelli's open-source reliability packages:

Reviews

No reviews yet

Be the first to review this server!