Skip to main content
Glama

anchor-x402-mcp

MCP 服务器,将所有 9 个 anchor-x402 服务作为工具公开,供任何 Claude Desktop / Cursor / Codex / Continue 代理调用。通过 Base 主网上的 x402 按次付费(USDC)——无需 API 密钥,无需订阅。

代理能获得什么

九种工具,每次调用 $0.001–$0.010:

工具

价格

功能

anchor_hash

$0.005

将任何 32 字节哈希并行锚定到 Base + Solana 主网;返回两个交易 URL

screen_wallet

$0.001

对任何 EVM 或 Solana 钱包进行 OFAC SDN 制裁筛查

attest_decision

$0.010

验证钱包对 (input_hash, output_hash, decision) 的签名;对结果进行双链锚定

decode_tx

$0.001

对任何主网交易(Base / Ethereum / Solana)进行结构化解码

resolve_name

$0.001

跨链名称解析(ENS, Bonfida SNS)

token_price

$0.001

通过符号或链+合约获取任何代币的美元现货价格

decode_calldata

$0.001

原始 EVM 调用数据的 4 字节选择器 + ABI 参数解码

parse_datetime

$0.001

自由格式日期时间字符串 → 结构化 ISO 8601

intel_wallet

$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

设置 → 集成 (Integrations) → MCP 服务器 (MCP servers) → 添加服务器 (Add server)。粘贴:

{
  "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

通过 stdio 进行 MCP 通信。管道传输到任何兼容 MCP 的客户端。

为您的钱包充值

您设置为 ANCHOR_WALLET_PRIVATE_KEY 的钱包需要 Base 主网上的 USDC。任何金额都可以——即使是 $1 也能购买 100 次锚定调用或 1000 次商品级调用。将 USDC 发送到您钱包的 Base 地址:

  • Base 上的 USDC 合约:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

  • 通过 bridge.base.org 从以太坊主网桥接

  • 在 Coinbase 上直接购买并提现到 Base

MCP 服务器通过 x402(Coinbase 的开放式 HTTP 原生微支付协议)签署支付。每次请求:

  1. 访问 anchor-x402 端点

  2. 收到带有支付要求的 402 响应

  3. 服务器使用您的私钥签署 USDC 转账授权

  4. 使用已签署的支付重试请求——API 通过 Coinbase 的促进者进行结算

您可以看到响应,钱包的 USDC 余额会按调用价格扣减。亚秒级,无账本,无账户。

环境变量

变量

是否必需?

用途

ANCHOR_WALLET_PRIVATE_KEY

付费调用必需

EVM 私钥。钱包用于支付 x402 调用。

ANCHOR_API_URL

否

覆盖 API 基础 URL。默认:https://api.anchor-x402.com。适用于针对自托管分支进行开发。

如果未设置 ANCHOR_WALLET_PRIVATE_KEY,付费工具调用将返回友好的 402 消息,说明如何设置它。/health 和 /openapi.json(未作为工具公开,但可通过直接 curl 访问)无需支付即可工作。

安全说明

  • 私钥存储在您的 MCP 客户端配置文件中。请将其视为热钱包——仅存入您愿意自主花费的金额。

  • 建议:专门为代理使用生成一个新钱包。定期充值;不要重复使用持有大量资金的钱包。

  • MCP 服务器仅签署针对 anchor-x402 已知金库地址(在 402 响应中可见)的 USDC 支付授权。它无法将您的钱包资金转移到任意地址。

  • 源代码完全开源于 github.com/hypeprinter007-stack/anchor-x402-mcp。安装前请进行审计。

验证锚定收据

每个 anchor_hash 和 attest_decision 调用都会返回 Base + Solana 交易 URL。这些可以在公共区块浏览器上独立验证——代理无需再次付费即可确认锚定存在:

  • Base: https://basescan.org/tx/<base.tx> — 输入数据字段包含默克尔根

  • Solana: https://solscan.io/tx/<solana.tx> — 备忘录程序数据包含相同的十六进制

链上字节即收据;API 响应只是围绕它们的一个便利包装器。请参阅 链上可验证性入门 获取完整的验证方法。

故障排除

"Payment required (402). Set ANCHOR_WALLET_PRIVATE_KEY..." 您尚未配置钱包。将环境变量添加到您的 MCP 配置中并重启 Claude Desktop。

"Payment failed (402). The wallet may be out of USDC..." 您的钱包余额不足。将 Base 上的 USDC 发送到服务器启动日志中显示的钱包地址(它会将 payer=0x… 记录到 stderr)。

"anchor-x402 request failed: ..." 网络或 DNS 问题。检查 https://api.anchor-x402.com/health 是否返回 200;如果不是,请查看 状态页面。

链接

许可证

MIT

Available Tools

14 tools
anchor_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

    A3.7/5.0

    Scored across 14 tools

    Disambiguation2/5

    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.

    Naming Consistency2/5

    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.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivitySlowing
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Eight 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.
      8
      87 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      MCP 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.
      17
      123 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP 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