Context Crumb
About
Compresses long files, prompt inputs, and MCP catalog descriptions into denser context for LLM agents while preserving the useful signal.
Details
- Author
- yuchen20
- Categories
- Productivity, AI, Other
Jump to
Setup
Install Context Crumb in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/yuchen20/Context-Crumb
Follow the installation instructions in the repository README, then restart your MCP client.
Shake the crumbs out of bloated context.
Before / After-Quickstart-Playground-Install-CLI-Agent + MCP-Model
LLM context gets messy fast: notes, logs, issue threads, docs, research dumps, and tool descriptions all pile up until the useful signal is buried under filler.
ContextCrumbis a token-level compressor for LLM and agent workflows. It looks at text word by word and removes low-signal tokens while keeping the surviving text in the original order.
That is the idea behind the name: the context is still there, but the loose crumbs are shaken off before they reach your model. Less bloat in the prompt. More room for the parts that matter. Less wasted usage when Codex, Claude Code, or another agent processes long files repeatedly.
No install needed. Paste text, compare the kept context, and see what gets shaken off.
ContextCrumb is not a summarizer. It does not rewrite your document into a new explanation. It keeps the source sequence and deletes expendable words. This example usestarget_keep_ratio=0.72.
Agents spend context on notes, logs, tickets, docs, and tool descriptions. Those files contain useful facts, but they also carry filler phrases and repeated wording. ContextCrumb compresses the text before it reaches the model. It keeps the original order, removes low-value tokens, and leaves a shorter version with the names, actions, constraints, and sequence still intact.
Agents spend context notes, logs, tickets, docs tool descriptions. Those files useful facts, carry filler phrases repeated wording. ContextCrumb compresses text before reaches model. keeps original order, removes low-value tokens, leaves shorter version names, actions, constraints sequence intact.
Same order. Less padding. More room for the next file. On prose-heavy agent inputs, ContextCrumb often saves around30-70% of the contextdepending on how aggressively you compress and how much filler is in the source.
Assume your agent reads 8k-token notes, logs, tickets, research dumps, or docs before answering. This helps with API token bills, but also with subscription-based coding agents where heavy context reads can burn through usage faster.
The bigger win is usually not only the bill. It is keeping long-running agents from filling their context, turns, and subscription usage with words they did not need to carry in the first place.
Teach your agent a small habit: compress the bloat before it enters context. ContextCrumb is meant to sit in the background as a skill, stepping in whenever a long note, doc, issue thread, research dump, or log would otherwise flood the context window and eat into your Codex or Claude Code usage.
- Select the agent you want to install it on.
The skill tells your agent when to compress text, how to preserve the useful sequence, when supported code can be loaded with comment/docstring compression, and when exact raw text is required for configs, direct quotes, or exact edits.
- Use ContextCrumb to compress long files instead of dropping the whole thing into context.
Use ContextCrumb to compress this long project note before you work from it.
- Voila: every long note, log, ticket, research dump, or doc enters context already trimmed, saving tokens and preserving more of your agent subscription for the work that matters.
Best fit: docs, notes, issue threads, logs, research context, other natural-language files, and supported source files where only comments/docstrings should be shortened. For exact code edits or exact comments, read the raw source.
pip install "contextcrumb[mcp]" pip install "contextcrumb[serve]" pip install "contextcrumb[torch]"
ContextCrumb uses the ONNX backend by default, so normal users do not need PyTorch or Transformers installed. Model files are cached locally after the first download.
The main agent-friendly command isload:
It prints only compressed text by default, which makes it easy for agents, hooks, shell scripts, and prompt pipelines to capture stdout and move on. For subscription tools like Codex or Claude Code, that means fewer bulky file reads before the agent gets to the useful part.
contextcrumb load notes.txt --json contextcrumb load notes.txt --receipt contextcrumb config set compression.content_mode auto contextcrumb diff notes.txt contextcrumb inspect notes.txt contextcrumb stats
--receiptleaves compressed text on stdout and writes a compact savings receipt to stderr. ContextCrumb usescompression.content_mode = "auto"by default: prose files are compressed normally, while supported code files use a code-aware path that preserves executable source exactly and compresses only comments/docstrings. Unsupported syntax-sensitive files such as diffs, configs, lockfiles, SQL, and.envfiles are still refused unless you pass--force; forced output is only for exploratory reading, not exact edits or copy-paste commands.
Persistent defaults live in user config and can be changed from the CLI:
contextcrumb config show contextcrumb config set compression.content_mode code-comments contextcrumb config set code.comment_target_keep_ratio 0.55 contextcrumb config unset compression.content_mode
Initial code-aware languages: Python, JavaScript, TypeScript, JSX, TSX, Go, and Rust.
ContextCrumb includes an optional MCP stdio adapter for agent clients that can run Python tools throughuvx.
pip install "contextcrumb[mcp]"
{ "mcpServers": { "contextcrumb": { "command": "uvx", "args": [ "--from", "contextcrumb[mcp]", "contextcrumb-mcp" ] } } }
ContextCrumb also shipscontextcrumb-shrink, an MCP proxy that compresses verbose catalog descriptions before an agent sees them while forwarding tool names, schemas, calls, results, and resource contents unchanged. This is useful when an agent client repeatedly spends context and subscription usage just looking at long tool descriptions.
Model weights and a hosted demo are public on Hugging Face:
- Model:ymao20/contextcrumb-32m
- Playground:contextcrumb-32m-demo
- Public docs for advanced compression modes and service deployment.
- JavaScript or TypeScript client.
- Hosted API experiments.
- npm publishing.
uv pip install --python .\.venv\Scripts\python.exe -e ".[dev,mcp]" .\.venv\Scripts\python.exe -m pytest .\.venv\Scripts\python.exe -m build
Release notes are tracked inCHANGELOG.md.
A fast, multilingual spell-checker for Large Language Models.
Persistent memory for any AI assistant. Zero token cost until recall. Stores memories in local SQLite, ranks by 6-factor scoring, returns results 79% smaller than JSON. Works with Claude, ChatGPT, Grok, Cursor, Windsurf, and any MCP client.
Automated document processing and extraction
Convert files (DOCX, XLSX, PPTX, images), HTML, and Markdown to pixel-perfect PDFs — npx stdio or hosted Streamable HTTP, free API key in one click.
An MCP server which brings Jotform to your AI client or LLM
Connect with 10,000+ tools across HRIS, ATS, CRM, Accounting, Calendar, Meeting, Ticketing, and more categories.
Transform your scattered documentation into AI-ready knowledge that works seamlessly with Claude, Cursor, VS Code, and other AI tools.
Official Notion MCP server for searching, reading, creating, and updating Notion pages, databases, and workspace content from AI agents.
Collaborative word processor you can use with your agent
Connect any AI assistant to Syncro: manage tickets, invoices, customers, assets, and more.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





