Code Mode: give agents an entire API in 1,000 tokens
Feb 20, 2026Matt Carey

Summary
Introduced a new Model Context Protocol (MCP) server for the entire Cloudflare API that leverages 'Code Mode' to significantly reduce token usage. This server provides access to over 2,500 API endpoints through just two tools, `search()` and `execute()`, enabling AI agents to interact with Cloudflare services efficiently. Also open-sourced a Code Mode SDK for developers to implement similar patterns.
More from the Artificial Intelligence Integration & Impact trail
- Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Introducing Web Search API via AI Gateway
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform
- One year later: Sovereign AI and the fight for choice
- AI Search is now generally available