compresh-mcp
Provides production-grade context compression for LLM agent conversations with Q-protective ranking, epistemic markers, and semantic store, reducing token usage while preserving equivalence.
README
compresh-mcp
MCP server for Compresh — production-grade context compression for LLM agent conversations.
Compresh adds Q-protective ranking, epistemic marker classification, and depth-aware adaptation on top of the open-source
tulbasecompression core. This is the paid tier distribution.
Architecture (0.2.0+)
- Local: bundled
tulbase(MIT, vendored ascompresh_mcp.tulbase) runs on every turn for fast compression + cold-storage support (fetch_compressed/list_compressedMCP tools). - Server: TUL 1.0 layers (Q-protective ranking, epistemic markers, semantic store) run on Compresh infrastructure via the
/v1/tul1endpoint, gated by your Compresh API key + tier. - Degraded mode: if
/v1/tul1is unreachable, compresh-mcp transparently falls back to the local tulbase result so compression never blocks.
Previously (0.1.0, yanked), TUL 1.0 classifiers shipped inside the client package. That distribution leaked paid features into the local install and is no longer recommended — install 0.2.0 or later. See CHANGELOG.md for the migration note.
What's the difference vs tulbase-mcp?
| Feature | tulbase-mcp (free, open-source) |
compresh-mcp (paid) |
|---|---|---|
| Base LexRank summarization | ✅ | ✅ |
| Modality elision (code, terminal, JSON, stack traces) | ✅ | ✅ |
| Cold storage + fetch_compressed | ✅ | ✅ |
| Protection Zone (Claim 1e) | ✅ | ✅ |
| Q-protective sentence ranking (Q1–Q4 categorization) | ❌ | ✅ |
| Epistemic markers (VR/HR/CR/UC) | ❌ | ✅ |
| Semantic store (cross-turn Q3 dedup) | ❌ | ✅ |
| Saving telemetry to Compresh dashboard | ❌ | ✅ |
| Multi-device sync (planned) | ❌ | ✅ |
In Compresh's bench (Compresh-bench v1, 600-turn multi-model), Q-protective ranking adds 5–12 percentage points of equivalence preservation vs base LexRank at the same token savings — Pareto improvement.
Pricing
| Plan | Period | Saving-share |
|---|---|---|
| Starter (free + budget loaded) | pay-as-you-go | 30% |
| Pro Quarterly ($18) | 3 mo | 20% |
| Pro Semi-Annual ($33) | 6 mo | 16% |
| Pro Annual ($60) | 1 yr | 12% |
| Anonymous / free / local LLM | — | 0% (free, tulbase only) |
Every new user: $30 free credit (90-day expiry), $10 minimum top-up (charged $7.50 with a permanent 25% discount on top-ups).
Saving-share is the cut Compresh takes on the savings measured against the user's chosen model. The base value comes from the actual model price (when known) or the provider family's cheapest model; anonymous / free-model usage falls back to a flat $0.20 / 1M saved input tokens.
See compre.sh/pricing for the canonical pricing page.
Installation
pip install compresh-mcp
On first run, you'll be prompted for your Compresh API key. If you don't have an account, your browser opens to compre.sh/signup automatically.
MCP client configuration
Claude Code (~/.claude/mcp.json)
{
"mcpServers": {
"compresh": {
"command": "compresh-mcp",
"env": {
"COMPRESH_API_KEY": "sk-comp_...",
"COMPRESH_API_BASE": "https://api.compre.sh"
}
}
}
}
Cursor (~/.cursor/mcp.json)
Same structure as Claude Code.
Cowork
Cowork → Settings → Tools → MCP servers → Add:
- Command:
compresh-mcp - Environment:
COMPRESH_API_KEY=sk-comp_...
Tools exposed
Same four tools as tulbase-mcp, with enhanced behavior:
compress— Q-protective compression by default (protection_mode="balanced")fetch_compressed,list_compressed,stats— same interface
Plus paid-tier extras:
usage— current cycle budget, free credit balance, savings metrics
License
Business Source License 1.1 — see LICENSE. Production use permitted with valid Compresh API key. License automatically converts to MIT after 4 years (Year 2030).
Patents
Q-protective sentence ranking + Protection Zone are covered by TR-TPMK patent application 2026/007305 (Compresh Ltd, May 2026). A valid Compresh subscription grants implementation license.
Status
v0.1.0 — first public release, May 2026. Active development. APIs may
change before v1.0. Issues and pull requests welcome.
Links
- compre.sh — product site
- Documentation — full reference
- GitHub — source
- Issues — bug reports
- tulbase (open core, MIT) — standalone
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。