X402 MCP Server

x402 is an open protocol that enables machine-to-machine micropayments at the HTTP layer. When an AI agent requests a resource and receives HTTP 402 Payment Required, it automatically sends a USDC payment on-chain and retries - no checkout UI, no merchant integration, pure HTTP. Its 10 documented tools cover paywall, payment.

People connecting this server to Claude, Cursor, VS Code, or another MCP client. The project is written in JavaScript.

One of 127 MCP servers published from codespar/mcp-dev-latam. Stars and repository activity are shared across all of them. See all 127 →

VERIFIED ACTIVE

LAST COMMIT 2026-08-12 · VERIFIED 2026-08-25

MIT · JavaScript servers · how we verify → /methodology

01 · Install X402

before you install - you'll need

Set X402_API_KEY, X402_WALLET_ADDRESS before connecting.

Claude Code

claude mcp add codespar-mcp-dev-latam-packages-crypto-x -- npx -y @codespar/mcp-x402

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "codespar-mcp-dev-latam-packages-crypto-x": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-x402"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license MIT - declared in the repository

npm package @codespar/mcp-x402 - published under the repo owner's npm scope (@codespar)

registry namespace io.github.codespar is GitHub-verified and matches the repo owner

03 · What X402 can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

With this server connected, an agent can verify if a x402 payment was received and settled on-chain, create a x402 paywall configuration for an endpoint, get paywall configuration for a specific URL, and list all configured x402 paywalls.

Capability map

Tools grouped from the project's README - what X402 lets an agent do.

read & search

6 tools - e.g. Get paywall configuration for a specific URL; List all configured x402 paywalls; Get available USDC balance for x402 payments

get_paywall · list_paywalls · get_balance · list_payments · get_payment · get_supported_networks

Pay

1 tool - e.g. Pay for a 402-protected resource.

pay_request

Verify

1 tool - e.g. Verify if a x402 payment was received and settled on-chain

verify_payment

create & write

1 tool - e.g. Create a x402 paywall configuration for an endpoint.

create_paywall

delete

1 tool - e.g. Remove a x402 paywall from an endpoint

delete_paywall

04 · Who maintains X402

mcp-x402 is maintained by codespar. We track 127 MCP servers from codespar - 127 actively maintained, 269 combined GitHub stars, oldest repo from Mar 2026. Full record: all servers from codespar.

  1. mcp-asaas MCP server for Asaas - billing automation, Pix, boleto, credit card, subscriptions ★ 269
  2. mcp-omie MCP server for Omie - ERP, customers, products, orders, invoices, financials ★ 269
  3. mcp-sendgrid MCP server for SendGrid - global transactional + marketing email (Twilio-owned) ★ 269
  4. mcp-evolution-api MCP server for Evolution API - WhatsApp messaging, instances, contacts ★ 269
  5. mcp-stripe-acp Stripe ACP - AI agent checkout, payment delegation, products, invoices ★ 269
  6. mcp-mercado-bitcoin MCP server for Mercado Bitcoin - Brazilian crypto exchange, trading, orderbook, withdrawals ★ 269

05 · Facts

category
other - actively maintained as of 2026-08-25.
registry
io.github.codespar/mcp-x402 (active, first published 2026-04-12 · 3 versions)
packages
npm:@codespar/mcp-x402

06 · X402 FAQ

Is X402 still maintained?

Yes - as of 2026-08-25, its last commit was 2026-08-12. We re-verify nightly.

What can X402 do?

With this server connected, an agent can verify if a x402 payment was received and settled on-chain, create a x402 paywall configuration for an endpoint, get paywall configuration for a specific URL, and list all configured x402 paywalls.

How do I install X402?

Run `npx -y @codespar/mcp-x402`. The README documents 2 environment variables (X402_API_KEY, X402_WALLET_ADDRESS) to set first. Set X402_API_KEY, X402_WALLET_ADDRESS before connecting. You can also paste the ready-made client config above.

Does X402 run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to X402

More MCP servers to compare · Correios · Melhor Envio · Focus Nfe · Nfe Io · Nuvem Fiscal

More JavaScript MCP servers · Amazon · Shopee · Shopify · see all