SuperAPIAI Directory

x402-router-mcp

github.com · AI developer platforms

x402 Router is an x402 endpoint discovery and routing service for AI agents, offering an MCP server and a free API. It continuously probes approximately 24,000 pay-per-call x402 endpoints on Base, Solana, and USDC, scores them by reliability and latency, and helps agents find endpoints that are currently available and have known pricing. The service offers free read-only tools and optional paid routing tools; paid tools settle only when the user configures their own wallet key and signs the payment.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

x402 Router is aimed at AI agents that need to call x402 pay-per-call APIs, solving the question of "which endpoint is currently available, what the price is, and which one to switch to after a failure." It maintains a continuously probed endpoint registry covering more than 24,800 online x402 endpoints under more than 3,800 services, probed every 3 hours and rated for reliability on a 0-100 scale.

Key capabilities:

  • Endpoint search and routing: provides read-only tools such as search_x402_endpoints, route_x402_request, get_registry_stats, and get_paid_route_requirements, returning candidate endpoints sorted by reliability.
  • Paid routing enhancements: route_paid (0.01 USDC) and check_endpoint_paid (0.002 USDC) re-check candidate endpoints in real time before answering, returning best (with live_check status, HTTP code, latency, and time), up to 4 fallbacks, up to 25 ranked results with reliability_pct, and remembering the last working endpoint for the paying wallet.
  • Reliability data: the /reliability interface can query the most reliable online endpoint for a given query, or the reliability percentage of a single specified endpoint; probing validates fields such as version, scheme, network, payTo, asset, and amount in the 402 response body.
  • Public proof: /live, /status, and /evidence/report provide running status, crawl freshness, settlement records, and evidence reports, with settlement records including block explorer links.
  • Machine-readable discovery: /.well-known/x402, /.well-known/ard.json, /.well-known/agent-card.json, /openapi.json, /llms.txt.

Usage:

  • Hosted MCP: register https://router-production-ab89.up.railway.app/mcp(Streamable HTTP, no authentication required) with Claude Code, Cursor, or Codex. The install script supports --dry-run preview, --client to specify the client, doctor health checks, and capabilities to view tools and fees; the script requires no keys, makes no payments, and backs up any modified configuration files.
  • Local run: can be run via uvx, Docker, or from source; python server.py --http 8000 serves http://localhost:8000/mcp,支持 X402_ROUTER_URL and X402_DASHBOARD_URL environment variable overrides.
  • Free trial: add an X-402-Trial: <wallet address> header to /route/paid for 3 uses per wallet per day, 3 per IP per day, and 100 per day from a shared pool, with no signature and no charge.
  • Paid tools require you to configure your own wallet key, and each call is capped by X402_MAX_PAYMENT_USD; when no key is configured, they return the price and payment requirements without paying. x402 v2 prefers Base USDC with Solana USDC as a fallback, settling through the PayAI facilitator.

Use cases: agent workflows that need to automatically discover and call pay-per-call APIs, orchestration systems that need endpoint reliability ranking and failover, and developers who want to integrate with the x402 ecosystem via MCP.

Limitations: the MCP server is read-only by default, holds no keys, and does not initiate payments; paid capabilities depend on the user's own wallet and x402 client signatures; the free trial has daily limits and a shared pool limit; endpoint coverage and scoring are based on its own probe data, and unverified items are explicitly listed in the evidence report.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools