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
Visit Server

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

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured