AI Coding Agents
mcp-compressor Review: Shrinking the MCP Tool Catalog Before It Bills You
mcp-compressor is an Atlassian Labs MCP proxy (Rust core, with Python, TypeScript and Rust SDKs) that hides a server’s full tool catalog behind two or three wrapper tools, so the model fetches a schema only for the tool it actually calls. It targets the tool-definition cost layer, which can contribute to fresh input and cache usage on repeated requests. There is no independent benchmark and the README makes no savings claim; the savings you get are whatever your tool catalog was costing.
mcp-compressor (atlassian-labs/mcp-compressor) is an MCP server wrapper from Atlassian Labs that shrinks the tool surface a model sees. A capable MCP server can expose dozens or hundreds of tools, each with a name, description and nested JSON Schema, and that catalog travels with every request. mcp-compressor swaps the catalog for a small set of wrapper tools: the model lists what’s available in compressed form, asks for the full schema of the tool it wants, and invokes it through the proxy. As of November 30, 2026 the project had 145 stars and 15 forks, 6 open issues, an Apache-2.0 license, and a fast release cadence that reached v0.40.2 on November 24, 2026.
At a glance
| Question | Answer |
|---|---|
| What is it? | An MCP server wrapper that exposes a smaller tool catalog and fetches full schemas on demand. |
| What cost does it target? | Repeated input from tool definitions. Optional response capping can also reduce tool-result input. |
| Where does it act? | Between the MCP client and backend, or through a local session proxy for generated clients. |
| How do you try it? | Wrap your backend with the CLI or embed CompressorClient in a Python, TypeScript, or Rust app. |
| Can you recover originals? | The wrapper can fetch a selected tool’s full schema. Capped responses can be retrieved from a temporary file or session cache, depending on the integration. |
| What license is stated? | Apache-2.0. |
| What is its maturity signal? | 145 stars and 6 open issues as of November 30, 2026. |
| When is it a good fit? | Large or multiple MCP catalogs with measurable input overhead. Backends must support legacy initialize. |
What it is and which cost layer it targets
Most token tools in this series compress content: shell output, file reads, history. mcp-compressor targets a quieter line item, the tool schema layer. The README frames the problem directly: a large MCP server can spend thousands or tens of thousands of tokens on tool descriptions alone, models pay context for tools they never call, cost increases for every request that carries the tool list, and stacking multiple MCP servers quickly overwhelms practical context budgets.
Two properties make this layer expensive. First, re-carriage: the tool list is part of every request, so a 15K-token catalog bills 15K tokens per turn, not per session. Second, breadth creep: each MCP server you add multiplies the overhead while the model typically uses a handful of tools. On providers with prompt caching the catalog can be served from cache at a fraction of the fresh-input rate, but it still bills at cache-read rates every turn and at full price whenever the prefix is cold or rewritten. For a deeper look at this layer, see MCP tool definition token cost.
A second, smaller target: bounded tool responses. The --shrinkfit flag (default 20,000 characters, or --shrinkfit=10000) caps backend responses; object responses keep their top-level shape and gain truncation instructions, and the full original is recoverable (private temp file for CLI/Code/Just Bash sessions; full=true via a session cache for MCP callers).
How it works
The proxy sits between your MCP client and the backend server. On tools/list it forwards the request to the backend, receives the full catalog, and answers the client with compact wrapper tools:
Client -> Proxy: tools/list
Proxy -> Backend: tools/list
Backend --> Proxy: all backend tools and schemas
Proxy --> Client: compact wrapper tools
Client -> Proxy: get_tool_schema(tool_name)
Proxy --> Client: full schema for selected tool
Client -> Proxy: invoke_tool(tool_name, input)
Proxy -> Backend: tools/call selected backend tool
The frontend usually exposes only get_tool_schema, invoke_tool, and optionally list_tools at max compression. Compression levels run low, medium, high, max, controlling how much of the catalog remains visible. Looking up a schema adds an MCP call and returns schema text to the client. Measure how often your client repeats that lookup and whether it adds model turns.
Protocol coverage is unusually careful for a small project. The stdio and streamable HTTP frontends accept both legacy initialize clients and modern 2026-07-28 discovery clients (including Python MCP SDK 2.2.0 in auto, legacy or explicit modes). Backends initialize independently and must support legacy initialize; modern-only backends are not supported. Tool-call metadata, result content, annotations, structured content and error flags are preserved. Catalogs are static for each connection and have no dynamic change subscriptions. Modern catalog and resource-read responses carry ttlMs: 0 and private cache scope.
Two usage patterns ship:
- Pattern 1, compressed MCP proxy: any existing MCP client sees the smaller surface. One command wraps a backend.
- Pattern 2, local session proxy for SDKs and generated clients: your Python, TypeScript or Rust app embeds
CompressorClient, which starts a local session proxy (token-authenticated) that generated CLI, Python or TypeScript clients call. No stdio subprocess needed from your app. There is also a Just Bash integration for command-oriented agents, remote streamable HTTP backends, and OAuth for providers with browser authorization.
Install and setup per language
The README’s examples per language:
CLI proxy, wrapping any backend command:
mcp-compressor -c medium -- python server.py
Python:
from mcp_compressor import CompressorClient
with CompressorClient(
servers={"alpha": {"command": "python", "args": ["server.py"]}},
compression_level="medium",
) as proxy:
print([tool.name for tool in proxy.tools])
print(proxy.invoke("echo", {"message": "hello"}))
TypeScript (@atlassian/mcp-compressor):
import { CompressorClient } from "@atlassian/mcp-compressor";
const proxy = await new CompressorClient({
servers: { alpha: { command: "python", args: ["server.py"] } },
compressionLevel: "medium",
}).connect();
Rust:
use mcp_compressor::compression::CompressionLevel;
use mcp_compressor::sdk::{CompressorClient, ServerConfig};
let proxy = CompressorClient::builder()
.server("alpha", ServerConfig::command("python").arg("server.py"))
.compression_level(CompressionLevel::Medium)
.build()
.connect()
.await?;
Generated clients go further: CLI Mode turns a remote server into shell commands (mcp-compressor --cli-mode --server-name atlassian -- https://mcp.atlassian.com/v1/mcp, then atlassian get-accessible-atlassian-resources), and Code Mode generates importable Python or TypeScript functions per tool, so the model writes ordinary code instead of MCP calls. Install the package for your runtime using the project’s installation guide before trying either integration.
Removal depends on the integration: for the proxy pattern, remove the wrapper command and restore the backend server entry in your client’s MCP config; for generated clients, delete the generated directory and config entries.
What it saves
There is no savings claim to audit: the README quotes no percentage, and no independent benchmark exists. The honest calculation is structural: your saving equals the catalog tokens you stop carrying per request, multiplied by turns, at your model’s rate, minus any extra billed input or output from get_tool_schema calls. The compression level you pick sets where on the discoverability-versus-size curve you sit: max hides almost everything behind lookup calls; low keeps a fatter but still trimmed catalog.
The title of closed issue #236 reports that the banner used asymmetric character counts and could show compression above 100%. Compare the banner with the provider’s billed tokens during your trial.
Prompt-cache and extra-turn risk
Tool schemas can sit inside the cacheable prefix, so the benefit of shrinking them depends on which token rates apply. The wrapper workflow shows a get_tool_schema call and an invoke_tool call. Compare lookup frequency and model turns for the tools you use regularly before tuning the level per server. Try a task that calls the same tool several times and another that calls several different tools once. In both cases, check whether the client carries previously fetched schemas in later requests. Retaining a schema can save a fresh lookup, but it also leaves more text in the conversation. That difference can change which compression level is cheaper for a given server.
What the GitHub issues show
Six issues were open as of November 30, 2026. Closed reports include the following.
- Issue #183: fork bomb / infinite process spawn on Linux when installed via uvx (0.15.0+). Closed.
- Issue #238: a similar fork bomb on Linux when installed via npm. Closed.
- Issue #272: OAuth failed for servers advertising RFC 9207 issuer support (such as Cloudflare MCP). Closed.
- Issue #241: pre-initialize custom JSON-RPC requests were not supported in stdio transport. Closed.
- Issue #236: the startup banner’s compression percentages were character-based and could exceed 100%. Closed.
The two Linux process-spawn reports cover different installers. If you trial either path, check that the client starts a single proxy and shuts it down when you close the connection.
A cost example (estimate)
Assumptions, stated: an MCP server exposes 60 tools averaging ~300 tokens of name, description and schema each (18,000 tokens of catalog), a session runs 40 turns, and the model is claude-sonnet-5-5 at $2 per million input tokens (current rates).
- At fresh-input rates, the original catalog costs 18,000 × 40 × $2 per million = $1.44 per session, or $28.80 over 20 weekday sessions.
- If every request carries 600 wrapper tokens and all five 300-token schemas, the compressed catalog costs (600 + 5 × 300) × 40 × $2 per million, or about $0.17 per session.
Both are estimates before any extra model turns or cache discounts.
Who should use it, who should skip it
Try it if you:
- Stack multiple or large MCP servers and the catalog overhead is a visible share of your input bill
- Want generated CLI or code clients so the agent uses tools without ever seeing the catalog
- Build your own agent app in Python, TypeScript or Rust and can embed
CompressorClientdirectly
Skip it if you:
- Run one small MCP server; a 2K-token catalog will not move the bill
- Use a modern-only MCP backend (
2026-07-28discovery without legacyinitialize), which is not supported - Need dynamic tool-change subscriptions; catalogs are static per connection
How to trial it safely
- Measure first: estimate your current catalog cost by summing schema sizes across your MCP servers (many clients can dump the tool list), multiplied by turns per session.
- Wrap one backend at
mediumcompression in a scratch project, and confirm the agent still finds and calls the tools it needs. - Compare provider-billed input totals for a trial period against the baseline, per how to measure coding agent token savings. Ignore the startup banner percentage.
- Tune compression level per server: high-traffic tools can justify a fatter visible surface to skip lookup turns.
- Revert by removing the wrapper command from your MCP config if it does not pay.
Alternatives and next reads
- mcptoon MCP gateway review: a different MCP gateway approach.
- Pare structured MCP dev tools: structured tools that return less output in the first place.
- MCP tool definition token cost: the concept piece behind this post.
- Cheapest LLM APIs for coding agents: where catalog overhead lands in a full cost comparison.
Sources
- atlassian-labs/mcp-compressor repository (GitHub, accessed 2026-11-30)
- mcp-compressor issue #183: fork bomb on Linux via uvx (GitHub, accessed 2026-11-30)
- mcp-compressor issue #272: OAuth fails for RFC 9207 iss servers (GitHub, accessed 2026-11-30)
- mcp-compressor issue #236: startup banner reports >100% compression (GitHub, accessed 2026-11-30)
- Atlassian blog: MCP compression, preventing tool bloat in AI agents (Atlassian, accessed 2026-11-30)
Interactive report
- The Tool Tax: Connecting a tool server can make the very next request bigger, even if the agent never calls it. Follow the cost of the catalog, the search, and the results that come back.
How this note was produced
Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.
mcp-compressor Review: Shrinking the MCP Tool Catalog Before It Bills You. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/mcp-compressor-review/