x402 MCP server
x402 MCP server: https://agentic402.dev/mcp serves all five agentic402 tools over the Model Context Protocol (Streamable HTTP, stateless). Free tools work in any MCP client. Paid tools cost the same as the HTTP API and need an MCP client that can pay with x402, such as one built with @x402/mcp.
Tools on the server
| Tool | Price | Does |
|---|---|---|
| fetch | $0.005 | URL to Markdown, or JSON with title and word count (reference) |
| inbox_create | $0.01 | New webhook inbox for 7 days (reference) |
| inbox_read | free | Read stored requests; after and wait (0–30 s) |
| memory_put | $0.005 | Store a text value. Creates a space if no token (reference) |
| memory_get | free | Read a value |
| memory_list | free | List keys, optionally by prefix |
| memory_delete | free | Delete a key |
| wake_schedule | $0.005 | POST to a URL at a set time (reference) |
| wake_status | free | scheduled, delivered or failed |
| wake_cancel | free | Cancel a job |
| attest | $0.005 | Signed statement for a SHA-256 hash (reference) |
| attest_verify | free | Check a statement and signature |
| attest_public_key | free | The Ed25519 public key |
Tokens (an inbox's read_token, a memory token, a wake cancel_token) go in tool arguments instead of headers. Over MCP, memory values are text.
Connecting from Claude Code
claude mcp add --transport http agentic402 https://agentic402.dev/mcp
That uses Claude Code's documented claude mcp add --transport http <name> <url> form. The free tools then work straight away. A plain MCP client can't sign payments, so a paid tool returns an error whose text is the payment offer (price, network, address) instead of a result.
Connecting from Cursor
Add the server to .cursor/mcp.json in a project, or ~/.cursor/mcp.json for every project:
{ "mcpServers": { "agentic402": { "url": "https://agentic402.dev/mcp" } } }
The same applies: free tools work, paid tools return the payment offer unless the client can pay.
Paying for tools over MCP
An x402-aware MCP client sees the payment offer, signs a USDC payment and calls the tool again with the payment in the call's _meta field under x402/payment. The @x402/mcp package provides such a client for JavaScript agents (createx402MCPClient, with the same ExactEvmScheme signer used for HTTP), including an onPaymentRequested hook where your code can approve or refuse each payment.
Input is checked before payment, and a tool that returns an error isn't settled. The payments page covers the rules, which are the same as for HTTP.
Server details
The server is stateless: each request gets a fresh MCP server instance, responses are JSON, and there are no sessions to keep alive. It shares the API's limit of 60 requests a minute per IP address. Results from fetch, inbox_read and memory_get are untrusted third-party text; the fetch description says so, and inbox_read, memory_get and fetch's JSON format include "content_is_untrusted": true.