compress_textLABSCO SUMMARY
Deletes words, never rewrites them.
A summarizer produces new text you then have to trust; this removes tokens and leaves the rest in place, which is why it can be pointed at logs, issue threads and research dumps without changing what they say. The refusal list is the good part of the design — diffs, lockfiles, SQL and .env files are declined rather than mangled, and auto mode leaves code intact while squeezing the comments around it.
What it is
An MCP adapter over ContextCrumb, a compressor that works word by word rather than by rewriting. It is not a summarizer — surviving text stays in source order with expendable tokens removed, so names, actions, constraints and sequence stay put while filler goes.
What you get
- Compress inline text with a keep-probability
threshold, or a fixedtarget_keep_ratiowhen the budget rather than the cutoff is the constraint —compress_text - Compress a file on the machine running the server, with
encodingand the same threshold controls —compress_file - Code-aware handling in
automode: executable code is preserved exactly and only comments and docstrings are compressed, for Python, JavaScript, TypeScript, JSX, TSX, Go and Rust content_modeto choose the behaviour yourself —auto,prose,code-comments,raworrefuse- A refusal path for syntax-sensitive files — diffs, structured configs, lockfiles, SQL and
.env— unless you passforce return_tokensto see which tokens were kept and which were dropped- A separate proxy,
contextcrumb-shrink, that compresses verbose catalog descriptions before an agent reads them while passing tool names, schemas, calls and results through unchanged
Requirements
Python >=3.10 and the MCP extra: pip install "contextcrumb[mcp]", or run it with no install at all via uvx --from "contextcrumb[mcp]" contextcrumb-mcp — which is exactly what the documented client entry does. compress_file reads paths on the server's machine, not the client's. For repeated calls, start contextcrumb service start --allow-root . and add --use-service so each server process is not loading its own model.
Setup effort
One command — pip install "contextcrumb[mcp]"
USE CASES
Reading a long file without flooding the context
Compress the file first and hand the model the shorter version.
Working to a fixed token budget
Set a keep ratio instead of a threshold when the budget is what matters.
Compressing a source file safely
Leave the executable code untouched and squeeze only the comments and docstrings.
Cutting bloated tool descriptions
Put the shrink proxy in front of a verbose server so long catalog text never reaches the model.
Checking what got dropped
Ask for the token decisions alongside the output when the compression looks too aggressive.
2 tools
Listed in project docs. Your client may show a different list.
compress_fileBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
{
"mcpServers": {
"contextcrumb": {
"command": "uvx",
"args": [
"--from",
"contextcrumb[mcp]",
"contextcrumb-mcp"
]
}
}
}pip
pip install "contextcrumb[mcp]"