Jump to
Ctrl
+
/

x402 SDKs & Tooling

x402 SDKs & Tooling

Everything you need to pay for, or charge for, HTTP APIs and MCP tools in stablecoin over x402. All packages are non-custodial and open source.

Buyer side

  • @cryptoapis-io/x402-buyer-sdk (github) — the buyer capability as an npm SDK for apps and agent frameworks: register a wallet, authorize, sign locally, retry. Its /mcp export (createX402ToolCaller) pays x402-gated MCP tools, not just HTTP endpoints.
  • @cryptoapis-io/mcp-x402-pay (github) — an MCP server exposing an x402_pay tool: fetch a URL and, on a 402, pay it automatically and return the paid response. Also ships x402_discover for finding paid APIs. Works in any MCP-capable agent.
  • x402 agent plugin — a Claude Code plugin bundling the buyer tool and a merchant-integration skill. Install with /plugin marketplace add CryptoAPIs-io/cryptoapis-x402-agent-plugin.

Merchant side

  • @cryptoapis-io/x402-merchant-sdk (github) — zero-dependency middleware for Express / Hono / Next.js that adds a per-request paywall and runs the verify/settle round-trip.
  • Charging for an MCP tool — the same SDK's /mcp export wraps a tool handler so agents pay per call; your handler runs only after settlement, so an unpaid call never reaches your code. A complete runnable server is in examples/mcp-paid-tool.
  • Already run an MCP server you cannot modify? @cryptoapis-io/mcp-x402-accept is a self-hosted proxy that fronts an existing MCP server and paywalls chosen tools without changing its code. You run it yourself, so tool arguments and results never leave your machine.

Signing

  • @cryptoapis-io/offline-signer (github) — offline, local transaction and EIP-712 signing across EVM, UTXO, Tron, XRP, Kaspa and Solana. Pairs with the buyer flow so your key signs locally, never over the wire.

Protocol

x402 is an open standard — see x402.org and the v2 specification. Crypto APIs implements both sides, across both the HTTP and MCP transports, so you can adopt it without running your own facilitator.

Was this page helpful?
Yes
No
Powered by

On this page