What Cloudflare's Code Mode is, why it shrinks an entire API into about 1,000 tokens, and how you can start using it today. Press play for the narrated version.
codeMcpServer()Wraps an existing MCP server. Clients see one code tool.
openApiMcpServer()For large APIs. Exposes search + execute over an OpenAPI spec.
No narration file is attached to this page yet. Download the first take from ElevenLabs, then use Load narration MP3 (or drop the file on the player) to hear the voice-over in sync.
One endpoint covers 2,500+ Cloudflare API endpoints in about 1,000 tokens. Sign in with OAuth and pick the permissions, or pass an API token as a bearer token for CI.
https://mcp.cloudflare.com/mcp
In Claude Code, the Cloudflare plugin registers the servers for you:
/plugin marketplace add cloudflare/skills /plugin install cloudflare@cloudflare
On Cloudflare Workers: install the SDK, add a Worker Loader binding, wrap your server with codeMcpServer() (or use openApiMcpServer() for a big OpenAPI spec), then deploy.
npm i @cloudflare/codemode agents @modelcontextprotocol/sdk zod
compatibility_flags = ["nodejs_compat"] [[worker_loaders]] binding = "LOADER"
Cloudflare labels Code Mode experimental, with possible breaking changes. Check the guide for the full server file.
Also: Cloudflare One MCP server portals have had Code Mode on by default since March 26, 2026; append ?codemode=search_and_execute to the portal URL.
Narration generated with ElevenLabs. The code in the third scene is illustrative.