The video critiques the Model Context Protocol (MCP) for its inefficient design that overloads AI model contexts, praising Anthropic for acknowledging these flaws and proposing code execution as a more efficient alternative for interacting with MCP servers. While code execution improves performance, security, and state management, the video highlights the complexity it introduces and stresses the need for experienced software engineers to refine MCP, cautioning against overreliance on AI researchers alone to develop developer tools.
The video critiques the Model Context Protocol (MCP), highlighting it as an example of an AI bubble where many companies build observability tools around MCP, but few create genuinely useful products with it. The speaker recalls similar patterns from the Web3 boom, where tool layers proliferated without substantial end-user applications. They emphasize that while the MCP specification and implementations are flawed, the biggest issue lies in how AI models struggle to effectively use MCP due to excessive context loading, which degrades model performance. The video praises Anthropic, the creators of MCP, for recently acknowledging these shortcomings and proposing code execution as a more efficient way for agents to interact with MCP servers.
Anthropic’s new approach involves treating MCP servers as code APIs rather than relying on direct tool calls that overload the model’s context window. The traditional MCP method requires loading all tool definitions and passing intermediate results through the model, which consumes vast amounts of tokens, slows down processing, and increases costs. This inefficiency is exacerbated when agents connect to hundreds or thousands of tools, leading to bloated context windows and degraded model intelligence. By contrast, writing code to interact with MCP servers allows agents to load only the necessary tools on demand, process data within a sandboxed execution environment, and return concise results, dramatically reducing token usage and improving performance.
The video also discusses the practical benefits of code execution with MCP, such as improved context efficiency, security, and state management. Code execution enables agents to filter and transform large datasets before passing results to the model, avoiding the costly and error-prone process of shuttling massive amounts of data through the model’s context. Additionally, sensitive data can be tokenized and kept out of the model’s context entirely, enhancing privacy. State persistence is simplified because code can maintain state in memory or files outside the model’s context, avoiding the stateless limitations of language models. These advantages make code execution a far superior approach to the original MCP design.
Despite these improvements, the video criticizes the complexity and operational overhead introduced by running agent-generated code securely, noting that sandboxing, resource limits, and monitoring are necessary. The speaker recommends Daytona as a reliable platform for safely executing AI-generated code, praising its ease of use and security features. However, they remain skeptical of MCP’s foundational protocol, arguing that it lacks essential features like proper handshake mechanisms and progressive discovery, forcing developers to build multiple layers on top of MCP to make it usable. This leads to frustration and inefficiency, especially when non-developer AI researchers design APIs without sufficient software engineering expertise.
In conclusion, the video asserts that MCP’s current state exemplifies the pitfalls of letting AI researchers design developer tools without enough input from experienced software engineers. While code execution with MCP offers a promising path forward, the original protocol’s design flaws and token inefficiencies make it impractical for real-world use. The speaker encourages more engineers to contribute to the MCP community to improve the ecosystem and warns against the misconception that AI will replace developers anytime soon. Instead, they argue that developers remain essential to building effective AI tools and infrastructure, as evidenced by the ongoing need to reinvent and fix flawed standards like MCP.
The Anthropic blog post discusses enhancing AI agent efficiency by using code execution with the Model Context Protocol (MCP). The MCP protocol, initially designed to integrate AI agents with external systems, suffers from inefficiencies due to context window overload and excessive token use when handling multiple tool definitions and results.
To address these issues, the post proposes treating MCP servers as code APIs. This allows agents to load only necessary tools, process data within a code execution environment, and dramatically reduce token usage. This approach not only enhances context efficiency but also offers privacy and state management benefits by keeping sensitive data out of the AI model’s context.
The article emphasizes the importance of software engineering practices in refining MCP and encourages the community to share their experiences to further improve the protocol.
For more details, you can read the full article here.