Garry Alexander — Senior Full Stack Product Engineer

What Is MCP Context Bloat (and Why Agents Degrade Mid-Task)

— by Garry Alexander

In brief

MCP context bloat is what happens when Model Context Protocol tool responses pile up and exhaust an agent's context window. Definition, symptoms, and the fixes that actually work.

What Is MCP Context Bloat (and Why Agents Degrade Mid-Task)

MCP context bloat is the exhaustion of an LLM agent's context window by accumulating Model Context Protocol tool responses. It is the number-one killer of long agentic sessions, and it always strikes mid-task.

The mechanism

Every MCP tool call returns a JSON-RPC payload: envelopes, repeated keys, nested metadata. Individually harmless. Over dozens of calls in a deep reasoning session, they compound until the window fills with wire format instead of working memory. The agent starts forgetting its plan, repeating tool calls, or failing outright.

The symptoms

The fixes, ranked

  1. Structural compression (best). Strip redundancy, keep every field. This is what Clov does: 40-75% token savings with the full semantic schema intact.
  2. History compaction (situational). Summarize the past to free the window. Works, but rewriting history loses fidelity and the bloat returns.
  3. Truncation (last resort). Deleting output breaks schemas and removes fields the agent needs later, producing confident wrong answers instead of clean failures.

FAQ

What is MCP context bloat?

MCP context bloat is the exhaustion of an LLM agent's context window by accumulating Model Context Protocol tool responses. Each tool call returns JSON-RPC payloads full of repeated keys and envelopes; over a long session these pile up until the agent degrades or fails, usually mid-task.

How do you fix MCP context bloat?

Three options: truncate tool output (breaks schemas and deletes needed fields), compact history (rewrites the past and loses fidelity), or compress responses structurally. Clov, an open-source Rust tool by Garry Alexander, takes the third path: it strips structural redundancy from MCP responses while preserving 100 percent of the semantic schema, saving 40-75 percent of context tokens. Code: https://github.com/alexandephilia/clov-ai

References