POST /mcp · JSON-RPC 2.0 · 5 Flat Tools · structuredContent

MCP JSON-RPC 2.0 Failover Router Integration Guide

Instead of wiring 33 distinct upstream MCP servers into an agent's context window, FuelRouter collapses all 5 capability pools and circuit breaker controls into 5 flat JSON-RPC 2.0 tools at POST https://fuelrouter.fastmesh.dev/mcp.

FuelRouter Flat MCP Tool Surface (POST /mcp)

MCP Tool NameUnderlying REST EquivalentBilling BehaviorPrimary Agent Use Case
router_list_poolsGET /v1/router/pools$0.00 (Free)Inspect redacted pool health, circuit states, and remaining quotas
router_quotePOST /v1/router/quote$0.00 (Free)Dry-run cache hit prediction and ranked upstream plan
router_dispatchPOST /v1/router/dispatchOutcome toll ($0 on 503/422)Execute resilient cached or live failover across any of 5 pools
router_metricsGET /v1/router/metrics$0.00 (Free)Audit cache hit ratio, saved upstream spend, and gross margin
router_circuit_resetPOST /v1/router/circuit/reset$0.00 (Free)Reset tripped upstream or pool circuit breakers to CLOSED

Context-Window Efficiency for Multi-Agent Orchestrators

Registering dozens of per-vendor search, scrape, embedding, and enrichment tools bloats agent system prompts and confuses tool selection. FuelRouter exposes a minimal 5-tool schema over standard JSON-RPC 2.0 supporting initialize, tools/list, and tools/call.

Every tools/call response delivers both human-readable text inside content[0].text and machine-typed JSON inside structuredContent so agent harnesses can branch deterministically on cache_hit, charged_micros, and backoff_advice.

Zero-Config Budget & Safety Propagation Over MCP

Every security redline enforced on the REST surface—SSRF blocking, Anti-Fake-200 scanning, zero-secret vault proxying, max_cost_micros budget locks, and $0 exhaustion billing—applies identically to POST /mcp.

Agents can chain router_quote -> router_dispatch -> router_metrics within a single MCP session without managing vendor SDKs or secret rotation.

Complete JSON-RPC 2.0 MCP Handshake & Tool Invocation

curl -fsSL -X POST "https://fuelrouter.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'

curl -fsSL -X POST "https://fuelrouter.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "router_quote",
      "arguments": {
        "pool_id": "ai_chat_json",
        "tenant_id": "mcp_client_01",
        "inputs": {"prompt": "Summarize SLA metrics as JSON."}
      }
    }
  }'

MCP Client Integration Checklist

Frequently Asked Technical Questions

Which JSON-RPC 2.0 methods does POST /mcp implement?

FuelRouter implements initialize, tools/list, and tools/call over HTTP POST with application/json payloads.

Are router_list_pools, router_quote, and router_metrics free to call?

Yes. All discovery, dry-run quote, telemetry, and reset operations carry $0 charge.

Does POST /mcp expose any raw upstream API keys in tool schemas or outputs?

No. All MCP outputs pass through the same zero-secret redaction scrubber as REST routes.

Live Try-Now Console & Machine Discovery

Test failover routing, dry-run quotes, and circuit breaker metrics on the live gateway or connect via JSON-RPC 2.0 MCP.

Related FuelRouter Architecture Guides