Guide · Updated 2026-10-19
MCP context bloat: what fills your context window and how to fix it
MCP context bloat is the tokens that Model Context Protocol servers add to an agent's context window: tool definitions loaded before your first message, plus every tool result afterwards. Fix definitions by loading fewer or on-demand tools. Fix results by cutting each response down to the lines that answer the current question.
What are the two kinds of MCP context bloat?
An MCP server costs context in two separate places, and the fixes differ.
- Tool definitions. When an agent connects to a server it usually puts every tool's name, description and JSON schema into the model's context. That happens on every turn, before you type anything.
- Tool results. Each tool call returns text that is appended to the conversation and re-read on every later turn. A page snapshot, a database dump or a long search result can outweigh all the definitions combined.
How big is the problem in practice?
Independent measurements vary by server, so treat any single number as an example. One October 2026 write-up counted the definitions of six popular servers (95 tools) at 15,950 tokens with OpenAI's o200k_base tokenizer, and found that a single Playwright page snapshot of one Wikipedia article returned 31,565 tokens, about twice all the definitions together. Source: Doccraft, MCP's context problem, measured. Another analysis of ten servers found that about 81 percent of definition tokens were JSON Schema rather than prose descriptions, and that tool count was only a loose predictor of cost. Source: LeanZero.
These are other people's numbers on their setups. Measure your own: most agents show a context breakdown, and the MCP project's client guidance suggests switching strategy once definitions take roughly 1 to 5 percent of the window.
How do you reduce tool definition overhead?
- Disconnect servers you are not using in the current project.
- Use progressive discovery: expose a small search tool and load a full schema only when the model picks that tool. The MCP client best practices describe this pattern.
- Prefer servers with trimmed schemas. Repeated
$defsblocks and long enum descriptions are common waste.
These are client and server side changes. SuperCompress does not shrink tool definitions, so be clear about which problem you actually have.
How do you reduce MCP tool result size?
Results are where compression helps most, because a result is a block of text and only part of it usually answers your question. Options, from simplest to most involved:
- Ask the server for less: filters, limits, pagination, field selection.
- Truncate with a clear marker so the agent knows output was cut and can ask for more.
- Offload the full payload to a file and return a preview plus a handle.
- Compress against the question: keep the original lines that answer what the agent is doing and drop the rest.
The last option is what SuperCompress does. Your agent sends the bulky result and the current question to the hosted Neural Keep model through the compress_context MCP tool or the hooks installed by setup. It keeps matching lines verbatim, so file paths, IDs and error text are not paraphrased. Because it is extractive, a line the model scores as irrelevant is dropped, so check results on your own traces before relying on it.
How do you add SuperCompress to an MCP-based agent?
One command links your account and writes the MCP entry for each coding agent it detects, with hooks where the agent supports them.
npm install -g supercompress-proxy && supercompress setupRun supercompress doctor afterwards for a per-agent health check, and restart the agent so it loads the new server. See the coding agents guide. Each API response reports original_tokens and kept_tokens, so you can see the effect on your own tool calls.
Frequently asked questions
What is MCP context bloat?
It is the context window space used by MCP servers: tool definitions that load before your first prompt, and tool results that accumulate as the agent works. Both are re-read by the model on later turns.
Does SuperCompress reduce MCP tool definition tokens?
No. SuperCompress compresses text blocks such as tool results, logs, file reads and documents. To reduce definition overhead, connect fewer servers or use progressive tool discovery.
Is truncating MCP output enough?
Truncation caps size but does not look at your question, so it can cut the useful part. Question-aware compression keeps the lines that match the task instead of the first or last lines.
How many MCP servers is too many?
There is no fixed number. Cost depends on the schemas, not just the count. Check how much of your context window definitions use at the start of a session.