
Token Compressor
Compresses prompts by 40–60% using a local two-stage pipeline: llama3.2:1b rewrites text to semantic minimum, then nomic-embed-text validates via cosine similarity (default 0.85 threshold). If validation fails, original text passes through unchanged. Exposes a single compress_prompt tool that takes text and returns compressed output plus token stats. Requires Ollama running locally with both models pulled. Built for reducing token costs in long or repetitive workflows without sacrificing conditionals or negations. Skips compression automatically below 80 tokens. Works well as a pre-processing layer before expensive API calls or when operating under strict context budgets.
- GitHub stars
- 8
- tool
- 1
- transport
- STDIO
- last updated
- Mar 3, 2026
Tools
1 toolsPublic tool metadata for what this MCP can expose to an agent.
compress_promptCompresses a prompt, taking text (string) as input and returning compressed text plus a stats footer.
Compresses a prompt, taking text (string) as input and returning compressed text plus a stats footer.
No parameter schema in public metadata yet.
Sponsors
Readme
token-compressor
Reduce LLM prompt tokens by 30–70% while preserving semantic meaning.
mcp-name: io.github.base76-research-lab/token-compressor
Semantic prompt compression for LLM workflows. Reduce token usage by 40–60% without losing meaning.
Built by Base76 Research Lab — research into epistemic AI architecture.
Live demo
Intent Compiler MVP is now live and uses this project as part of the idea -> spec -> compressed output flow:
- Live: https://intent-compiler-mvp.pages.dev
- Product repo: https://github.com/base76-research-lab/token-compressor
What it does
token-compressor is a two-stage pipeline that compresses prompts before they reach an LLM:
Details
- Repository
- github.com/base76-research-lab/token-compressor
- Category
- AI & LLM Tools
- Package
token-compressor-mcp- Transport
- STDIO
- Registry
- MCP registry, active