anchor-x402-mcp
Use anchor-x402-mcp to call paid anchor-x402 services via MCP, paying per call in USDC on Base (stdio needs a wallet key; remote HTTP exposes 18 tools).
Anchor 32-byte hashes or canonical JSON to Base + Solana and get transaction/explorer receipts (
anchor_hash).Screen wallets for OFAC sanctions/AML risk and get bundled wallet intelligence: balances, activity, identity, sanctions (
screen_wallet,intel_wallet).Attest signed agent/AI decisions with signature verification and dual-chain anchoring (
attest_decision).Decode mainnet transactions and raw EVM calldata (
decode_tx,decode_calldata).Resolve ENS/SNS names and fetch token USD spot prices (
resolve_name,token_price).Parse freeform datetime strings into structured ISO 8601/epoch/components (
parse_datetime).Generate LLM outputs: roasts, yes/no oracle verdicts with anchored receipts, URL/text summaries, aura reads, and academic-style grades (
roast,oracle,tldr,aura,grade).Use locally over stdio with
ANCHOR_WALLET_PRIVATE_KEY, or remotely athttps://api.anchor-x402.com/mcpwith x402PAYMENT-SIGNATUREand no key handover.
Enables automatic USDC micropayments via Coinbase's x402 protocol for pay-per-use access to the MCP server's tools.
Provides tools for transaction decoding, calldata decoding, and other blockchain operations on the Ethereum mainnet.
Provides tools for anchoring hashes, wallet screening, transaction decoding, and name resolution on the Solana mainnet.
anchor-x402-mcp
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.
{
"mcpServers": {
"anchor-x402": { "url": "https://api.anchor-x402.com/mcp" }
}
}Clients that speak remote MCP natively take the url form above. For one that only launches stdio processes, bridge it:
{
"mcpServers": {
"anchor-x402": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.anchor-x402.com/mcp"]
}
}
}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.
Related MCP server: x402-bazaar-mcp
What an agent gets
Fourteen tools, $0.001–$0.05 per call.
Commodity primitives (9, $0.001–$0.01):
Tool | Price | What it does |
| $0.005 | Anchor any 32-byte hash to Base + Solana mainnet in parallel; returns both tx URLs |
| $0.005 | Wallet risk pre-flight — OFAC sanctions + address-reputation (drainer/phishing/mixer) → allow/review/block |
| $0.010 | Attest a decision — sign it yourself or let the treasury sign — then dual-chain anchor; free re-verify at /v1/attest/verify |
| $0.001 | Structured decode of any mainnet tx (Base / Ethereum / Solana) |
| $0.001 | Cross-chain name resolution (ENS, Bonfida SNS) |
| $0.001 | USD spot price for any token by symbol or chain+contract |
| $0.001 | 4byte selector + ABI param decode for raw EVM calldata |
| $0.001 | Freeform datetime string → structured ISO 8601 |
| $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 |
| $0.05 | Witty 3-5 paragraph roast of any target — wallet, tweet, code, idea, anything |
| $0.05 | Yes/no oracle. Returns YES/NO/MAYBE + reason + dual-chain anchored |
| $0.01 | Summarize a URL (fetches up to 500KB) or pasted text into 3-5 concise bullets |
| $0.01 | Returns color, tier (S/A/B/C/D/F), score 0-9999, and a punchy 2-3 sentence aura read |
| $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.
The MCP server pays for itself — your wallet gets debited automatically for each call. No prepay, no API key, no account.
Install
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"anchor-x402": {
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}
}
}Restart Claude Desktop. Ask: "Anchor the hash 7646dda1564bde0ef3f3971f4c002962df64246da4aa1d8c47247e7632494710 on mainnet" — it'll call anchor_hash and pay $0.005 USDC from your wallet.
Claude Code
Add to your project's .mcp.json:
{
"anchor-x402": {
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}
}Codex CLI (OpenAI)
Edit ~/.codex/config.toml:
[mcp_servers.anchor-x402]
command = "npx"
args = ["-y", "anchor-x402-mcp"]
[mcp_servers.anchor-x402.env]
ANCHOR_WALLET_PRIVATE_KEY = "0xYOUR_BASE_WALLET_PRIVATE_KEY"Restart codex. Type /mcp to confirm anchor-x402 shows in the loaded servers list.
ChatGPT Desktop
Settings → Integrations → MCP servers → Add server. Paste:
{
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}Save, restart, the 14 tools appear in any chat with tool-use enabled.
Cursor
Edit ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (project-scoped):
{
"mcpServers": {
"anchor-x402": {
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}
}
}OpenAI Agents SDK (programmatic)
from openai_agents import Agent, MCPServerStdio
mcp = MCPServerStdio(
command="npx",
args=["-y", "anchor-x402-mcp"],
env={"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"},
)
agent = Agent(name="researcher", model="gpt-4o", mcp_servers=[mcp])Same package, same env, programmatic instead of config-driven.
Continue / Smithery / generic MCP client
Same shape — command: npx, args: [-y, anchor-x402-mcp], env carries your wallet key. The MCP SDK handles transport.
Or install via Smithery one-liner:
npx -y @smithery/cli install anchor-x402-mcp --client claude(replace --client claude with cursor, codex, windsurf, etc.)
Run standalone
ANCHOR_WALLET_PRIVATE_KEY=0xYOUR_KEY npx anchor-x402-mcpSpeaks MCP over stdio. Pipe into any MCP-compatible client.
Funding your wallet
The wallet you set as ANCHOR_WALLET_PRIVATE_KEY needs USDC on Base mainnet. Any amount works — even $1 buys 100 anchor calls or 1000 commodity-tier calls. Send USDC to your wallet's Base address:
USDC contract on Base:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Bridge from Ethereum mainnet via bridge.base.org
Buy directly on Coinbase and withdraw to Base
The MCP server signs payments via x402 — Coinbase's open HTTP-native micropayments protocol. Each request:
Hits an
anchor-x402endpointGets a 402 with payment requirements
Server signs a USDC transfer authorization with your private key
Retries the request with the signed payment — the API settles via Coinbase's facilitator
You see the response, your wallet's USDC balance ticks down by the call price. Sub-second, no ledger, no account.
Environment variables
Variable | Required? | Purpose |
| Yes for paid calls | EVM private key. The wallet pays for x402 calls. |
| No | Override the API base URL. Default: |
If ANCHOR_WALLET_PRIVATE_KEY is unset, paid tool calls return a friendly 402 message explaining how to set it. /health and /openapi.json (not exposed as tools, but reachable via direct curl) work without payment.
Security notes
The private key lives in your MCP client's config file. Treat it like a hot wallet — only fund what you're willing to spend autonomously.
Recommended: generate a fresh wallet specifically for agent use. Top up periodically; don't reuse a wallet that holds significant funds.
The MCP server only signs USDC payment authorizations to anchor-x402's known treasury addresses (visible in the 402 response). It cannot drain your wallet to arbitrary addresses.
Source code is fully open at github.com/hypeprinter007-stack/anchor-x402-mcp. Audit before installing.
Verifying anchor receipts
Every anchor_hash and attest_decision call returns Base + Solana tx URLs. These are independently verifiable on the public block explorers — agents can confirm an anchor exists without re-paying:
Base:
https://basescan.org/tx/<base.tx>— Input Data field contains the merkle rootSolana:
https://solscan.io/tx/<solana.tx>— Memo program data contains the same hex
The on-chain bytes are the receipt; the API response is just a convenience wrapper around them. See the on-chain verifiability primer for the full verification recipe.
Troubleshooting
"Payment required (402). Set ANCHOR_WALLET_PRIVATE_KEY..." You haven't configured a wallet. Add the env var to your MCP config and restart Claude Desktop.
"Payment failed (402). The wallet may be out of USDC..."
Your wallet ran out. Send USDC on Base to the wallet address shown in the server's startup log (it logs payer=0x… to stderr).
"anchor-x402 request failed: ..."
Network or DNS issue. Check https://api.anchor-x402.com/health returns 200; if not, see the status page.
Links
Live API: https://api.anchor-x402.com
MCP over HTTP: https://api.anchor-x402.com/mcp — all 18 tools, no key handover
MCP server card: https://anchor-x402.com/.well-known/mcp/server-card.json
Site / trust portal: https://anchor-x402.com
Server source: https://github.com/hypeprinter007-stack/anchor-x402
MCP server source (this repo): https://github.com/hypeprinter007-stack/anchor-x402-mcp
x402 protocol: https://github.com/coinbase/x402
MCP spec: https://modelcontextprotocol.io
License
MIT
Available Tools
14 toolsanchor_hashAInspect
Anchor a 32-byte hash to BOTH Base mainnet (as EIP-1559 calldata) and Solana mainnet (via the Memo program) in a single call. Returns both transaction hashes plus block-explorer URLs as cryptographic proof of when the hash existed. Pure infrastructure — no opinions about content. Use for DAO vote receipts, AI decision attestations, contract notarization, scientific data integrity, audit trails. $0.005 USDC.
Inputs: hash, data, note.
attest_decisionAInspect
Verify a wallet signature over (input_hash, output_hash, decision) with domain separation, then dual-chain anchor the resulting Merkle root on Base and Solana mainnet. Returns the verified signer plus on-chain proof URLs. Use when an AI agent's decision needs a cryptographic, auditable receipt — autonomous trade approvals, AI-assisted contract decisions, model-output attestation for liability records. $0.010 USDC.
Inputs: input_hash (required), output_hash (required), decision (required), scheme (required), +2 more.
auraAInspect
Aura read of any target — returns color (free-form e.g. 'molten gold with copper veins'), tier (S/A/B/C/D/F), score (0-9999), and a 2-3 sentence punchy description. Universal input — wallet, tweet, project, person, idea, meme. Use for viral / shareable content, brand vibes, social. $0.01 USDC.
Inputs: target (required).
decode_calldataAInspect
Decode raw EVM calldata into a human-readable function name, canonical signature, and typed parameter values. Resolves the 4-byte selector against openchain.xyz's signature directory, then ABI-decodes the args. Use for tx inspection before signing, mempool analysis, debug. EVM-only (chain='ethereum'); 'solana' returns 400. $0.001 USDC.
Inputs: chain (required), calldata_hex (required), contract_address.
decode_txAInspect
Structured decode of any mainnet transaction by hash. Supply chain ('base' | 'ethereum' | 'solana') and tx_hash. Returns from/to/value/gas/status/calldata for EVM, or slot/fee/signers/program_calls for Solana. Mined txs cached in-process. Use for tx inspection, audit, agent UX (rendering tx summaries to users). $0.001 USDC.
Inputs: chain (required), tx_hash (required).
gradeAInspect
Academic letter grade (A+ to F) with 3-7 red-pen marginalia one-liners and a one-paragraph teacher summary. Universal input — code, pitch deck, tweet, wallet, idea. Use for sharp feedback at low cost, prompt engineering eval, pre-investment screen. $0.01 USDC.
Inputs: target (required).
intel_walletAInspect
Unified wallet intelligence bundle. ONE call returns balances on Base + Ethereum + Solana, USDC across chains, transaction count, ENS/SNS reverse lookup, and sanctions verdict — all aggregated from 8–10 parallel free public sources. Replaces a wallet-investigation script with a single $0.005 call. Use for KYB pre-flight, counterparty research, fraud detection. $0.005 USDC.
Inputs: wallet (required).
oracleAInspect
Yes/no oracle with dual-chain anchored verdict. LLM answers YES / NO / MAYBE with one-sentence reason, then anchors sha256(question|answer|timestamp) to Base + Solana mainnet so anyone can prove the question was asked at a specific time. Use for prediction-market commits, conditional contracts, time-stamped opinions, settling bets. $0.05 USDC.
Inputs: question (required).
parse_datetimeAInspect
Parse any freeform datetime string ('tomorrow at noon', 'yesterday', '2026-05-13T15:30Z', 'in 2 hours') into a fully structured normalized form: ISO 8601, unix epoch, components (year/month/day/hour/min/sec/weekday), relative seconds + human form, confidence score. Saves agent LLM tokens on date parsing. $0.001 USDC.
Inputs: input (required), base_time, timezone.
resolve_nameAInspect
Cross-chain name resolution. Pass a name like 'vitalik.eth' or 'bonfida.sol' and get back the resolved address(es) across supported registries. Currently supports ENS (.eth) and Bonfida SNS (.sol). Cached 1h server-side. $0.001 USDC.
Inputs: name (required).
roastAInspect
Witty, observational roast of any target — a wallet address, tweet, code snippet, startup idea, person, meme, anything. Returns a 3-5 paragraph LLM roast and a one-sentence neutral summary of the target. Clever, not mean-spirited. Use for entertainment, demo content, social. $0.05 USDC.
Inputs: target (required).
screen_walletAInspect
Sanctions + AML screening for any EVM or Solana wallet address. Returns sanctions match (boolean), specific OFAC SDN programs flagged (Tornado Cash, Lazarus Group, Hydra Market, Garantex, Blender.io etc.), inferred chain, and a low/medium/high risk verdict. Use for AML pre-flight checks before any treasury transfer, KYC onboarding, vendor diligence, payroll wallet verification, marketplace counterparty checks. $0.001 USDC.
Inputs: wallet (required).
tldrAInspect
Summarize a URL or pasted text into 3-5 concise bullets. Fetches up to 500KB on the URL path, strips HTML with BeautifulSoup. Use for research distillation, link-rot insurance, agent reading lists. Exactly one of text or url. $0.01 USDC.
Inputs: text, url.
token_priceAInspect
USD spot price for any major token. Pass either symbol (BTC, ETH, SOL, USDC, etc.) OR (chain + contract). Returns USD price, 24h change percent, market cap, fetched-at timestamp. CoinGecko-backed, cached 60s. $0.001 USDC.
Inputs: symbol, chain, contract.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Multiple clusters have fuzzy boundaries: intel_wallet subsumes screen_wallet's sanctions verdict, roast/aura/grade all accept the same universal target inputs, and anchor_hash/attest_decision/oracle all produce dual-chain anchored proofs with only subtle workflow differences. Descriptions carry some disambiguating detail, but an agent could easily misselect between several pairs.
Seven tools follow a clean verb_noun snake_case pattern (anchor_hash, decode_tx, parse_datetime), but the set also mixes in noun_noun names (token_price, intel_wallet) and five bare single-word names (roast, oracle, tldr, aura, grade). The lack of a uniform convention makes the tool surface feel like two or three different servers bolted together.
14 tools is within a reasonable band and none are strictly redundant duplicates. However, the count is slightly inflated by unrelated mini-domains — anchoring infrastructure, wallet/chain data utilities, and LLM entertainment — which dilutes the server's focus.
For a server whose core promise is cryptographic proof, the anchor-and-prove lifecycle has an obvious gap: there is no verify_anchor or anchor-status tool to check that a previously anchored hash still exists on-chain, forcing agents to work around via decode_tx or explorer URLs. Individual utilities like resolve_name and token_price feel complete, but the wallet screening surface is awkwardly split between screen_wallet and intel_wallet.
Maintenance
Related MCP Connectors
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Pay-per-call MCP tools for agents: 20 free calls a day, then pay per call with x402 (USDC on Base mainnet) or a prepaid spend key. 30 tools — text/data utilities, x402/EVM-native tools (decode an x402 challenge, verify a settlement receipt on-chain, EIP-712 hashing, ABI encode/decode, Merkle-proof verify, keccak256, EIP-55 address checks) and independent providers' tools priced from $0.001. Signed delivery receipts. No sign-up.
Pay-per-use MCP tools for AI agents. USDC on Base via x402. No API keys.
Production-grade MCP gateway delivering 8 real-time AI tools with instant x402 micropayments settled in USDC on Base Mainnet or SPL-USDC on Solana. Features Basescan contract auditing, wallet analytics, headless browser scraping, and pre-scraped oracle data feeds.
Related MCP Servers
- AlicenseAqualityBmaintenanceEight crypto and DeFi data tools for AI agents: prices, gas, one ParaSwap route quote, GoPlus token security and top-holder samples, DefiLlama yields, Hyperliquid/dYdX funding, and observed wallet balances. Inspect prices free; pay 0.001–0.008 USDC per call on Base through x402. No API key or subscription.8107 npmMIT
- AlicenseBqualityBmaintenanceMCP server exposing x402 Bazaar's paid Base APIs (token risk/honeypot, prices, gas, wallet intel, tx decode + AI utilities) as agent tools. Your agent pays per call in USDC over x402 — no API keys, no signup.17166 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides AI agents with pay-per-call access to a suite of tools (honeypot check, token market, DeFi yields, etc.) via USDC on Base using the x402 protocol.11 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server exposing 10 curated tools for AI agents, providing crypto trading signals, on-chain analysis, and web utilities via pay-per-call x402 endpoints on the Base network.MIT