Anchor X402

io.github.hypeprinter007-stack由 GitHub 账号 hypeprinter007-stack 发布v0.3.2更新于 Nov 2, 2026

x402-paid agent tools: 18 over HTTP, 14 over stdio. USDC per call, no API key.

已验证Streamable HTTP可网页运行金融开发者工具安全与监控

概览

AI 生成的概览

按次付费的 x402 工具服务器:在 Base 与 Solana 上锚定哈希和决策证明、解码交易、筛查钱包,并提供若干轻量文本工具,以 USDC 计费。

可以做什么
  • 在 Base 与 Solana 主网锚定哈希、为决策出具证明,返回交易凭证链接
  • 筛查与调查钱包:制裁与信誉风险、余额与活跃度、消费报告
  • 解码 EVM calldata 与主网交易,解析 ENS 与 SNS 名称,查询代币价格,解析日期时间
  • 提供趣味与实用端点:吐槽、评分、气场解读、是/否神谕、可验证随机数、文本或网址摘要
适用场景
当助手需要为某个哈希或决策留下可验证的时间戳证明、在付款前快速做钱包风险检查,或需要轻量的链上查询与文本工具,并且愿意为每次调用支付零点几美分到几美元的 USDC 时适用。
运行要求
可使用远程端点,无需安装,按次通过 PAYMENT-SIGNATURE 请求头付费;也可用 npx 运行本地 npm 包,需要 Node.js 和 ANCHOR_WALLET_PRIVATE_KEY 环境变量(已充值的 EVM 私钥)。钱包需在 Base 主网持有 USDC,无需账号或 API 密钥,但需能访问服务商 API。
安装前请注意
stdio 包会把热钱包 EVM 私钥写入客户端配置文件,建议使用专用且余额很少的钱包。每次工具调用都会自动扣 USDC,从 0.001 美元到异步调查任务的 1.77 美元不等。部分工具会把数据发给第三方:calldata 解码使用 openchain.xyz,价格来自 CoinGecko,摘要工具会抓取所给网址。锚定与证明会写入公开链。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Anchor X402,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.hypeprinter007-stack%2Fanchor-x402/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "anchor-x402": {
      "type": "http",
      "url": "https://api.anchor-x402.com/mcp"
    }
  }
}

README

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.

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

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

What an agent gets

Fourteen tools, $0.001–$0.05 per call.

Commodity primitives (9, $0.001–$0.01):

ToolPriceWhat it does
anchor_hash$0.005Anchor any 32-byte hash to Base + Solana mainnet in parallel; returns both tx URLs
screen_wallet$0.005Wallet risk pre-flight — OFAC sanctions + address-reputation (drainer/phishing/mixer) → allow/review/block
attest_decision$0.010Attest a decision — sign it yourself or let the treasury sign — then dual-chain anchor; free re-verify at /v1/attest/verify
decode_tx$0.001Structured decode of any mainnet tx (Base / Ethereum / Solana)
resolve_name$0.001Cross-chain name resolution (ENS, Bonfida SNS)
token_price$0.001USD spot price for any token by symbol or chain+contract
decode_calldata$0.0014byte selector + ABI param decode for raw EVM calldata
parse_datetime$0.001Freeform datetime string → structured ISO 8601
intel_wallet$0.005Bundled wallet intelligence: balances + activity + identity + sanctions in one call

Universal LLM endpoints (5, $0.01–$0.05) — added in v0.2:

ToolPriceWhat it does
roast$0.05Witty 3-5 paragraph roast of any target — wallet, tweet, code, idea, anything
oracle$0.05Yes/no oracle. Returns YES/NO/MAYBE + reason + dual-chain anchored (question | answer | timestamp) hash. Cryptographic receipt of when you asked.
tldr$0.01Summarize a URL (fetches up to 500KB) or pasted text into 3-5 concise bullets
aura$0.01Returns color, tier (S/A/B/C/D/F), score 0-9999, and a punchy 2-3 sentence aura read
grade$0.01Academic 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):

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

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:

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:

json
{  "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):

json
{  "mcpServers": {    "anchor-x402": {      "command": "npx",      "args": ["-y", "anchor-x402-mcp"],      "env": {        "ANCHOR_WALLET_PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY"      }    }  }}

OpenAI Agents SDK (programmatic)

python
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

bash
ANCHOR_WALLET_PRIVATE_KEY=0xYOUR_KEY npx anchor-x402-mcp

Speaks 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: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
  • Bridge 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:

  1. Hits an anchor-x402 endpoint
  2. Gets a 402 with payment requirements
  3. Server signs a USDC transfer authorization with your private key
  4. 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

VariableRequired?Purpose
ANCHOR_WALLET_PRIVATE_KEYYes for paid callsEVM private key. The wallet pays for x402 calls.
ANCHOR_API_URLNoOverride the API base URL. Default: https://api.anchor-x402.com. Useful for development against a self-hosted fork.

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 root
  • Solana: 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

License

MIT

来源:README.md,提交 555e824

工具

18

anchor_hash

anchor

Anchor a 32-byte hash to Base + Solana mainnet in parallel. Returns both tx URLs as cryptographic proof of when the hash existed. $0.005 USDC.

输入参数datahashnote

attest_decision

attest

Attest a decision over (input_hash, output_hash, decision): sign it yourself, or omit the signature and the treasury signs for you — then dual-chain anchor. Returns the signer, on-chain proof URLs, and a free re-verify URL. $0.010 USDC.

输入参数schemedecision必填signatureinput_hash必填output_hash必填signer_pubkey

aura_read

aura

Read the aura of anything — color, tier (S/A/B/C/D/F), score 0-9999, description. $0.01 USDC.

输入参数target必填

decode_calldata

decode/calldata

Decode raw EVM calldata into function name + typed parameters via openchain.xyz + eth_abi. EVM-only. $0.001 USDC.

输入参数chain必填calldata_hex必填contract_address

decode_tx

decode/tx

Structured decode of any mainnet transaction by hash. Supports Base, Ethereum, Solana. Mined txs cached. $0.001 USDC.

输入参数chain必填tx_hash必填

grade_target

grade

Academic letter grade with red-pen marginalia for anything. $0.01 USDC.

输入参数target必填

intel_wallet

intel/wallet

Unified wallet intelligence bundle. ONE call: balances on Base + Ethereum + Solana, USDC, tx counts, ENS/SNS reverse, sanctions verdict. 8-10 parallel sources. $0.005 USDC.

输入参数wallet必填

investigate_wallet

investigate

Agent-driven wallet due diligence — multi-step investigation, signed markdown report + JSON sidecar, dual-chain anchored. Async — returns job_id; poll /v1/investigate/status/{job_id} for the deliverable. ETA 5-10 min. $1.77 USDC.

输入参数address必填

ledger_report

ledger/report

Signed + dual-chain-anchored x402 expense report (markdown + CSV, async job). $0.35 USDC.

输入参数tofromtitleformatwallet必填group_bydirectionmin_amountprepared_forinclude_unfiltered

ledger_summary

ledger/summary

x402 spend accounting for any Base wallet — totals + per-service breakdown reconstructed from chain data. $0.01 USDC.

输入参数tofromwallet必填group_bydirectionmin_amountinclude_unfiltered

oracle_verdict

oracle

Yes/no oracle with dual-chain anchored verdict (Base + Solana). $0.05 USDC.

输入参数question必填

parse_datetime

parse/datetime

Parse freeform datetime strings into ISO 8601 + components + relative time + confidence. $0.001 USDC.

输入参数input必填timezonebase_time

resolve_name

resolve/name

Cross-chain name resolution: ENS (.eth) and Bonfida SNS (.sol). Returns resolved address(es). 1h cache. $0.001 USDC.

输入参数name必填

roast_target

roast

Witty roast of any target — wallet, tweet, idea, code, anything. $0.05 USDC.

输入参数target必填

roll_random

roll

Verifiable RNG — cryptographically-random integer(s) signed by the treasury key. Drop-in VRF for game studios. $0.001 USDC.

输入参数low必填high必填countlabelcommitment

screen_wallet

screen

Wallet risk pre-flight for agent payments: OFAC SDN sanctions plus address-reputation (drainer, phishing, mixer, laundering) resolved to an allow/review/block recommendation with per-signal detail. $0.005 USDC.

输入参数wallet必填

tldr_text

tldr

Summarize a URL or pasted text into 3-5 concise bullets. $0.01 USDC.

输入参数urltext

token_price

price/token

USD spot price for any major token. By symbol or chain+contract. CoinGecko-backed, 60s cache. $0.001 USDC.

输入参数chainsymbolcontract

版本历史

1
  1. v0.3.2最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分