Cloudflare has launched a new MCP server powered by Code Mode that dramatically reduces token usage when AI agents interact with large APIs. Instead of exposing thousands of endpoint definitions as separate tools, Code Mode exposes just two tools — search() and execute() — backed by a type-aware SDK that lets LLMs generate and run JavaScript inside a secure V8 isolate. This reduces the token footprint for interacting with 2,500+ Cloudflare API endpoints from over 1.17 million tokens to roughly 1,000 tokens (a ~99.9% reduction). The approach enables multi-API orchestration, handles pagination and chained calls in a single cycle, and runs in a sandboxed Dynamic Worker isolate with no file system or exposed environment variables. Cloudflare also open-sourced a Code Mode SDK within its Agents SDK for third-party MCP implementations.
Sort: