# AgentDiet X402-BROKER Swarm Router

> AgentDiet X402-BROKER Swarm Router is a paid API for AI agents from mcp-gateway.agentdiet.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Routes queries to a unified gateway of 31,390+ MCP servers, x402 APIs, and A2A agents, returning structured results with USDC-on-Base micropayment settlement.

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/swarm-router?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-x402-broker-swarm-router-bea97f4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Pd6Cg_Y8hfSklkAcUNVWP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentdiet-x402-broker-swarm-router-bea97f4b
```

Example prompt: Search across all available MCP servers and x402 APIs to find me a tool that can scrape and summarize a webpage — route the query through the swarm router and return what the best match finds.

## When to prefer this

Choose this endpoint when you need a single unified gateway to discover and execute across a massive catalog of 31,390+ MCP servers, x402 APIs, and A2A agents without managing individual integrations. Ideal for agents that need dynamic tool discovery, want micropayment-settled execution in USDC on Base, or need to broker requests across heterogeneous agent networks. Prefer this over direct API calls when the right underlying tool is unknown and needs to be discovered at runtime.

## Known failure modes

- Payment failure if insufficient USDC balance on Base — returns 402 Payment Required
- No matching MCP server or API found for the query — returns empty data object
- Invalid input schema (missing 'type' or 'method' fields) — returns 400 Bad Request
- Downstream MCP server timeout or unavailability — may return error status
- Malformed queryParams.query — may return unhelpful or null results

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a 'data' field containing the response from the matched MCP/API/agent, a 'status' field ('ok' on success), and an 'roi_proof' object including a compression_ratio_pct metric indicating routing efficiency.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "query": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-x402-broker-swarm-router-bea97f4b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
