# mcp-compressor

A wrapper for large MCP servers that shows an AI agent a small compressed set of tools up front, fetching a tool's full schema only when the agent actually selects it.

mcp-compressor reduces the context tokens an AI agent spends on tool descriptions and schemas when it connects to a large MCP server that exposes dozens or hundreds of tools. Instead of sending every tool's name, description, and full input schema up front, which can cost thousands of tokens before an agent does any useful work, it shows a compressed tool surface first, then returns a tool's full schema only when the agent asks for it before invoking it.

It supports two patterns: running as a standalone CLI MCP proxy that any MCP client can point at to see a smaller tool surface, and embedding compression directly into an application through Python, TypeScript, or Rust SDKs with matching client APIs, including generated CLI, Python, and TypeScript clients that call a local session proxy over a token-authenticated connection.

Compression can be tuned across low, medium, high, and max levels, and it supports remote streamable HTTP MCP backends and OAuth for providers that support browser authorization.

Website: https://github.com/atlassian-labs/mcp-compressor
