anchor-x402-mcp
anchor-x402-mcp
MCP-сервер, предоставляющий все 9 сервисов anchor-x402 в качестве инструментов, которые может вызвать любой агент Claude Desktop / Cursor / Codex / Continue. Оплата за использование в USDC через x402 в основной сети Base — без API-ключей и подписок.
Что получает агент
Девять инструментов, $0.001–$0.010 за вызов:
Инструмент | Цена | Что он делает |
| $0.005 | Параллельное закрепление любого 32-байтового хеша в основной сети Base + Solana; возвращает URL обеих транзакций |
| $0.001 | Проверка санкций OFAC SDN для любого кошелька EVM или Solana |
| $0.010 | Проверка подписи кошелька для (input_hash, output_hash, decision); двухцепочечное закрепление результата |
| $0.001 | Структурированное декодирование любой транзакции в основной сети (Base / Ethereum / Solana) |
| $0.001 | Межсетевое разрешение имен (ENS, Bonfida SNS) |
| $0.001 | Спотовая цена в USD для любого токена по символу или сети+контракту |
| $0.001 | 4-байтовый селектор + декодирование параметров ABI для необработанных данных calldata EVM |
| $0.001 | Произвольная строка даты/времени → структурированный формат ISO 8601 |
| $0.005 | Комплексная аналитика кошелька: балансы + активность + идентификация + санкции в одном вызове |
MCP-сервер окупает себя — с вашего кошелька автоматически списываются средства за каждый вызов. Никаких предоплат, API-ключей или аккаунтов.
Related MCP server: x402-bazaar-mcp
Установка
Claude Desktop
Добавьте в ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %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"
}
}
}
}Перезапустите Claude Desktop. Спросите: "Anchor the hash 7646dda1564bde0ef3f3971f4c002962df64246da4aa1d8c47247e7632494710 on mainnet" — он вызовет anchor_hash и спишет $0.005 USDC с вашего кошелька.
Claude Code
Добавьте в .mcp.json вашего проекта:
{
"anchor-x402": {
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}
}Codex CLI (OpenAI)
Отредактируйте ~/.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"Перезапустите codex. Введите /mcp, чтобы убедиться, что anchor-x402 отображается в списке загруженных серверов.
ChatGPT Desktop
Настройки → Интеграции → MCP-серверы → Добавить сервер. Вставьте:
{
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}Сохраните, перезапустите, и 9 инструментов появятся в любом чате с включенным использованием инструментов.
Cursor
Отредактируйте ~/.cursor/mcp.json (глобально) или <project>/.cursor/mcp.json (в рамках проекта):
{
"mcpServers": {
"anchor-x402": {
"command": "npx",
"args": ["-y", "anchor-x402-mcp"],
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"
}
}
}
}OpenAI Agents SDK (программный доступ)
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])Тот же пакет, те же переменные окружения, программный доступ вместо конфигурационного файла.
Continue / Smithery / универсальный MCP-клиент
Тот же формат — command: npx, args: [-y, anchor-x402-mcp], переменные окружения содержат ключ вашего кошелька. MCP SDK берет на себя транспорт.
Или установите через одну команду Smithery:
npx -y @smithery/cli install anchor-x402-mcp --client claude(замените --client claude на cursor, codex, windsurf и т.д.)
Запуск в автономном режиме
ANCHOR_WALLET_PRIVATE_KEY=0xYOUR_KEY npx anchor-x402-mcpРаботает через MCP по stdio. Перенаправьте вывод в любой MCP-совместимый клиент.
Пополнение кошелька
Кошелек, который вы указали в ANCHOR_WALLET_PRIVATE_KEY, должен содержать USDC в основной сети Base. Подойдет любая сумма — даже $1 хватит на 100 вызовов анкорирования или 1000 вызовов базовых сервисов. Отправьте USDC на адрес Base вашего кошелька:
Контракт USDC в сети Base:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Мост из основной сети Ethereum через bridge.base.org
Купите напрямую на Coinbase и выведите в сеть Base
MCP-сервер подписывает платежи через x402 — открытый протокол микроплатежей Coinbase, работающий через HTTP. Каждый запрос:
Обращается к эндпоинту
anchor-x402Получает ответ 402 с требованиями по оплате
Сервер подписывает авторизацию перевода USDC вашим закрытым ключом
Повторяет запрос с подписанным платежом — API проводит расчет через фасилитатор Coinbase
Вы видите ответ, а баланс USDC на вашем кошельке уменьшается на стоимость вызова. Мгновенно, без реестров и аккаунтов.
Переменные окружения
Переменная | Обязательно? | Назначение |
| Да для платных вызовов | Закрытый ключ EVM. Кошелек оплачивает вызовы x402. |
| Нет | Переопределение базового URL API. По умолчанию: |
Если ANCHOR_WALLET_PRIVATE_KEY не задан, платные вызовы инструментов вернут понятное сообщение 402 с объяснением, как его настроить. /health и /openapi.json (не представлены как инструменты, но доступны через прямой curl) работают без оплаты.
Примечания по безопасности
Закрытый ключ хранится в файле конфигурации вашего MCP-клиента. Относитесь к нему как к «горячему» кошельку — пополняйте только на ту сумму, которую готовы потратить автономно.
Рекомендуется: создайте новый кошелек специально для использования агентами. Пополняйте его периодически; не используйте повторно кошелек, на котором хранятся значительные средства.
MCP-сервер подписывает только авторизации платежей USDC на известные казначейские адреса anchor-x402 (видны в ответе 402). Он не может вывести средства с вашего кошелька на произвольные адреса.
Исходный код полностью открыт на github.com/hypeprinter007-stack/anchor-x402-mcp. Проведите аудит перед установкой.
Проверка квитанций анкорирования
Каждый вызов anchor_hash и attest_decision возвращает URL транзакций в Base + Solana. Их можно независимо проверить в публичных обозревателях блоков — агенты могут подтвердить существование анкора без повторной оплаты:
Base:
https://basescan.org/tx/<base.tx>— поле Input Data содержит корень дерева МерклаSolana:
https://solscan.io/tx/<solana.tx>— данные программы Memo содержат тот же шестнадцатеричный код
Байты в блокчейне — это квитанция; ответ API — лишь удобная обертка над ними. См. руководство по проверяемости в блокчейне для получения полного рецепта проверки.
Устранение неполадок
"Payment required (402). Set ANCHOR_WALLET_PRIVATE_KEY..." Вы не настроили кошелек. Добавьте переменную окружения в конфигурацию MCP и перезапустите Claude Desktop.
"Payment failed (402). The wallet may be out of USDC..."
На вашем кошельке закончились средства. Отправьте USDC в сети Base на адрес кошелька, указанный в логе запуска сервера (он записывает payer=0x… в stderr).
"anchor-x402 request failed: ..."
Проблема с сетью или DNS. Проверьте, что https://api.anchor-x402.com/health возвращает 200; если нет, см. страницу статуса.
Ссылки
Live API: https://api.anchor-x402.com
Сайт / портал доверия: https://anchor-x402.com
Исходный код сервера: https://github.com/hypeprinter007-stack/anchor-x402
Исходный код MCP-сервера (этот репозиторий): https://github.com/hypeprinter007-stack/anchor-x402-mcp
Протокол x402: https://github.com/coinbase/x402
Спецификация MCP: https://modelcontextprotocol.io
Лицензия
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.
MCP server for X420's pay-per-call agent services (x402, USDC on Base, paid from your own wallet).
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.887 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.17123 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.MIT
- 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