x402 Router
This read-only MCP server helps you discover, search, and route to live x402 endpoints and inspect registry/payment requirements without paying.
Search LIVE x402 endpoints by query, chain, category, max price, min score, sort order, and limit.
Ask the free router for the single best-scored LIVE endpoint matching filters; returns target URL, method, price, 1% router fee, and total without paying or calling the target.
Get registry stats: total/LIVE counts, LIVE by chain, median price, last crawl time, and router health.
Fetch x402 payment requirements for the paid route without paying.
Supports discovering and routing x402 pay-per-call endpoints on Solana, including filtering endpoints by the Solana chain and returning payment requirements that accept Solana USDC for paid route access.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
x402 Router: MCP server + free API to find and pay the right x402 endpoint
24,800+ LIVE x402 pay-per-call endpoints across 3,800+ services, probed every 3 hours and scored 0-100 for reliability. Agents don't need to know which x402 API is up. Ask the router.
Keywords: x402, MCP, MCP server, AI agents, agent payments, pay-per-call APIs, USDC, Base, Solana, x402 discovery, x402 router, x402 registry, HTTP 402.
Live router: https://router-production-ab89.up.railway.app (OpenAPI: /openapi.json · x402 discovery: /.well-known/x402 · health: /health)
Dashboard / registry: https://router-production-ab89.up.railway.app/dashboard
Status (uptime, crawl freshness, on-chain receipts): https://router-production-ab89.up.railway.app/status
For LLMs: https://router-production-ab89.up.railway.app/llms.txt
One-command setup (hosted MCP, nothing to install)
Register the hosted MCP endpoint https://router-production-ab89.up.railway.app/mcp (Streamable HTTP, no auth) with Claude Code, Cursor and Codex in one line:
curl -fsSL https://router-production-ab89.up.railway.app/install.sh | bashPreview first, changing nothing:
curl -fsSL https://router-production-ab89.up.railway.app/install.sh | bash -s -- --dry-runOne client only:
... | bash -s -- --client cursor(orclaude,codex,all)Health check (read-only, never pays):
curl -fsSL https://router-production-ab89.up.railway.app/install.sh | bash -s -- doctorWhat each tool can do and cost:
curl -fsSL https://router-production-ab89.up.railway.app/install.sh | bash -s -- capabilities
The script (read it first) needs no keys, never pays and backs up every config file it changes to <file>.<timestamp>.bak. Claude Code is registered with claude mcp add --transport http --scope user x402-router https://router-production-ab89.up.railway.app/mcp, Cursor in ~/.cursor/mcp.json, Codex in ~/.codex/config.toml.
The hosted server has 9 tools: 7 free and read-only, plus route_paid ($0.01 USDC) and check_endpoint_paid ($0.002 USDC), which only settle when your x402 client signs a payment. Machine-readable: /capabilities, /doctor.
Listed on x402-list (14/14 compliance checks, grade A).
Related MCP server: x402-discovery
Quick start (MCP, 30 seconds)
The server is read-only: it holds no keys and never pays. It exposes four tools:
search_x402_endpoints, route_x402_request, get_registry_stats, get_paid_route_requirements.
Option A: uvx (no clone, no PyPI needed)
Claude Desktop (claude_desktop_config.json) or Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"x402-router": {
"command": "uvx",
"args": ["--from", "git+https://github.com/camerxnduff/x402-router-mcp#subdirectory=mcp-server", "x402-router-mcp"]
}
}
}Option B: Docker
{
"mcpServers": {
"x402-router": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/camerxnduff/x402-router-mcp:latest"]
}
}
}Or build it yourself: docker build -t x402-router-mcp . and use x402-router-mcp as the image name.
Option C: from source
git clone https://github.com/camerxnduff/x402-router-mcp
cd x402-router-mcp/mcp-server
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python test_client.py # calls the live router, read-only{"mcpServers":{"x402-router":{"command":"/abs/path/x402-router-mcp/mcp-server/.venv/bin/python","args":["/abs/path/x402-router-mcp/mcp-server/server.py"]}}}Streamable HTTP: python server.py --http 8000 serves http://localhost:8000/mcp.
Env overrides: X402_ROUTER_URL, X402_DASHBOARD_URL.
Try it with no install (curl)
# best live Base endpoint for a category (free preview)
curl -s -X POST https://router-production-ab89.up.railway.app/route \
-H 'content-type: application/json' -d '{"category":"Finance","chain":"Base"}'
# search the registry
curl -s 'https://router-production-ab89.up.railway.app/api/endpoints?q=weather&chain=Base&limit=5'Free trial of the paid route
3 free trial calls per wallet per day, no payment needed. Add X-402-Trial: <your wallet address> (EVM 0x… or Solana) to /route/paid and you get the same full ranked answer a paid call returns, with headers X-402-Trial: true and X-402-Trial-Remaining: N. Limits: 3 per wallet and 3 per IP per UTC day, from a shared pool of 100 a day. After that you get the normal x402 402 (plus X-402-Trial-Remaining: 0). Nothing is signed or charged.
curl -i -X POST https://router-production-ab89.up.railway.app/route/paid \
-H 'content-type: application/json' -H 'X-402-Trial: 0xYourWalletAddress' -d '{"q":"weather"}'When the trial is used up, the 402 keeps the standard x402 fields and PAYMENT-REQUIRED header unchanged and adds a how_to_pay field (copy-paste TypeScript and Python clients) plus an X-402-Pay-Help header.
What a paid (or trial) call adds over the free list
best, live-checked: the top candidates are re-checked moments before the answer (an unpaid request that must come back HTTP 402), so the pick is up right now.best.live_checkshows the status, HTTP code, latency and time. Endpoints that fail the check are skipped.fallbacks: up to 4 alternates in order, so an agent can retry without a second lookup.ranked: up to 25 matches, each withreliability_pct(the share of the last 20 crawl probes that answered 402).memory: a paying wallet's last good endpoint for the same filters is tried first on its next call (stored per payer wallet, never published).
Public proof and reliability scores (free)
/live (JSON): uptime, endpoints checked, success rates, free-trial and paid call counts. Aggregate numbers only, no wallet data.
/reliability: the most reliable LIVE endpoints for a query, with
reliability_pct;/reliability?url=<endpoint>for one endpoint.
Why
Thousands of x402 endpoints exist, and many are dead, misconfigured or slow. The router probes every one, checks that its 402 body is valid (version, scheme, network, payTo, asset, amount), and ranks by uptime and latency, so an agent gets a working endpoint with a known price.
HTTP API
Endpoint | What |
| Search LIVE endpoints, best first |
| Counts by chain, category, source |
| Full registry (gzip) |
| Best match + top 3, free |
| $0.01 USDC (x402, Base; Solana accepted): full ranked list (up to 25) with latency, reliability, price, payTo/networks and a ready-to-pay best pick. Free trial: 3 calls per wallet per day with the |
| $0.002 USDC (x402): fresh live probe of one endpoint: is it up, latency, the real price and payTo it asks for now |
Examples: examples/ (curl, Python, TypeScript) and examples/frameworks/ (LangChain, CrewAI, Coinbase AgentKit, x402 clients). Guides: https://router-production-ab89.up.railway.app/integrations
MCP tools
Tool | Cost |
| Free |
| $0.01 USDC per call |
| $0.002 USDC per call |
Paid tools pay inside the tool call. To enable them:
pip install "x402-router-mcp[pay] @ git+https://github.com/camerxnduff/x402-router-mcp#subdirectory=mcp-server"
export X402_EVM_PRIVATE_KEY=0x... # a dedicated, low-balance Base wallet holding a little USDC
export X402_MAX_PAYMENT_USD=0.01 # per-call cap (default 0.01)Without a key, the paid tools return the price and the x402 payment requirements instead of paying.
Trust and transparency
Public status page: /status (JSON) shows uptime, the last successful crawl, LIVE counts and every settled payment with a block-explorer link. Numbers come from the router's own counters and settle log; nothing is estimated.
Evidence report: /evidence/report (Markdown · JSON) collects reliability, change-feed, freshness and on-chain figures in one file. Every block carries an evidence record (
record_id,observed_at,confidence,coverage,sample_scope,unknowns,source), and theunknownslist says what is not verified. Add?url=<endpoint>for one endpoint or&download=1to save it.Machine-readable discovery: /.well-known/x402, /.well-known/ard.json, /.well-known/agent-card.json, /openapi.json, /llms.txt.
This MCP server is read-only by default: no keys, no payments. The optional paid tools only pay when you set your own wallet key, and each call is capped by
X402_MAX_PAYMENT_USD.
Payments
x402 v2: Base USDC first, Solana USDC as fallback, settled through the PayAI facilitator.
License
MIT
Available Tools
4 toolsget_paid_route_requirementsAInspect
Return the x402 payment requirements of the paid route (/route/paid) without paying.
Inputs: no named parameters.
get_registry_statsAInspect
Registry summary: total/LIVE counts, LIVE by chain, median price, last crawl time, router health.
Inputs: no named parameters.
route_x402_requestAInspect
Ask the x402 Router for the single best-scored LIVE endpoint matching filters (free POST /route). Returns target URL, method, price, 1% router fee and total. Does not pay or call the target.
Inputs: q, agent, chain, category, +1 more.
search_x402_endpointsAInspect
Search LIVE x402 (HTTP 402 pay-per-call) endpoints. Filters: q (text), chain (Base, Solana...), category, max_price (USDC), min_score (0-100), sort (score|price|latency|newest), limit (1-50).
Inputs: q, sort, chain, limit, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
search vs route is clearly differentiated (list vs best single match), and stats is distinct. get_paid_route_requirements overlaps somewhat with the routing tools since it examines the paid route without invoking it, but the description adequately clarifies it.
All four tools use a consistent snake_case verb_noun pattern (search_, route_, get_, get_). The convention is uniform and predictable.
Four tools is well-scoped for a small router/registry service; each tool (search, route, stats, payment requirements) covers a distinct facet with no filler.
Discovery and routing are covered, but there is no tool to actually invoke or pay for an endpoint—route_x402_request explicitly does not pay or call the target, and get_paid_route_requirements only returns requirements. The paid flow has a dead end within the surface.
Maintenance
Related MCP Connectors
24 pay-per-call data APIs over x402 (USDC on Base), plus a free search tool.
Search settlement-verified x402 APIs for free. Pay in USDC on Base, Solana, Algorand or Polygon.
Search and call pay-per-request data services, paying in USDC on Base with x402.
144 pay-per-call crypto & AI APIs over x402 (USDC on Base). LLM chat $0.001. Free first call.
Related MCP Servers
- AlicenseAqualityDmaintenanceSearch 14,000+ x402-enabled HTTP APIs by keyword. Agents pay $0.01 USDC per search via x402 micropayments on Base mainnet — no API keys or accounts required.141 npm2MIT
- AlicenseNot gradedqualityDmaintenanceDiscovers and queries x402-payable APIs at runtime — enables autonomous agents to find, evaluate, and pay for services via USDC micropayments on Base without API keys or subscriptions.MIT

@1ly/mcp-serverofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover, pay for, and sell APIs using crypto on Solana and Base networks, with support for automated x402 payments.87 npm3MIT- AlicenseNot gradedqualityDmaintenancePay-per-call web search for AI agents, settled in USDC on Base via the x402 protocol. No API key or subscription required; users fund a wallet and get a web_search tool.1MIT