a2a-x402-mcp-services

a2a-x402-mcp-services

Enables agents to access production-grade paid MCP tools with real on-chain x402 v2 settlement, including EVM wallet risk scoring, payload normalization, and facilitator discovery, all discoverable via Bazaar-compatible metadata.

Category
访问服务器

README

a2a-x402-mcp-services

Production-oriented x402 v2 monetized MCP tools for real agent-to-agent (A2A) commerce.

  • Authentic on-chain settlement (no mocks, no simulated payments)
  • Fully compliant with the current x402 v2 specification (CAIP-2 networks, PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE headers, x402Version: 2, exact scheme)
  • Official @x402/mcp + @x402/core + @x402/evm packages
  • Bazaar-ready (tools are discoverable via facilitators that implement the Bazaar extension)
  • Built against the live ecosystem gaps: operational utilities agents actually re-purchase

Current Paid Tools

Tool Price Purpose
wallet_risk_score $0.02 Score an EVM wallet for A2A counterparty risk (0-100 + recommendation)
normalize_payload $0.01 Turn messy agent workflow JSON into a strict deterministic schema
probe_facilitators $0.005 Return production facilitators that support requested CAIP-2 networks + Bazaar

All tools use the exact payment scheme and settle through a real facilitator.

x402 v2 Compliance Checklist

  • [x] x402Version: 2
  • [x] CAIP-2 network identifiers (eip155:84532 Base Sepolia default, eip155:8453 for mainnet)
  • [x] Official headers (PAYMENT-REQUIRED, PAYMENT-SIGNATURE, PAYMENT-RESPONSE)
  • [x] Exact scheme via @x402/evm/exact
  • [x] Facilitator-based verify + settle (never self-settled in process)
  • [x] Bazaar extension metadata for MCP tool discovery
  • [x] Environment-driven payTo address (no hard-coded production wallets)

Quick Start (Testnet)

git clone https://github.com/Disseveru/a2a-x402-mcp-services.git
cd a2a-x402-mcp-services
npm install

# Required: receiving wallet (Base Sepolia)
export X402_PAY_TO_EVM=0xYourTestnetAddress

# Optional overrides
# export X402_NETWORK=eip155:84532
# export X402_FACILITATOR_URL=https://x402.org/facilitator
# export PORT=4022

npm run dev

Health check (free):

curl http://localhost:4022/health

Tool catalog (free):

curl http://localhost:4022/tools

MCP endpoint (paid):

POST http://localhost:4022/mcp

Use any x402 v2-aware MCP client (@x402/mcp client helpers, CDP-managed wallets, etc.). The first call to a paid tool will receive a proper 402; the client signs and retries with PAYMENT-SIGNATURE; the facilitator settles; the tool result is returned.

Moving to Mainnet

  1. Set a mainnet receiving address:
    export X402_PAY_TO_EVM=0xYourMainnetAddress
    
  2. Switch network:
    export X402_NETWORK=eip155:8453
    
  3. Use a production facilitator (example – CDP):
    export X402_FACILITATOR_URL=https://api.cdp.coinbase.com/platform/v2/x402
    
    (Supply CDP credentials if the chosen facilitator requires them.)
  4. Start the server. Real USDC will move.

Never run mainnet with a hot key that holds more than you are willing to lose.

Architecture

src/
  config.ts          – env-driven CAIP-2 + facilitator + payTo
  server.ts          – McpServer + official createPaymentWrapper (@x402/mcp)
  tools/
    definitions.ts   – paid tool implementations (real logic)
  index.ts           – Express host + Streamable HTTP MCP transport

Design Principles

  1. No mocks – every paid path ends in a real facilitator settle call.
  2. v2 only – no legacy X-PAYMENT headers or v1 network strings.
  3. Operational utility – tools solve repeat-purchase agent problems (risk, normalization, facilitator selection).
  4. Discoverable – Bazaar metadata is present so agents can find the tools without hard-coding URLs.
  5. Operator safety – receiving address and network come exclusively from environment variables.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选