{"id":50157480,"url":"https://github.com/hypeprinter007-stack/anchor-x402-mcp","last_synced_at":"2026-06-03T16:00:45.569Z","repository":{"id":356785254,"uuid":"1234043231","full_name":"hypeprinter007-stack/anchor-x402-mcp","owner":"hypeprinter007-stack","description":"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.","archived":false,"fork":false,"pushed_at":"2026-05-19T23:39:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T02:40:10.975Z","etag":null,"topics":["agent-payments","ai-agents","anthropic","base-mainnet","claude","cursor","mcp","mcp-server","micropayments","model-context-protocol","solana","typescript","usdc","x402","x402-protocol"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypeprinter007-stack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T17:15:47.000Z","updated_at":"2026-05-19T23:39:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hypeprinter007-stack/anchor-x402-mcp","commit_stats":null,"previous_names":["hypeprinter007-stack/anchor-x402-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hypeprinter007-stack/anchor-x402-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypeprinter007-stack%2Fanchor-x402-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypeprinter007-stack%2Fanchor-x402-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypeprinter007-stack%2Fanchor-x402-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypeprinter007-stack%2Fanchor-x402-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypeprinter007-stack","download_url":"https://codeload.github.com/hypeprinter007-stack/anchor-x402-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypeprinter007-stack%2Fanchor-x402-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33872298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-payments","ai-agents","anthropic","base-mainnet","claude","cursor","mcp","mcp-server","micropayments","model-context-protocol","solana","typescript","usdc","x402","x402-protocol"],"created_at":"2026-05-24T13:00:32.264Z","updated_at":"2026-06-03T16:00:45.562Z","avatar_url":"https://github.com/hypeprinter007-stack.png","language":"JavaScript","funding_links":[],"categories":["💰 Finance \u0026 Crypto","📦 Other"],"sub_categories":[],"readme":"# anchor-x402-mcp\n\n\u003e MCP server exposing 14 [anchor-x402](https://anchor-x402.com) 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.\n\n## What an agent gets\n\nFourteen tools, $0.001–$0.05 per call.\n\n**Commodity primitives** (9, $0.001–$0.010):\n\n| Tool | Price | What it does |\n|---|---|---|\n| `anchor_hash` | $0.005 | Anchor any 32-byte hash to Base + Solana mainnet in parallel; returns both tx URLs |\n| `screen_wallet` | $0.001 | OFAC SDN sanctions screening for any EVM or Solana wallet |\n| `attest_decision` | $0.010 | Verify a wallet signature over (input_hash, output_hash, decision); dual-chain anchor the result |\n| `decode_tx` | $0.001 | Structured decode of any mainnet tx (Base / Ethereum / Solana) |\n| `resolve_name` | $0.001 | Cross-chain name resolution (ENS, Bonfida SNS) |\n| `token_price` | $0.001 | USD spot price for any token by symbol or chain+contract |\n| `decode_calldata` | $0.001 | 4byte selector + ABI param decode for raw EVM calldata |\n| `parse_datetime` | $0.001 | Freeform datetime string → structured ISO 8601 |\n| `intel_wallet` | $0.005 | Bundled wallet intelligence: balances + activity + identity + sanctions in one call |\n\n**Universal LLM endpoints** (5, $0.01–$0.05) — added in v0.2:\n\n| Tool | Price | What it does |\n|---|---|---|\n| `roast` | $0.05 | Witty 3-5 paragraph roast of any target — wallet, tweet, code, idea, anything |\n| `oracle` | $0.05 | Yes/no oracle. Returns YES/NO/MAYBE + reason + dual-chain anchored `(question \\| answer \\| timestamp)` hash. Cryptographic receipt of when you asked. |\n| `tldr` | $0.01 | Summarize a URL (fetches up to 500KB) or pasted text into 3-5 concise bullets |\n| `aura` | $0.01 | Returns color, tier (S/A/B/C/D/F), score 0-9999, and a punchy 2-3 sentence aura read |\n| `grade` | $0.01 | Academic letter grade (A+ to F) with red-pen marginalia and one-paragraph summary |\n\nThe investigator (`/v1/investigate`, $1.77 async) and the hosted chatbot at [chat.anchor-x402.com](https://chat.anchor-x402.com) are not included in the MCP — they're accessed directly via the HTTP API and the browser respectively.\n\nThe MCP server pays for itself — your wallet gets debited automatically for each call. No prepay, no API key, no account.\n\n## Install\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"anchor-x402\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"anchor-x402-mcp\"],\n      \"env\": {\n        \"ANCHOR_WALLET_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. Ask: *\"Anchor the hash `7646dda1564bde0ef3f3971f4c002962df64246da4aa1d8c47247e7632494710` on mainnet\"* — it'll call `anchor_hash` and pay $0.005 USDC from your wallet.\n\n### Claude Code\n\nAdd to your project's `.mcp.json`:\n\n```json\n{\n  \"anchor-x402\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"anchor-x402-mcp\"],\n    \"env\": {\n      \"ANCHOR_WALLET_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"\n    }\n  }\n}\n```\n\n### Codex CLI (OpenAI)\n\nEdit `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.anchor-x402]\ncommand = \"npx\"\nargs = [\"-y\", \"anchor-x402-mcp\"]\n\n[mcp_servers.anchor-x402.env]\nANCHOR_WALLET_PRIVATE_KEY = \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"\n```\n\nRestart `codex`. Type `/mcp` to confirm anchor-x402 shows in the loaded servers list.\n\n### ChatGPT Desktop\n\nSettings → **Integrations** → **MCP servers** → **Add server**. Paste:\n\n```json\n{\n  \"command\": \"npx\",\n  \"args\": [\"-y\", \"anchor-x402-mcp\"],\n  \"env\": {\n    \"ANCHOR_WALLET_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"\n  }\n}\n```\n\nSave, restart, the 9 tools appear in any chat with tool-use enabled.\n\n### Cursor\n\nEdit `~/.cursor/mcp.json` (global) or `\u003cproject\u003e/.cursor/mcp.json` (project-scoped):\n\n```json\n{\n  \"mcpServers\": {\n    \"anchor-x402\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"anchor-x402-mcp\"],\n      \"env\": {\n        \"ANCHOR_WALLET_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"\n      }\n    }\n  }\n}\n```\n\n### OpenAI Agents SDK (programmatic)\n\n```python\nfrom openai_agents import Agent, MCPServerStdio\n\nmcp = MCPServerStdio(\n    command=\"npx\",\n    args=[\"-y\", \"anchor-x402-mcp\"],\n    env={\"ANCHOR_WALLET_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_PRIVATE_KEY\"},\n)\nagent = Agent(name=\"researcher\", model=\"gpt-4o\", mcp_servers=[mcp])\n```\n\nSame package, same env, programmatic instead of config-driven.\n\n### Continue / Smithery / generic MCP client\n\nSame shape — `command: npx`, `args: [-y, anchor-x402-mcp]`, env carries your wallet key. The MCP SDK handles transport.\n\nOr install via [Smithery](https://smithery.ai) one-liner:\n```\nnpx -y @smithery/cli install anchor-x402-mcp --client claude\n```\n(replace `--client claude` with `cursor`, `codex`, `windsurf`, etc.)\n\n### Run standalone\n\n```bash\nANCHOR_WALLET_PRIVATE_KEY=0xYOUR_KEY npx anchor-x402-mcp\n```\n\nSpeaks MCP over stdio. Pipe into any MCP-compatible client.\n\n## Funding your wallet\n\nThe 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:\n\n- USDC contract on Base: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`\n- Bridge from Ethereum mainnet via [bridge.base.org](https://bridge.base.org)\n- Buy directly on Coinbase and withdraw to Base\n\nThe MCP server signs payments via [x402](https://github.com/coinbase/x402) — Coinbase's open HTTP-native micropayments protocol. Each request:\n\n1. Hits an `anchor-x402` endpoint\n2. Gets a 402 with payment requirements\n3. Server signs a USDC transfer authorization with your private key\n4. Retries the request with the signed payment — the API settles via Coinbase's facilitator\n\nYou see the response, your wallet's USDC balance ticks down by the call price. Sub-second, no ledger, no account.\n\n## Environment variables\n\n| Variable | Required? | Purpose |\n|---|---|---|\n| `ANCHOR_WALLET_PRIVATE_KEY` | Yes for paid calls | EVM private key. The wallet pays for x402 calls. |\n| `ANCHOR_API_URL` | No | Override the API base URL. Default: `https://api.anchor-x402.com`. Useful for development against a self-hosted fork. |\n\nIf `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.\n\n## Security notes\n\n- 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.\n- Recommended: generate a fresh wallet specifically for agent use. Top up periodically; don't reuse a wallet that holds significant funds.\n- 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.\n- Source code is fully open at [github.com/hypeprinter007-stack/anchor-x402-mcp](https://github.com/hypeprinter007-stack/anchor-x402-mcp). Audit before installing.\n\n## Verifying anchor receipts\n\nEvery `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:\n\n- Base: `https://basescan.org/tx/\u003cbase.tx\u003e` — Input Data field contains the merkle root\n- Solana: `https://solscan.io/tx/\u003csolana.tx\u003e` — Memo program data contains the same hex\n\nThe on-chain bytes are the receipt; the API response is just a convenience wrapper around them. See [the on-chain verifiability primer](https://anchor-x402.com/trust/on-chain-verifiability) for the full verification recipe.\n\n## Troubleshooting\n\n**\"Payment required (402). Set ANCHOR_WALLET_PRIVATE_KEY...\"**\nYou haven't configured a wallet. Add the env var to your MCP config and restart Claude Desktop.\n\n**\"Payment failed (402). The wallet may be out of USDC...\"**\nYour wallet ran out. Send USDC on Base to the wallet address shown in the server's startup log (it logs `payer=0x…` to stderr).\n\n**\"anchor-x402 request failed: ...\"**\nNetwork or DNS issue. Check `https://api.anchor-x402.com/health` returns 200; if not, see the [status page](https://anchor-x402.betteruptime.com).\n\n## Links\n\n- **Live API:** https://api.anchor-x402.com\n- **Site / trust portal:** https://anchor-x402.com\n- **Status:** https://anchor-x402.betteruptime.com\n- **Server source:** https://github.com/hypeprinter007-stack/anchor-x402\n- **MCP server source (this repo):** https://github.com/hypeprinter007-stack/anchor-x402-mcp\n- **x402 protocol:** https://github.com/coinbase/x402\n- **MCP spec:** https://modelcontextprotocol.io\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypeprinter007-stack%2Fanchor-x402-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypeprinter007-stack%2Fanchor-x402-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypeprinter007-stack%2Fanchor-x402-mcp/lists"}