MCP Catalogs
首页

squeez

by claudioemmanuel·121·综合分 49

squeez 是一个 MCP 服务器,通过钩子为 AI CLI 主机提供令牌压缩和优化功能。

ai-llmdeveloper-toolsproductivity
12
Forks
0
活跃 Issue
本月
最近提交
2 天前
收录于

概述

squeez 是一个复杂的令牌优化工具,通过多种压缩技术减少 AI CLI 环境中的上下文使用量。它为主要的 AI 主机(包括 Claude Code、Copilot CLI、OpenCode、Gemini CLI 和 Codex CLI)实现钩子,提供高达 95% 的 bash 压缩、跨调用去重以及基于会话压力的自适应强度调整。项目包含一个内置的 MCP 服务器,提供 13 个只读工具,允许 LLM 直接查询会话内存,提供一个丰富的上下文引擎来跟踪文件访问模式和工具使用情况。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:通过 bash 输出压缩减少 AI 编程助手的令牌消耗
:保持长时间运行的开发会话的上下文窗口效率
:通过去重冗余工具调用和输出来优化 AI CLI 性能
:squeez 支持哪些 AI CLI 主机?
:我可以期望多少令牌压缩?

什么时候选它

当使用多个AI CLI主机并需要大量令牌压缩时,特别是在bash密集型工作流中,选择Squeez。

什么时候不要选它

如果你主要使用不支持基于钩子集成的AI助手,或者你需要超出压缩功能的写入能力,则避免使用Squeez。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • squeez_filter

    Compress input from stdin using squeez's filtering algorithm

  • squeez_compress_md

    Compress markdown files in-place using squeez's algorithm

  • squeez_benchmark

    Run benchmarks to test squeez's compression effectiveness

  • squeez_protocol

    Print the auto-teach payload that helps LLMs learn squeez's protocol

  • squeez_calibrate

    Auto-tune squeez configuration based on benchmark results

  • squeez_budget_params

    Output JSON budget parameters for a specific tool

  • squeez_agent_costs

    Track and analyze sub-agent token costs

  • squeez_session_summary

    Get a structured summary of the previous session

  • squeez_token_tracking

    Track token usage across tool calls

  • squeez_cross_call_dedupe

    Check for and remove redundant content across tool calls

  • squeez_memory_file_stats

    Analyze memory files for compression opportunities

  • squeez_config_analyzer

    Analyze 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

可对比工具

context-compressortoken-optimizerai-session-tools

安装

安装

三种方法 — 都会产生相同的结果:

curl(推荐)

curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | sh

npm / npx

npm install -g squeez
npx squeez

cargo

cargo install squeez

MCP 服务器设置

不需要特殊的 MCP 设置,因为 squeez 包含自己的 MCP 服务器。运行:

squeez mcp

Claude 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 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。