
Mcp X402
Give your agent access to Coinbase’s HTTP-native x402 micropayment protocol for USDC on Base and Solana while you prototype paid APIs.
Overview
io.github.codespar/mcp-x402 is a MCP server for the Build phase that connects agents to Coinbase’s x402 HTTP micropayment protocol using USDC on Base and Solana.
What is this MCP server?
- @codespar/mcp-x402 version 0.1.2 on npm with stdio MCP transport
- Targets Coinbase x402 — HTTP-native micropayments with USDC on Base and Solana
- Authenticated via secret X402_API_KEY environment variable
- Lives under codespar/mcp-dev-brasil packages/crypto/x402
- Bridges agent workflows to machine-readable pay-per-request API patterns
- npm package @codespar/mcp-x402 at version 0.1.2
- 1 required secret: X402_API_KEY
- Protocol scope: HTTP-native micropayments; USDC on Base and Solana per description
Community signal: 252 GitHub stars.
What problem does it solve?
Pay-per-request APIs using x402 are awkward to explain repeatedly to an agent without a dedicated MCP tool surface.
Who is it for?
Indie builders shipping metered APIs, AI tool access, or crypto-native SaaS with x402 payment headers.
Skip if: Merchants who only need Stripe invoices or teams with no USDC on Base or Solana payment strategy.
What do I get? / Deliverables
After configuring X402_API_KEY, your agent can help implement and debug x402 micropayment flows on supported chains.
- MCP-registered x402 tooling for agent-assisted payment middleware
- Clear secret-based auth pattern for x402 development environments
- Faster iteration on paywalled HTTP endpoints without manual protocol copy-paste
Recommended MCP Servers
Journey fit
x402 lands in Build because micropayment middleware and paywalled endpoints are implemented alongside backend routes, not at idea-stage discovery. Integrations fits an MCP wrapper around x402’s HTTP payment semantics and chain-specific USDC flows.
How it compares
x402 protocol MCP adapter, not a wallet app or smart-contract audit skill.
Common Questions / FAQ
Who is io.github.codespar/mcp-x402 for?
It is for developers integrating Coinbase-style x402 micropayments who want Claude Code or Cursor to assist with HTTP-native USDC payment flows.
When should I use io.github.codespar/mcp-x402?
Use it during Build when you add x402 paywalls, verify payment headers, or connect Base or Solana USDC settlement to your API.
How do I add io.github.codespar/mcp-x402 to my agent?
Install @codespar/mcp-x402, enable stdio transport, set X402_API_KEY, and register the server in your MCP-compatible coding agent.