
Mcp X402
io.github.codesparPublished by GitHub account codesparv0.1.5Updated Oct 27, 2026
DEPRECATED: no live endpoint (api.x402.org does not resolve)
Overview
Deprecated local MCP server for the x402 HTTP micropayment protocol; its only endpoint no longer resolves, so its tools reach no service.
- What you can do
- Pay for 402-protected resources and verify on-chain settlement of x402 payments
- Create, read, list and delete x402 paywall configurations for endpoints
- Check USDC balance and browse or inspect payment history
- List supported networks, tokens and facilitators
- Note: the README states the package is deprecated and no tool reaches a service.
- When to use it
- Only as a reference or starting point if you already have a working x402 facilitator endpoint to point it at; not suitable for live agent payments as published.
- Requirements
- Runs locally via npx from the npm package @codespar/mcp-x402, typically configured in Claude Desktop, Claude Code, Cursor or VS Code. Needs a facilitator API key in X402_API_KEY and a wallet address in X402_WALLET_ADDRESS, plus optional X402_NETWORK (base or solana).
Installation
In SourceWeft
- Open Mcp X402 in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@codespar/mcp-x402
Deprecated: no live endpoint. Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1):
api.x402.org, the only host this server calls, does not resolve in DNS. x402 has no central API: it is an HTTP 402 protocol, and each seller picks the facilitator that verifies payment. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it withX402_BASE_URL. To bring the package back, open an issue in mcp-dev-latam with the provider's documented base URL.
MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)
What is x402?
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.
This is the payment rail purpose-built for agentic commerce.
Quick Start
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
Claude Code
Cursor / VS Code
Add to .cursor/mcp.json or .vscode/mcp.json:
Tools (10)
Authentication
x402 uses a Bearer API key from a registered facilitator.
Get your credentials
- Visit the x402 documentation
- Set up a facilitator or use Coinbase's hosted facilitator
- Generate an API key
- Get your wallet address (Base or Solana)
- Set the environment variables
Environment Variables
Use Cases
- Agent accessing premium APIs — AI agent pays per-request for data feeds, LLM APIs, or premium content
- Micropayment monetization — Protect your API endpoints with sub-cent paywalls
- Machine-to-machine commerce — Agents autonomously purchasing compute, data, or services
Roadmap
v0.2 (planned)
create_subscription— Set up recurring micropayments for an endpointestimate_cost— Estimate cost before paying for a resourcebatch_pay— Pay for multiple resources in a single transaction
v0.3 (planned)
- Multi-token support (ETH, SOL beyond USDC)
- Streaming payments for long-running agent tasks
Want to contribute? Open a PR or request a tool.
Links
Enterprise
Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.
License
MIT
Source: packages/crypto/x402/README.md at commit d0a519a
Tools
0Version history
2- v0.1.5LatestSep 27, 2026
- v0.1.4Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts