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 who work with paywall and payment and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in TypeScript.
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-09-27 · VERIFIED 2026-09-30
MIT · TypeScript 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, 271 combined GitHub stars, oldest repo from Mar 2026. Full record: all servers from codespar.
- mcp-ucp Google UCP - agentic shopping, cart, checkout, orders, delivery ★ 271
- mcp-legiti DEPRECATED: no live endpoint (collection-prod.inspcdn.net does not resolve) ★ 271
- mcp-unico DEPRECATED: no live endpoint (api.unico.co does not resolve) ★ 271
- mcp-pomelo MCP server for Pomelo - pan-LATAM card issuing: users, virtual/physical cards, transactions ★ 271
- mcp-banco-do-brasil MCP server for Banco do Brasil - Pix, Cobrança (boleto), Conta-Corrente, Arrecadação (OAuth2 + mTLS) ★ 271
- mcp-iugu MCP server for iugu - invoices, subscriptions, customers, payment methods ★ 271
05 · Facts
- repository
- github.com/codespar/mcp-dev-latam
- category
- API integration - actively maintained as of 2026-09-30.
- registry
- io.github.codespar/mcp-x402 (active, first published 2026-04-12 · 4 versions)
- packages
- npm:@codespar/mcp-x402
06 · X402 FAQ
Is X402 still maintained?
Yes - as of 2026-09-30, its last commit was 2026-09-27. 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
Alternatives to X402
Maintained API integration servers if X402 isn't the fit.
- LetsFG - Flights & Hotels Search and book flights and hotels: hundreds of airlines, plus bookable hotel rates. ★ 2,075 · 2026-09-29
- Microsoft 365 MCP Server Interact with Microsoft 365 and Office services through the Microsoft Graph API. ★ 1,002 · 2026-09-29
- Idea Reality MCP Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt - returns 0-100 signal. ★ 823 · 2026-09-18
- Tapo MCP MCP server for discovering and controlling TP-Link Tapo smart home devices via AI Agents ★ 810 · 2026-09-29
- Sv Number MCP Server Phone numbers for AI agents: order a private number, read the SMS verification code, hand it back. ★ 551 · 2026-08-10
- Anytype MCP Official MCP server for Anytype API - your encrypted, local and collaborative wiki. ★ 528 · 2026-09-21