|
Cloudflare TV

Code Mode: Fit 2,500 API endpoints into 1,000 tokens

Presented by: Léo Arsenin
Originally aired on October 24 @ 2:00 PM - 2:30 PM EDT
MCP promises to be the USB port for AI agents, but every tool consumes tokens. Cloudflare’s API has 2,500 endpoints; exposing them all would eat 1.17 million tokens, exceeding any model’s context window. We built Code Mode, an open source technique that collapses any number of tools into 2 functions and roughly 1,000 tokens, a 99.9% reduction. Agents write JavaScript to query OpenAPI specs and call endpoints on demand inside sandboxed V8 isolates where credentials never touch the model. In this talk, see production numbers from our internal deployment and leave with the SDK to implement this on your own MCP servers today.
English

Transcript (Beta)

background