mcp-compressor
A proxy compresses the tool descriptions of a large MCP server so the model spends context only on the calls it needs.
- 142 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Passes every call of the connected MCP servers through itself, including OAuth tokens and data responses.
Install
- Works in
Manual install
pip install mcp-compressorInstalls the CLI and the Python SDK. Start a proxy with `mcp-compressor -c medium -- python server.py`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Passes every call of the connected MCP servers through itself, including OAuth tokens and data responses.
This is third-party code. Review the repository files before installing.
What it does
mcp-compressor sits between an MCP client and servers that expose dozens of tools. Instead of the full list of schemas the client sees two wrapper tools: `get_tool_schema` and `invoke_tool`. At compression level `max` a `list_tools` is added. The model picks a tool by its short name, requests the full schema and then calls it. The levels `low`, `medium`, `high` and `max` set the compression, from full descriptions to bare names. A proxy starts like `mcp-compressor -c medium -- python server.py`. A code mode also exists: the proxy generates shell commands and Python or TypeScript functions, and the `--shrinkfit` flag bounds response size.
Who it is for. Anyone connecting large MCP servers such as Atlassian to an agent and watching tool descriptions eat the context before the first task.
Good fit when
- One server exposes a hundred tools and their schemas take thousands of tokens in every request.
- Several MCP servers are connected to an agent and the context is already full.
- Tool responses are too long and should be truncated with a way to recover the original.
- A Python, TypeScript or Rust app must embed compression through `CompressorClient`.
Not a fit when
- The server has five tools: compression gains will not cover the extra schema request step.
- The server accepts only the modern protocol version without `initialize`.
- The model must see every tool description at once to choose between close ones.
Example request
Connect Atlassian MCP through mcp-compressor at the `medium` level and show how many tokens the tool list takes.MCP
- Transport
- stdio, http
- Authentication
- not required
Limitations
Every call becomes two-step: schema first, then the call, so on very simple tasks compression does not pay off. Servers behind the proxy must support the legacy `initialize`; servers with only the modern protocol version do not fit. Tool catalogs stay static for the connection and change subscriptions are not supported. For servers with OAuth the proxy opens a browser to sign in. Generated clients talk to the local proxy with a session token.
How to disable. Put the original backend server command back into the MCP configuration instead of `mcp-compressor`. Remove the package with `pip uninstall mcp-compressor`.
FAQ
How do I install mcp-compressor?
Run `pip install mcp-compressor`. The Rust binary installs with `cargo install mcp-compressor`, the TypeScript package with `npm install @atlassian/mcp-compressor`.
Which compression level should I pick?
Start with `medium`: it keeps the name and the first sentence of the description. `high` drops descriptions and `max` keeps bare names and adds `list_tools`.
Does the model lose tool schemas?
No. On a `get_tool_schema` call the model gets the full description and schema of the chosen tool regardless of the compression level.
What does the --shrinkfit flag do?
It truncates tool responses to 20,000 characters or to a given number, `--shrinkfit=10000`. The full response can be requested back with `full=true`.
Can I embed compression in an app?
Yes. Python, TypeScript and Rust have SDKs with `CompressorClient`: it starts a local proxy and calls tools from code.
Discussion
No questions or reviews yet.
Related
MCP serversA CLI for any MCP server: list and call tools, resources and prompts, run mock and proxy modes, guard access and manage agent configs
An MCP bridge: a single run_python tool runs code in a container and calls your MCP servers
An Open WebUI proxy that exposes any MCP server as an HTTP API with an OpenAPI schema
A universal MCP CLI client from Apify: persistent sessions, OAuth, JSON output for scripts and shell access to any MCP server for agents
A zero-dependency Python CLI: one catalog of MCP servers and skills for every agent, with only a compact index in context
toolism measures tokens spent on tool and MCP definitions and trims them without changing which calls are valid.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| mcp-compressor (this card) | no | not required | 142 | |
| mcp-proxy | no | not required | 2,823 | bridges MCP transports; mcp-compressor keeps the transport and shortens the tool list |
| Token Optimizer MCP | no | not required | 578 | compresses and caches context through Claude hooks; mcp-compressor works only on MCP tool descriptions |
README in short
The project comes from Atlassian Labs and the documentation includes an Atlassian MCP example with OAuth sign-in. Besides the proxy it ships as SDKs for Python, TypeScript and Rust with a matching `CompressorClient`.