Code Mode cuts MCP token usage 99.9%: Cloudflare drops from 1.17M tokens to 1,000
jasonkneen · x · 2026-11-22
A viral thread argues MCP is effectively done, replaced by "Code Mode," which achieves the same results with 99.9% fewer tokens — Cloudflare cut MCP token consumption from 1.17M to just 1,000.
The difference:
- Normal MCP: the AI loads every tool definition up front, calls one, waits, reads the result, then calls the next — each step fills up its context window.
- Code Mode: the AI gets only 2 tools —
- Search tool: it writes a bit of code to search the API, and only matching functions come back;
- Execute tool: it writes code using those functions and sends it to a sandbox for execution, with the user seeing only final results.
The core idea: have the model write code to call APIs instead of loading tool schemas one by one, slashing token and context overhead.
More from coding & agent
- levelsio declares "MCP is dead": agents are smart enough to just use APIs — zeeg · 2026-11-22
- Formalizing 1,826 tax types across 195 countries in a single Lean equation — SnooPeripherals5313 · 2026-11-22
- A game studio 3D scene built entirely from 4,903 lines of code — techartist_ · 2026-11-22
- Antigravity harness pushes Gemini to #1 on coding agent index with huge SWE-sweep jump — rseroter · 2026-11-22
- Open-source AI video editor Scarlet adds Gemini support, frame annotation and lip-sync fixes — MatthewBerman · 2026-11-22
- Harrison Chase: buying Copilot won't transform teams without a knowledge factory — hwchase17 · 2026-11-22