# AgentDiet x402 Gateway — Universal MCP & A2A Tool Discovery Meta-Router

> AgentDiet x402 Gateway — Universal MCP & A2A Tool Discovery Meta-Router is a paid API for AI agents from agentdiet.dev, paid per call via x402 or MPP, $0.01/call, status unknown (last checked 2026-10-20).

Indexes 500+ MCP servers and A2A tools, routes queries to the right tool with 85% token compression, and applies a Prompt-Guard firewall for safe proxying.

## Facts

- Endpoint: GET https://agentdiet.dev/v1/x402-gateway?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402, MPP
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-x402-gateway-universal-mcp-a2a-tool-discovery-meta-router-189776e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7ak6QdzTSRhlhYRG2suGI

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-gateway-universal-mcp-a2a-tool-discovery-meta-router-189776e5
```

Example prompt: Search the AgentDiet x402 gateway to find the best available MCP tool or A2A agent that can do live web search, and route my query there with token compression enabled.

## When to prefer this

Choose this endpoint when an agent needs to discover, compare, or route to one of 500+ MCP servers or A2A tools from a single connection point, especially when token budget is tight (85% compression) or when prompt-injection safety is a concern. Prefer over direct MCP connections when the target tool is unknown and discovery is needed.

## Known failure modes

- No matching MCP server or A2A tool found for the query — returns empty results
- Query blocked by Prompt-Guard firewall due to detected injection attempt
- Payment not processed ($0.01 USDC required per call) — returns 402 Payment Required
- Invalid method or missing required 'input' field — returns 400 Bad Request
- Upstream MCP server unavailable — routing fails with timeout or 503

## How this service works

Single-connection meta-router indexing 500+ MCP servers & A2A tools with 85% token compression and Prompt-Guard firewall. (Live x402 v2, IETF MPP & MCP endpoint at https://agentdiet.dev/v1/x402-gateway)

## Output

Returns a list of matching MCP servers or A2A tool endpoints ranked by relevance, along with compressed metadata (85% token reduction) and the proxied tool response if routing was performed. Includes safety filtering status from the Prompt-Guard firewall.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "minLength": 1,
   "description": "Capability search query (e.g. 'context compression', 'github security', 'sec filings', 'company enrichment') or endpoint URL to verify"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-x402-gateway-universal-mcp-a2a-tool-discovery-meta-router-189776e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdiet.dev](https://www.zero.xyz/host/agentdiet.dev/llms.txt)
