Fetching from the wire…
Top 5 · 2026-04-30 · source-backed
This is the most immediately useful pattern I've seen this month.
Cloudflare shipped Code Mode MCP, and the numbers are hard to argue with. Their API has 2,500+ endpoints. Exposing each one as a separate MCP tool would consume 1.17 million tokens of context just for tool definitions. Their solution uses exactly two tools: search() and execute(). Total token footprint: roughly 1,000. That's a 99.9% reduction.
Here's how it works. The search() tool lets an agent query the OpenAPI spec by product area without loading the entire spec into context. The agent finds the endpoints it needs. Then execute() runs agent-generated JavaScript inside a V8 isolate, handling pagination and chained API calls in a single cycle. The agent writes code against a TypeScript API rather than making sequential tool calls.
The key insight, and this is the part I want every builder to internalize: converting MCP tool definitions into a typed API and asking the LLM to write code against it consistently outperforms sequential tool calling. Cloudflare's benchmarks show 81-99.9% token reduction depending on the API surface.
I've been struggling with this exact problem. I have a FastAPI backend with 120+ endpoints, and exposing them all via MCP is absurd. The context window fills up with tool schemas before the agent even starts thinking about your actual request. Cloudflare just showed us the pattern: search over the spec, execute code against a typed SDK.
This approach is portable to any API with an OpenAPI spec. You don't need Cloudflare's infrastructure. Generate a TypeScript client from your spec, expose search and execute as MCP tools, and let the agent write code. I'm planning to try this on my own API this week.
The 99.9% token reduction also matters for cost. If you're running agents that interact with large APIs, your token bills are dominated by tool definitions the agent may never use. Two tools that dynamically discover what's available fixes the economics.
Each link below shares sources, entities, or timing with this story.
Cloudflare released Code Mode MCP / Shared entities / Same source / Shared topic / Earlier coverage
Linked by a graph relationship (Cloudflare released Code Mode MCP); both cover Cloudflare, Code Mode MCP, MCP, OpenAPI; cite the same source (Cloudflare shipped Code Mode MCP).
Linked by a graph relationship (Cloudflare released Code Mode MCP); both cover Cloudflare, LLM, MCP, SDK; cite the same source (Cloudflare shipped Code Mode MCP).
Claude Code uses MCP / Shared entities / Shared topic / Earlier coverage / Tension
Linked by a graph relationship (Claude Code uses MCP); both cover LLM, MCP, Then; overlapping topics (agent, code, context, pattern, tool).
Cloudflare supports MCP / Shared entities / Same source domain / Shared topic / What happened next
Linked by a graph relationship (Cloudflare supports MCP); both cover LLM, MCP; reported by the same outlet (blog.cloudflare.com).
Anthropic released MCP / Shared entities / Shared topic / Earlier coverage
Linked by a graph relationship (Anthropic released MCP); both cover MCP, SDK, Their, Then; overlapping topics (code, context, pattern).
Cloudflare released Code Mode MCP / Shared entities / Same source domain / Shared topic / What happened next
Linked by a graph relationship (Cloudflare released Code Mode MCP); both cover APIs, Cloudflare, Their; reported by the same outlet (blog.cloudflare.com).
Linked by a graph relationship (Cloudflare released Code Mode MCP); both cover Cloudflare, JavaScript, Their; reported by the same outlet (blog.cloudflare.com).
LLM uses OpenAI / Shared entities / Shared topic / What happened next / Tension
Linked by a graph relationship (LLM uses OpenAI); both cover LLM, Their, Then; overlapping topics (against, agent, tool).