Micropagos HTTP-native de Coinbase. USDC en Base y Solana. Pagos máquina-a-máquina con HTTP 402.
x402 le da a tu agente 10 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.
pay_request — Pay for a 402-protected resource. Sends USDC payment via x402 protocol and returns the resource content. The agent automatically handles the 402 handshake.verify_payment — Verify if a x402 payment was received and settled on-chaincreate_paywall — Create a x402 paywall configuration for an endpoint. When requests hit this endpoint, they receive HTTP 402 with payment instructions.// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("pay_request", { /* ... */ });$ npm install @codespar/mcp-x402Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).
{
"mcpServers": {
"x402": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-x402"
],
"env": {
"X402_API_KEY": "<your_x402_api_key>"
}
}
}
}Después de reiniciar, tu agente puede llamar cualquiera de las 10 herramientas de abajo — probá pay_request primero.
Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.
X402_API_KEYAPI key for x402
Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.
pay_requestverify_paymentcreate_paywallget_paywalllist_paywallsdelete_paywallget_balancelist_paymentsMCP es un protocolo — cualquier framework que lo hable puede montar este server.