Europe 2026
MCP = Mega Context Problem - Matt Carey
Overview
This talk addresses the challenge of providing AI agents with access to a vast number of APIs, a problem termed the Mega Context Problem (MCP). Traditional methods like bundling all tools into an agent's context window lead to an explosion of tokens, rendering them unusable. The speaker proposes that instead of dumping tools into context, agents should be empowered to write code against APIs, leveraging typed SDKs and secure execution environments.
Who should watch
- AI Engineers
- Product Managers
- Builders working with AI agents and APIs
- Those facing challenges with large API surfaces for agents
- Developers interested in secure code execution for AI
Key takeaways
- Directly exposing millions of API endpoints as tools to an agent's context window is infeasible due to token limits.
- Splitting APIs into multiple smaller MCP services can lead to incomplete coverage and requires users to select the correct service.
- Agents can interact with APIs by generating code against typed SDKs, which are derived from API specifications.
- Running untrusted code generated by agents is a significant security concern, necessitating secure, isolated execution environments.
- Cloudflare's WorkerD provides a programmable sandbox with guardrails for executing untrusted code safely, allowing fine-grained control over network access and other capabilities.
- The future involves agents writing code as a primary interaction method, supported by infrastructure primitives for secure code execution and progressive discovery of tools.
- MCP is evolving from a protocol for exposing tools to a middleware layer integrated into web frameworks, simplifying API exposure for agents.
- Client-side innovation will focus on programmatic tool calling, enabling saved scripts for recurring tasks and a proliferation of easier-to-build agent clients.
Notable quotes
*We shouldn't be dumping loads of tools into context.*
*Code is actually a very compact plan. Instead of doing tool calls, you can have one tool called code where the model generates the code of your choice and then you run it.*
*Running untrusted code is mega mega scary.*
Unofficial community note. Prefer the recording for nuance.