CryptoAPIs x402 Pay MCP
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CryptoAPIs x402 Pay MCPFetch https://api.example.com/v1/alpha and pay if it returns 402."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@cryptoapis-io/mcp-x402-pay
This is the BUYER side of x402 — the tool an agent uses to spend (pay for a resource). Merchants who want to charge for an API use the middleware SDK (
@cryptoapis-io/x402-merchant-sdk), not an MCP tool.
An MCP server that lets an AI agent find and pay x402-gated HTTP endpoints.
x402_pay— fetches a URL and, if the server returns402 Payment Required, authorizes the payment via the CryptoAPIs buyer service, signs locally, retries, and returns the paid response.x402_discover— browses the facilitator's catalogue of x402 resources and their prices, so an agent can find a paid API instead of only calling one it was handed.
Non-custodial: the private key is passed per request and never leaves the process (no HTTP server — stdio only).
Supported today: EVM (eip712, e.g. Base USDC) and Solana. Tron, Bitcoin/UTXO, XRP and Kaspa are
upcoming — wired but not yet enabled; paying on them returns a clear family_not_yet_supported
("coming soon") result.
Run
node dist/cli.js # stdio MCP server (no --api-key at startup; keys are per-tool-call)Related MCP server: @1ly/mcp-server
Prerequisite — an agent walletId
x402_pay pays from a CryptoAPIs agent wallet (walletId). Create one ONCE per blockchain+network
before paying — a single POST to the buyer API returns the id (non-custodial: you register only your
PUBLIC address):
curl -X POST https://ai.cryptoapis.io/x402/buyer/wallets \
-H "x-api-key: $CRYPTOAPIS_API_KEY" -H "content-type: application/json" \
-d '{"blockchain":"base","network":"eip155:8453","address":"0xYourAddress"}'
# → { "walletId": "…" }network MUST be the CAIP-2 id (eip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, …), not a
bare name — and exactly one of address (any chain; required for Solana/Kaspa) or xpub
(xpub-capable chains). A malformed body returns a clear 400 malformed_request. Set the returned id as
X402_WALLET_ID (or pass walletId).
Tool: x402_pay
Input | Required | Description |
| ✓ | the (possibly paywalled) resource |
| ✓ | your CryptoAPIs key (X402_BUYER feature) — only used to call the buyer |
| ✓ | the wallet record id from |
| ✓ | the wallet's EVM key — signs locally, never sent anywhere |
| the request to make | |
| restrict which CAIP-2 networks to pay on | |
| safety cap — refuse if the required atomic-unit amount exceeds it | |
| restrict WHICH SITES may be paid, e.g. |
Returns { status, paid, body, settlement? }. On a 402 with no acceptable option (or over maxAmount),
paid:false with a reason — nothing is signed or paid.
Tool: x402_discover
Browse the x402 "Bazaar" — the registered x402 resources and what each charges (spec §8).
Input | Required | Description |
| filter by resource type, e.g. | |
| page size, 1–100 (default 20) | |
| rows to skip, for paging (default 0) | |
| override the facilitator (QA/local) |
Returns { resources: [{ resource, type, x402Version, accepts, lastUpdated, metadata? }], pagination }.
Public — no API key, no wallet, spends nothing, so it is always safe to call. Note accepts[].amount
is in atomic units (USDC 6-decimals: "10000" = $0.01) — convert before quoting a price to a user.
Pass a chosen resource to x402_pay to actually buy it.
Flow
fetch(url). Not 402 → return it.402 → pick an
acceptsentry (allowlist-aware), authorize via buyer/authorize→ the signing artifact.Sign locally (
@cryptoapis-io/mcp-signerevm_signtyped-data) → build the x402PaymentPayload(wire scheme is alwaysexact; the family is innetwork).Retry with the base64
X-PAYMENTheader; return the paid response + theX-PAYMENT-RESPONSEsettlement.
Security
The private key is a tool parameter and may be logged by MCP clients or stored in conversation
history — use only in trusted local environments. This mirrors @cryptoapis-io/mcp-signer.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI agents to discover and pay for x402-enabled services using natural language, with multi-chain support for Solana and EVM payments.Last updated231MIT

@1ly/mcp-serverofficial
Alicense-qualityDmaintenanceEnables AI agents to discover, pay for, and sell APIs using crypto on Solana and Base networks, with support for automated x402 payments.Last updated1213MIT- Alicense-qualityAmaintenanceA budget-bound x402 payment wallet for AI agents: it autonomously pays HTTP 402 payment-gated URLs across every major chain (EVM, Solana, and many non-EVM families). Self-custodial and backendless, your key, your RPC, with spend caps enforced before any on-chain send.Last updated7MIT

@arispay/payagent-mcpofficial
AlicenseDqualityFmaintenanceEnables AI agents to call paid APIs and settle HTTP 402 payment challenges with USDC on Base, without private keys ever being involved.Last updated2438MIT
Related MCP Connectors
Pay for HTTP APIs and charge for your own: x402 micropayments in USDC on Base.
Agent x402 Paywall MCP — Coinbase HTTP 402 protocol + on-chain settlement. Agents pay per-call
Pay-per-call x402 gateway: agent tools, OpenAI-compatible LLM, market data, RPC, security audits.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CryptoAPIs-io/cryptoapis-mcp-x402-pay'
If you have feedback or need assistance with the MCP directory API, please join our Discord server