Fetching from the wire…
Top 5 · 2026-03-28 · source-backed
Cloudflare published Code Mode for MCP, and the numbers are the kind that change how you architect things. Instead of exposing MCP tools individually to an LLM (each tool call requires a round trip through the model), Code Mode converts your entire MCP server into a typed TypeScript API. The model writes code against that API, chains multiple calls in a single execution, and only reads back the final result.
Two tools. That's all Code Mode exposes: search (to discover available API methods) and execute (to run the generated TypeScript). The entire Cloudflare API fits in roughly 1,000 tokens via these two tools. A traditional MCP server exposing the same API surface requires 1.17 million tokens. That's a 1,170x reduction in context overhead just from how the tools are presented to the model.
On a 31-step task (the kind of complex workflow that MCP was designed for), Code Mode used 81% fewer tokens than direct tool calling. The model writes TypeScript against typed SDKs, batches related operations in code, handles errors in code, and never feeds intermediate results back through the neural network for re-interpretation. Every round trip you eliminate is tokens saved and latency removed.
I've been building MCP integrations for months and the round-trip waste has been my biggest frustration. Every tool call means the model processes the result, decides what to do next, generates the next call, processes that result. For a 10-step workflow, that's 10 model invocations where one would do. Code Mode collapses that into: model writes a 10-step script, script executes, model reads the final output. One invocation.
The pattern here is bigger than Cloudflare's specific implementation. Any MCP server with more than 5-6 tools should probably be offering a code-generation interface alongside direct tool calls. The cognitive overhead of managing dozens of individual tools in context is a tax on every interaction. Giving the model a typed SDK and letting it write code against it is a strictly better interface for complex workflows.
For builders using MCP today: measure your average tool calls per task. If it's above 5, Code Mode's pattern will save you real money. If you're building MCP servers, expose a TypeScript SDK alongside your tool definitions. Your users' token bills will thank you.
Each link below shares sources, entities, or timing with this story.
Cloudflare released Code Mode / Shared entities / Same source / Shared topic / What happened next
Linked by a graph relationship (Cloudflare released Code Mode); both cover Cloudflare, LLM, MCP, SDK; cite the same source (Code Mode for MCP).
Cloudflare released Code Mode / Shared entities / Same source domain / Shared topic / What happened next
Linked by a graph relationship (Cloudflare released Code Mode); both cover Code Mode, Instead, LLM, MCP; reported by the same outlet (blog.cloudflare.com).
Cloudflare released Code Mode / Shared entities / Same source / Shared topic / What happened next
Linked by a graph relationship (Cloudflare released Code Mode); both cover Cloudflare, MCP; cite the same source (Code Mode for MCP).
Cloudflare released Code Mode / Shared entities / Same source domain / Shared topic / What happened next
Linked by a graph relationship (Cloudflare released Code Mode); both cover Cloudflare, Code Mode, Instead, LLM; reported by the same outlet (blog.cloudflare.com).
Linked by a graph relationship (Cloudflare released Code Mode); both cover Cloudflare, MCP, SDKs, TypeScript; reported by the same outlet (blog.cloudflare.com).
Cloudflare supports MCP / Shared entities / Shared topic / Earlier coverage / Tension
Linked by a graph relationship (Cloudflare supports MCP); both cover Instead, LLM, MCP; overlapping topics (code, server, token).
Cloudflare supports MCP / Shared entities / Shared topic / What happened next
Linked by a graph relationship (Cloudflare supports MCP); both cover MCP, SDK, TypeScript SDK; overlapping topics (call, model, server).
Linked by a graph relationship (Cloudflare supports MCP); both cover MCP, SDKs, TypeScript; overlapping topics (call, model, server).