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.
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-RESPONSEheaders,x402Version: 2, exact scheme) - Official
@x402/mcp+@x402/core+@x402/evmpackages - 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:84532Base Sepolia default,eip155:8453for 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
payToaddress (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
- Set a mainnet receiving address:
export X402_PAY_TO_EVM=0xYourMainnetAddress - Switch network:
export X402_NETWORK=eip155:8453 - Use a production facilitator (example – CDP):
(Supply CDP credentials if the chosen facilitator requires them.)export X402_FACILITATOR_URL=https://api.cdp.coinbase.com/platform/v2/x402 - 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
- No mocks – every paid path ends in a real facilitator settle call.
- v2 only – no legacy
X-PAYMENTheaders or v1 network strings. - Operational utility – tools solve repeat-purchase agent problems (risk, normalization, facilitator selection).
- Discoverable – Bazaar metadata is present so agents can find the tools without hard-coding URLs.
- Operator safety – receiving address and network come exclusively from environment variables.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.