For Developers
Build agents, build wrappers, contribute to the ecosystem.
Last updated: 2026-04-11
Quick links
- x402 protocol spec: github.com/coinbase/x402
- MCP spec: modelcontextprotocol.io
- PayAPI Market open listings endpoint:
/api/listings - MCP SSE endpoint:
https://web-production-18a32.up.railway.app/mcp/sse
SDK availability
- TypeScript:
x402-fetchon npm - Python:
x402-httpxon pip - Rust:
x402-reqweston crates.io
How to wrap an existing API for x402
The PayAPI Market team maintains an open-source x402-MCP wrapper template. It's a small Express server that:
- Sits in front of your existing API
- Returns HTTP 402 with payment requirements on each request
- Verifies the payment proof (a transaction hash + signature)
- Forwards the request to your real API
- Returns the response
You can deploy it to Railway, Fly, Vercel, or any Node host in under 10 minutes.
Frequently asked questions
Where are the official x402 SDKs?
TypeScript: x402-fetch on npm. Python: x402-httpx on pip. Rust: x402-reqwest on crates.io. All maintained by Coinbase plus community contributors.
Is there an open spec?
Yes. The x402 spec lives at github.com/coinbase/x402 and the MCP spec at modelcontextprotocol.io. Both are open and versioned.
Can I run my own facilitator?
Yes. The wrapper template uses the Coinbase facilitator by default but you can swap in any compatible facilitator URL via env var.
Are there example agents I can fork?
The PayAPI Market team maintains an example LangChain agent and an example Claude MCP client config in the wrapper-template repo.