← back

MCP = Mega Context Problem - Matt Carey

20.6K views · Apr 25, 2026 · 22:41 min · Watch on YouTube ↗
Takeaway

Treat MCP tool catalogs as a retrieval problem, not a dump — load only the relevant tools per turn to keep context usable.

Summary

  • Cloudflare's Matt Carey diagnoses MCP's scaling failure: exposing entire API surfaces (~1.2M tokens) blows the agent's context window.
  • Walks through the evolution from bundled tools to shared remote MCP servers and explains why naive tool-explosion breaks agents.
  • Proposes patterns like progressive disclosure, tool search, and dynamic tool loading so agents only see relevant tools per task.
  • Cloudflare's approach lets developers expose huge API surfaces as MCP without dumping every tool definition into the agent prompt.
mcpagentscloudflare
Original description
The best MCP server is the one you didn't have to build.

At Cloudflare we have a lot of products. Our REST OpenAPI spec is over 2.3 million tokens. When teams started building MCP servers, they did what everyone does: cherry-picked important endpoints for their product, wrote some tool definitions and shipped a separate service that covered a small fraction of their API.

This was driven by a fundamental context limit of the end users' agent. And tools use a bunch of context just to describe themselves. MCP felt like a Mega Context Problem (and a separate service to maintain).

I think we got it all wrong.

The context limit is not an MCP problem. It's an agent problem. Tools should probably be discovered on demand and clients are coming around to this. But maybe we can also do it on the server?

CLIs get this for free, self-discoverable and documented by design. APIs just need a little help.

This talk will cover some of the techniques we've been exploring at Cloudflare, such as codemode and tool search, to make complete APIs accessible to agents through MCP.

I'll also cover some of the work we are doing with the MCP Typescript SDK to make stateless servers the default.

Speaker info:
- https://github.com/mattzcarey
- https://www.linkedin.com/in/mattzcarey/
- https://x.com/mattzcarey