I recently came across a video in which a creator raised an interesting question: Is MCP becoming obsolete with the rise of Code Mode?
It is worth examining this question carefully, because MCP and Code Mode do not necessarily solve the same problem.
1. MCP: interoperability between systems
The Model Context Protocol (MCP) provides a standard way for AI applications to connect to external tools, data sources, and services.
It addresses an important architectural challenge: how can an AI agent interact with different systems through a common interface?
MCP is not disappearing. Anthropic donated the protocol to the Agentic AI Foundation, hosted by the Linux Foundation, in December 2025.
2. Code Mode: a different way to orchestrate execution
Code Mode introduces another approach.
Instead of asking the model to select and invoke tools one by one, the model can write code that combines several operations into a single execution flow.
This can reduce unnecessary LLM round trips and avoid repeatedly loading large tool definitions.
Anthropic has also introduced Tool Search, which allows tools to be discovered and loaded on demand. In specific scenarios, Anthropic reports a reduction of more than 85% in tokens used for tool definitions.
That is a significant optimization — but it does not mean MCP and Code Mode are interchangeable.
3. Two different responsibilities
I see an important distinction:
- MCP is an interoperability protocol. It standardizes how systems expose and consume capabilities.
- Code Mode is an orchestration and execution approach. It allows the model to compose operations through code.
One focuses on connectivity; the other focuses on how operations are composed and executed.
They can therefore be complementary rather than competing technologies. Code Mode can even be exposed through an MCP interface.
4. The security question we should not overlook
Giving an AI model the ability to generate and execute code introduces additional risks:
- Code or prompt injection
- Unauthorized access to resources
- Exposure of credentials and sensitive data
- Excessive permissions
- Unrestricted network access
A sandbox is an important security layer, but it is not sufficient on its own.
Execution also needs least-privilege permissions, network restrictions, secret isolation, input validation, and appropriate monitoring.
My takeaway
The question is not simply whether Code Mode will replace MCP.
The more useful question is:
How do we combine interoperability, efficient orchestration, and controlled execution to build reliable AI agent architectures?
For me, the real challenge is not just giving agents more capabilities. It is controlling what they can execute, where they can execute it, and with which permissions.
Top comments (0)