sqz — Claude Code MCP server: what it does, how to install
sqz shrinks command output before it reaches the agent's context and swaps repeats for short references. Useful when build logs and repeated file reads eat your tokens.
Apache-2.0 ★ 679 updated 2026-10-22
Open on GitHubWhat sqz does
sqz sits between your agent and its tool output. Each command gets its own formatter: a failed cargo test run shrinks to the failure and its file:line, and the rest is cut. When the model has already seen the same output, or the same line range of a file, it gets a short reference in place of the text.
It is a single Rust binary. No LLM calls, no telemetry, no network needed, and the output is deterministic. sqz init writes hooks, the MCP server and agent guidance for each client it detects. sqz gain shows a week of savings, and sqz expand restores any compressed result byte for byte.
Source code, stack traces, migrations and credential lines go through untouched, so the first read of a file costs the same tokens as before. Output containing credentials, a stack trace or a migration is never cached either.
What it helps with
- cut
cargo testoutput down to the failure and itsfile:line - stop re-sending an unchanged
git statuson every turn - replace a repeated read of the same file lines with a short reference
- check with
sqz gainhow many tokens a week of sessions saved
Example prompts for the agent
- Install sqz with
cargo install sqz-cli sqz-mcp, then runsqz init - Run
sqz gainand tell me how many tokens sqz saved this week - Restore the full output of that compressed result with
sqz expand
How to install sqz
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about sqz
How do I install sqz in Claude Code?
Run cargo install sqz-cli sqz-mcp, then sqz init. The second command sets up hooks, the MCP server and agent guidance for every client it finds.
What does sqz do?
It compresses tool output before it enters the agent's context. A failed test run keeps the failure, the assertion and the file:line, and anything the model has already seen becomes a short reference. No LLM is called.
Which clients does sqz work with?
Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline and Zed.