MCP Code Execution & the Transition to an AI Native Web

Schedule a Consultation
Frank DambraFrank Dambra

2/20/2026

The internet is increasingly moving toward an AI-native infrastructure. Through the Model Context Protocol (MCP), developers can define local or remote endpoints that handle booking flights, communicating with private databases, or posting to a blog. Essentially, MCP can manage anything a conventional API can. The key difference and "upgrade" between MCP and a conventional API is the new AI-client conversational layer.

A common use case for MCP is an AI assistant running within a developer's IDE. For instance, I can create an MCP server that accesses my GitHub commits via a declared tool. Within the AI chat window, I can then direct the model via a prompt to access the tool on the server specified in my configuration file. From there, I can view the confirmation of the MCP server's execution and see the results of the function that looks up my commits.

The advantage of this lies not only in the convenience and time savings, but also in the ability to stay within the context window of that chat. This leads to what will likely be the organic development of these technologies as we transition into a true "Web 3.0": a complete agentic experience when utilizing web technologies. We can even envision every website having an "mcp" route that allows users to make purchases or interact with vendor-specific data without ever needing an external browser or UI. In fact, MCP servers can be programmed to return UI components that run natively in the chat. Instead of returning plain text or JSON, a tool can display a chart, a form, an image viewer, or anything built with HTML and JavaScript.

While these changes are exciting to contemplate, the industry has not quite reached that point. Currently, MCP is mostly used by developers to connect local tools to their IDEs. The jump to "every website on the internet" requires a massive shift in how we perceive web traffic and SEO. Adoption is not yet happening "en masse" because we are in the "infrastructure and trust" phase: the same messy middle ground that web services navigated in the early 2000s.

One of the key hurdles is the "Context Tax." LLMs have a limited attention span, known as a context window. Traditional APIs often return huge blocks of data. If an AI agent hits an MCP route and receives 50KB of JSON, it might "forget" the original user request or exhaust its token limit.

Anthropic Process Diagram

This process diagram from Anthropic illustrates the burden of tool definitions being persisted in the context window.

Developers are currently figuring out how to summarize or "chunk" data specifically for AI, which requires more effort than simply flipping a switch. A major stride in addressing token sizes involves agents writing code to generate the necessary data. This keeps inputs and outputs organized across the server, client, and model layers, reducing token consumption by avoiding the need to persist every tool declaration in the model's context window.

This "Context Tax" is precisely where the most recent engineering breakthroughs are focused. As Anthropic highlights in its recent work on code execution with MCP, the traditional way of handling tools (loading every definition into the context window upfront) simply does not scale. If an agent has access to hundreds of tools across dozens of servers, it could burn through 100,000 tokens before the user even finishes a sentence.

To solve this, the industry is moving toward a "Code-First" approach to MCP. Instead of the model calling a tool directly and receiving a massive JSON blob, the model writes a script (usually in TypeScript or Python) to interact with the MCP server in a sandboxed environment.

This shift introduces three critical improvements to the AI-native web:

1. On-Demand Tool Discovery (Progressive Disclosure)


Rather than being fed every API schema at once, agents can now navigate MCP servers like a file system. An agent can look at a directory of available servers, identify the one it needs (such as a Salesforce or Google Drive MCP server), and only read the specific tool definitions required for the current task. This reduces the initial tax from a mountain of tokens to a lightweight search.

2. Off-Context Data Filtering


The most transformative part of code execution is that data no longer has to pass through the model’s "brain" to be useful. If a user asks to find the three highest-grossing leads in a 10,000-row spreadsheet, a traditional agent would have to ingest every row. With code execution, the agent writes a script to filter that data locally on the MCP server. The model only ever sees the three final names. This is not just a win for token efficiency; it is a massive win for privacy, as sensitive personally identifiable information (PII) can be processed and stripped before it ever hits the LLM’s context.

3. Algorithmic Loops and State Persistence


We are also seeing the rise of "Agentic Skills." By allowing agents to write and save their own code to a local file system, they can create reusable functions. If an agent develops a complex way to bridge data between a legacy SQL database and a modern Slack MCP route, it can save that logic as a "skill." The next time it encounters the task, it does not have to reason through the steps again; it simply runs the code it previously authored.

While we stand in the middle ground between the conception of MCP and its wider standardization, these developments suggest that the future of the web is not just about AI talking to APIs; it is about AI writing the glue code that makes the internet natively agentic.

Organizations looking to take advantage of MCP today can utilize it for a variety of high-impact use cases. In the financial sector, MCP servers can securely bridge AI agents with legacy transaction databases to automate complex auditing or fraud detection without exposing sensitive PII to the model’s context. In industrial and energy sectors, such as oil and gas, MCP allows agents to interface directly with real-time sensor data from remote sites, enabling predictive maintenance schedules or supply chain adjustments through a simple conversational interface.

If you would like to speak to our team about how model context protocol technology might be of use to your organization, please schedule a consultation here.