squeez
by claudioemmanuel·★ 121·综合分 49
squeez 是一个 MCP 服务器,通过钩子为 AI CLI 主机提供令牌压缩和优化功能。
概述
squeez 是一个复杂的令牌优化工具,通过多种压缩技术减少 AI CLI 环境中的上下文使用量。它为主要的 AI 主机(包括 Claude Code、Copilot CLI、OpenCode、Gemini CLI 和 Codex CLI)实现钩子,提供高达 95% 的 bash 压缩、跨调用去重以及基于会话压力的自适应强度调整。项目包含一个内置的 MCP 服务器,提供 13 个只读工具,允许 LLM 直接查询会话内存,提供一个丰富的上下文引擎来跟踪文件访问模式和工具使用情况。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当使用多个AI CLI主机并需要大量令牌压缩时,特别是在bash密集型工作流中,选择Squeez。
什么时候不要选它
如果你主要使用不支持基于钩子集成的AI助手,或者你需要超出压缩功能的写入能力,则避免使用Squeez。
此 server 暴露的工具
从 README 抽取出 12 个工具squeez_filterCompress input from stdin using squeez's filtering algorithm
squeez_compress_mdCompress markdown files in-place using squeez's algorithm
squeez_benchmarkRun benchmarks to test squeez's compression effectiveness
squeez_protocolPrint the auto-teach payload that helps LLMs learn squeez's protocol
squeez_calibrateAuto-tune squeez configuration based on benchmark results
squeez_budget_paramsOutput JSON budget parameters for a specific tool
squeez_agent_costsTrack and analyze sub-agent token costs
squeez_session_summaryGet a structured summary of the previous session
squeez_token_trackingTrack token usage across tool calls
squeez_cross_call_dedupeCheck for and remove redundant content across tool calls
squeez_memory_file_statsAnalyze memory files for compression opportunities
squeez_config_analyzerAnalyze squeez configuration for optimization opportunities
说明:Tool names inferred from command examples and documentation. While the README mentions exposing 13 read-only tools via MCP server, specific tool names aren't clearly listed in a dedicated tools section. Tools were created based on the comma
可对比工具
安装
安装
三种方法 — 都会产生相同的结果:
curl(推荐)
curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | shnpm / npx
npm install -g squeez
npx squeezcargo
cargo install squeezMCP 服务器设置
不需要特殊的 MCP 设置,因为 squeez 包含自己的 MCP 服务器。运行:
squeez mcpClaude Desktop 集成
添加到 Claude Desktop 配置中:
{
"mcpServers": {
"squeez": {
"command": "squeez",
"args": ["mcp"]
}
}
}FAQ
- squeez 支持哪些 AI CLI 主机?
- squeez 支持 Claude Code、GitHub Copilot CLI、OpenCode、Gemini CLI 和 OpenAI Codex CLI,还通过 TypeScript 扩展支持 Pi。
- 我可以期望多少令牌压缩?
- squeez 可以将 bash 输出减少高达 95%,压缩率因场景而异。基准测试显示,重复输出的压缩率可达 99%,而 markdown 文件约为 22%。
squeez 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。