Cloudflare's Code Mode gives agents an entire API in 1,000 tokens, cutting MCP input 99.9%
bibryam · x · 2026-11-28
Cloudflare shipped a new MCP server for its entire API—DNS, Zero Trust, Workers, R2—using Code Mode: just two tools (search and execute) expose every endpoint at a fixed 1,000-token cost.
- Traditional MCP describes each operation as a separate tool, filling the context window as tool count grows
- Code Mode instead has the model write code against a typed SDK, executed safely in a Dynamic Worker Loader sandbox; Anthropic independently explored the same pattern
- For a large API, Code Mode cuts input tokens by 99.9%: an equivalent native MCP server would consume 1.17M tokens, more than the context window of the most advanced frontier models
- A Code Mode SDK is being open-sourced in the Cloudflare Agents SDK; the pattern is also used in agentgateway and Claude Code
More from coding & agent
- How to understand a complex open-source codebase — jackedAJ · 2026-11-28
- Dev says Neon outships Opus 2x-weeks of work in 2 days, calls Opus an over-engineer — zbeyens · 2026-11-28
- User cancels Grok Heavy sub for Hermes Agent, citing granular control over AI stack — Teknium · 2026-11-28
- Cleaning a Mac with Gemini CLI freed 41.2GB, including 21GB of stale antigravity remnants — weskambale · 2026-11-28
- Creator ships an oil-paint AI film with Claude Code + Opus, no graphics engineering needed — CurieuxExplorer · 2026-11-28
- Open-source AI short-drama Skill suite for coding agents hits 3.2K stars — oran_ge · 2026-11-28