mcp-compressor MCP Server
Rust-backed experimental Python package for mcp-compressor.
mcp-compressor scores 48 (Fair), licensed Apache-2.0 and written in Rust. It installs as a local process. It does not declare tools yet. Filed under Uncategorized. GitHub shows 145 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
48 of 100 from six public signals. Nobody can buy a point.
- OSI-style license: apache-2.0.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 48 comes from
0 + 20 + 7 + 10 + 4 + 7 = 48. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 0 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "atlassian-labs-mcp-compressor": { "command": "uvx", "args": [ "mcp-compressor" ] } }}
Environment variables
This server does not declare environment variables.
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
mcp-compressor
mcp-compressor helps agents use large MCP servers without spending huge amounts of context on tool descriptions and schemas.
It can run as a CLI MCP proxy, or be embedded directly from Python, TypeScript, or Rust.
- Documentation: https://atlassian-labs.github.io/mcp-compressor/
- Repository: https://github.com/atlassian-labs/mcp-compressor/
- Blog: https://www.atlassian.com/blog/developer/mcp-compression-preventing-tool-bloat-in-ai-agents/
Why mcp-compressor?
A powerful MCP server can expose dozens or hundreds of tools. Each tool has a name, description, input schema, and sometimes large nested JSON Schema details. Sending all of that to a model up front can waste thousands of tokens before the agent has done any useful work.
For example, large public MCP servers can spend thousands or tens of thousands of tokens on tool descriptions alone. That creates three problems:
- models spend context on tools they may never call,
- cost increases for every request that carries the tool list,
- adding multiple MCP servers quickly overwhelms practical context budgets.
mcp-compressor changes the interaction pattern: the model sees a small compressed surface first, asks for the full schema only for the selected tool, and then invokes that tool.
Opt into bounded tool responses in any proxy mode with --shrinkfit (20,000
characters) or --shrinkfit=10000. Object responses retain their top-level shape
and add truncation instructions. CLI/Code/Just Bash sessions save the full
original in a private temporary file; MCP callers can recall with full=true
using a session cache or bypassing shrinking on a backend call. See
recoverable response shrinking.
Pattern 1: compressed MCP proxy
Use this when you want any MCP client to see a smaller tool surface.
sequenceDiagram
participant Client as MCP client / agent
participant Proxy as mcp-compressor
participant Backend as Backend MCP server
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
Backend-->>Proxy: tool result
Proxy-->>Client: result
The frontend usually exposes only:
get_tool_schemainvoke_tool- optionally
list_toolsatmaxcompression
MCP protocol negotiation
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 2026-07-28 mode. Backend connections initialize
independently, so modern clients can use legacy backends without sending
frontend negotiation metadata to them. Backends must support legacy initialize;
modern-only backends are not supported. Application tool-call metadata and tool
result content, annotations, structured content, and error flags are preserved.
Modern catalog and resource-read responses use ttlMs: 0 and private cache
scope. Catalogs remain static for the connection; dynamic change subscriptions
are not advertised or supported. Legacy responses omit modern protocol fields.
Pattern 2: local proxy for SDKs and generated clients
Use this when your application wants to embed compression directly and call tools from code or shell commands.
flowchart LR
App[Python / TypeScript / Rust app]
SDK[CompressorClient]
Proxy[Local session proxy\n/token auth]
Generated[Generated CLI / Python / TS clients]
Backend[MCP backend servers]
App --> SDK
SDK --> Proxy
Generated --> Proxy
Proxy --> Backend
The SDK starts a local session proxy for generated clients. Generated clients call that proxy using a session token. Your app does not need to spawn a mcp-compressor stdio subprocess.
Features
- Compressed MCP proxy for existing MCP clients.
- Compression levels:
low,medium,high,max. - Python, TypeScript, and Rust SDKs with aligned
CompressorClientAPIs. - Local TypeScript tool compression for AI SDK-style in-process tools.
- CLI Mode and Code Mode generated clients: shell commands plus Python/TypeScript functions.
- Just Bash integration for command-oriented agents.
- Remote streamable HTTP MCP backends.
- OAuth support for providers that support browser authorization.
- Tool filters and TOON output to further reduce context.
- Atlassian MCP example with OAuth-first usage.
Quick example
=== "CLI"
```bash
mcp-compressor -c medium -- python server.py
```
=== "Python"
```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"
```ts
import { CompressorClient } from "@atlassian/mcp-compressor";
const proxy = await new CompressorClient({
servers: { alpha: { command: "python", args: ["server.py"] } },
compressionLevel: "medium",
}).connect();
try {
console.log(proxy.tools.map((tool) => tool.name));
console.log(await proxy.invoke("echo", { message: "hello" }));
} finally {
proxy.close();
}
```
=== "Rust"
```rust
use mcp_compressor::compression::CompressionLevel;
use mcp_compressor::sdk::{CompressorClient, ServerConfig};
use serde_json::json;
let proxy = CompressorClient::builder()
.server("alpha", ServerConfig::command("python").arg("server.py"))
.compression_level(CompressionLevel::Medium)
.build()
.connect()
.await?;
let result = proxy.invoke("echo", json!({ "message": "hello" })).await?;
```
Generated clients
CLI Mode generates shell commands:
mcp-compressor --cli-mode --server-name atlassian -- https://mcp.atlassian.com/v1/mcp
atlassian get-accessible-atlassian-resources
Code Mode generates Python or TypeScript functions:
# generated-py/atlassian.py
import atlassian
resources = atlassian.get_accessible_atlassian_resources()
import { getAccessibleAtlassianResources } from "./generated-ts/atlassian.ts";
const resources = await getAccessibleAtlassianResources();
See Code Mode and generated clients for more detail.
Where to go next
- Install the package you need.
- Run the quickstart.
- Read how compression works.
- Choose between CLI usage, SDK usage, generated clients, and Just Bash.
Frequently asked questions
What is mcp-compressor MCP Server?
Rust-backed experimental Python package for mcp-compressor.
How do I install mcp-compressor MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. mcp-compressor MCP Server runs locally from the PyPI package mcp-compressor with the command uvx mcp-compressor.
Is mcp-compressor MCP Server free and open source?
Yes. mcp-compressor MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does mcp-compressor MCP Server support remote (HTTP) connections?
No remote endpoint is listed for mcp-compressor MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is mcp-compressor MCP Server's trust score calculated?
mcp-compressor MCP Server scores 48 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.