MCP server exposing 9 anchor-x402 services as agent tools. Pay-per-call USDC via x402 on Base mainnet. Works with Claude Desktop / Claude Code / Cursor / any MCP client.
anchor-x402-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> MCP server exposing 14 anchor-x402 services as tools any Claude Desktop / Cursor / Codex / Continue agent can call. Pay-per-use USDC via x402 on Base mainnet — no API keys, no subscriptions.
Two transports — pick by who holds the wallet key
**This package (stdio)** needs a funded EVM private key in the local process (ANCHOR_WALLET_PRIVATE_KEY) and pays for each call on your behalf. Convenient, but you are handing a hot key to a process.
**Streamable HTTP** — POST https://api.anchor-x402.com/mcp — needs no install and no key handover. It exposes all **18** services (four more than this package: roll_random, investigate_wallet, ledger_summary, ledger_report), and you pay per call with a PAYMENT-SIGNATURE header, so your key never leaves your side.
Clients that speak remote MCP natively take the url form above. For one that only launches stdio processes, bridge it:
Protocol revisions supported: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 — both the stateless era and the initialize handshake era, on one endpoint. server/discover and tools/list are free; tools/call is paid.
Payment is the ordinary x402 dance, surfaced inside MCP rather than around it: an unpaid tools/call returns a **result** (not a JSON-RPC error) with isError: true and the challenge in structuredContent.accepts, plus the canonical payment-required header. Sign one of the options and retry the identical call with PAYMENT-SIGNATURE. The challenge comes back as a result on purpose — an agent can read it and pay, whereas a JSON-RPC error would be swallowed by the client before the model ever saw it.
Server card: /.well-known/mcp/server-card.json. A worked client, including the adapter that bridges a stock x402 fetch wrapper to the MCP result shape, is in examples/agent/mcp-paid-call.mjs.
The rest of this README covers the stdio package.
What an agent gets
Fourteen tools, $0.001–$0.05 per call.
**Commodity primitives** (9, $0.001–$0.02):
| Tool | Price | What it does |
|---|---|---|
| anchor_hash | $0.005 | Anchor any 32-byte hash to Base + Solana mainnet in parallel; returns both tx URLs |
| screen_wallet | $0.02 | Wallet risk pre-flight — OFAC sanctions + address-reputation (drainer/phishing/mixer) → allow/review/block |
| attest_decision | $0.010 | Attest a decision — sign it yourself or let the treasury sign — then dual-chain anchor; free re-verify at /v1/attest/verify |
| decode_tx | $0.001 | Structured decode of any mainnet tx (Base / Ethereum / Solana) |
| resolve_name | $0.001 | Cross-chain name resolution (ENS, Bonfida SNS) |
| token_price | $0.001 | USD spot price for any token by symbol or chain+contract |
| decode_calldata | $0.001 | 4byte selector + ABI param decode for raw EVM calldata |
| parse_datetime | $0.001 | Freeform datetime string → structured ISO 8601 |
| intel_wallet | $0.005 | Bundled wallet intelligence: balances + activity + identity + sanctions in one call |
**Universal LLM endpoints** (5, $0.01–$0.05) — added in v0.2:
| Tool | Price | What it does |
|---|---|---|
| roast | $0.05 | Witty 3-5 paragraph roast of any target — wallet, tweet, code, idea, anything |
| oracle | $0.05 | Yes/no oracle. Returns YES/NO/MAYBE + reason + dual-chain anchored (question \| answer \| timestamp) hash. Cryptographic receipt of when you asked. |
| tldr | $0.01 | Summarize a URL (fetches up to 500KB) or pasted text into 3-5 concise bullets |
| aura | $0.01 | Returns color, tier (S/A/B/C/D/F), score 0-9999, and a punchy 2-3 sentence aura read |
| grade | $0.01 | Academic letter grade (A+ to F) with red-pen marginalia and one-paragraph summary |
The investigator (/v1/investigate, $1.77 async) and the hosted chatbot at chat.anchor-x402.com are not included in the MCP — they're accessed directly via the HTTP API and the browser respectively.