Without mcp-peek
12,400 tokens consumed to fetch one paginated list — most of it whitespace and fields the agent never touched.
Context window: 80% full after a single call. The next reasoning step has to evict what mattered.
Your agent burned 12,400 tokens on a 200 KB JSON to read one field. With mcp-peek, the same call costs ~200 tokens — and every response carries next_step_hints plus structured error envelopes, so the agent self-corrects instead of guessing.
Both come from the same place: HTTP for agents was retrofitted from HTTP for humans. Here's how it shows up.
12,400 tokens consumed to fetch one paginated list — most of it whitespace and fields the agent never touched.
Context window: 80% full after a single call. The next reasoning step has to evict what mattered.
You clicked Always last call. The next URL has a different path, so the prompt fires again.
Two pains. Same root cause: HTTP for agents was never designed for agents.
A schema-first wrapper around HTTP. The agent sees structure first, then pulls only the fields it actually needs.
Authorize the MCP server once at config time. After that, no per-call permission prompts.
Four structural choices. The hero numbers all fall out of these.
http_request returns the shape of the response, not the response itself. The agent learns what's inside without burning tokens on bytes it'll discard anyway.
JSON responses come back with advisory jq masks derived from the top-level shape. The agent has a starting point instead of guessing paths.
Every error is a typed error.kind with a message and detail.hint. The agent branches programmatically by cause and acts on the hint, instead of parsing a stack trace.
Ask for the same body in a different schema format, or pull a different slice — without a second HTTP call. The body sits in the cache, not in context.
Pick the rendering that matches what your agent is doing — flat field listing, nested shape, realistic sample, or strict JSON Schema.
One config object, one MCP authorization. Pick your client on the left — npx -y mcp-peek is the same everywhere; only the surrounding schema differs.
$npx -y mcp-peek
$docker run -i --rm ghcr.io/ed-smartass/mcp-peek
// note After this, no per-call permission prompts. The MCP server is authorized once at config time and that grant covers every subsequent http_request / http_read the agent makes.