# 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`](https://www.npmjs.com/package/@cryptoapis-io/x402-buyer-sdk)** ([github](https://github.com/CryptoAPIs-io/cryptoapis-x402-buyer-sdk)) — 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`](https://www.npmjs.com/package/@cryptoapis-io/mcp-x402-pay)** ([github](https://github.com/CryptoAPIs-io/cryptoapis-mcp-x402-pay)) — 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](https://github.com/CryptoAPIs-io/cryptoapis-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`](https://www.npmjs.com/package/@cryptoapis-io/x402-merchant-sdk)** ([github](https://github.com/CryptoAPIs-io/cryptoapis-x402-merchant-sdk)) — 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`](https://github.com/CryptoAPIs-io/cryptoapis-x402-merchant-sdk/tree/master/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`](https://www.npmjs.com/package/@cryptoapis-io/offline-signer)** ([github](https://github.com/CryptoAPIs-io/cryptoapis-offline-signer)) — 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](https://x402.org) and the [v2 specification](https://github.com/coinbase/x402/blob/main/specs/x402-specification-v2.md). Crypto APIs implements both sides, across both the HTTP and [MCP](https://github.com/coinbase/x402/blob/main/specs/transports-v2/mcp.md) transports, so you can adopt it without running your own facilitator.

---

Documentation page: https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/x402/x402-sdks-tooling
