Code Mode: the better way to use MCP
It turns out we've all been using MCP wrong. Most agents today use MCP by exposing the "tools" directly to the LLM. We tried something different: Convert the MCP tools into a TypeScript API, and then ask an LLM to write code that calls that API. The results are striking.
It turns out we've all been using MCP wrong. Most agents today use MCP by directly exposing the "tools" to the LLM . We tried something different: Convert the MCP tools into a TypeScript API, and then ask an LLM to write code that calls that API. The results are striking: We found agents are able to handle many more tools, and more complex tools, when those tools are presented as a TypeScript API rather than directly. Perhaps this is because LLMs have an enormous amount of real-world TypeScript in their training set, but only a small set of contrived examples of tool calls. The approach really
Explore this link on the map →related reading
- Code execution with MCP: building more efficient AI agents \ Anthropicanthropic.com
- A Guide to Claude Code 2.0 and getting better at using coding agents – sankalp's blogsankalp.bearblog.dev
- Introducing Model Context Protocol (MCP) | Glamaglama.ai
- Arjun Virkarjunvirk.com
- MCP Is Broken and Anthropic Just Admitted It | by Cordero Core | Mediummedium.com
- LLM Powered Autonomous Agents | Lil'Loglilianweng.github.io
- A Deep Dive Into MCP and the Future of AI Tooling | Andreessen Horowitza16z.com
- Designing agentic loopssimonwillison.net
- What if you don't need MCP at all?mariozechner.at
- Turbo MCPmcp.run
- 2025: The year in LLMssimonwillison.net
- LLM Function-Calling vs. Model Context Protocol (MCP)gentoro.com