MCP as you know it is cooked.
@Cloudflare just showed you can give an agent their entire API, 2,500+ endpoints, in about 1,000 tokens.
The old way: every endpoint becomes its own MCP tool. Load all 2,594 and the tool definitions alone eat around 1.17 million tokens, more than most models' entire context window.
Code Mode flips it:
- The server exposes just 2 tools, search() and execute()
- The agent writes JavaScript to search the API spec and find what it needs
- Then it writes one script that chains the calls together
- That code runs in an isolated sandbox, and only the result comes back
Same access. 99.9% fewer tokens.
Anthropic explored the same pattern with code execution and programmatic tool calling for Claude.
The future of agent tools is less tool calling and more code writing.
@suraj_sharma14