squeeze-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@squeeze-mcp run npm test and show me just the failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
squeeze-mcp
An MCP server that runs shell commands for your AI agent and hands back only the part of the output worth reading.
Builds, test runs and installs print thousands of lines. An agent that reads all of them spends its context window on progress bars and download logs, then forgets the instructions you gave it. squeeze keeps:
the first few lines and the last ~20 lines,
every error, stack frame and failure, with two lines of context on each side,
summary lines (
3 failed, 41 passed,Compiled with 2 warnings,exit code 1),
and collapses repeated lines (Downloading 1/400 … Downloading 400/400) into one. Nothing is thrown away: the full output stays in memory under a run id, and the agent can search it with grep_output or page through it with read_output.
Example
A made-up test run that prints 402 lines, with one error in the middle:
$ node noisy-test.js
exit 1 · 0.1s · 402 lines, 9 shown · run id r1
Search the full output with grep_output or read_output (id r1).
----
fetch 0/400
… 199 similar lines
fetch 200/400
Error: connection reset by peer
fetch 201/400
… 197 similar lines
fetch 399/400
1 failed, 9 passedRelated MCP server: shell-sieve
Install
Requires Node.js 18 or newer.
git clone https://github.com/isaiahagi/squeeze-mcp.git
cd squeeze-mcp
npm install # also builds dist/Claude Code
claude mcp add squeeze -- node /absolute/path/to/squeeze-mcp/dist/index.jsClaude Desktop, Cursor, or any client with an mcpServers config
{
"mcpServers": {
"squeeze": {
"command": "node",
"args": ["/absolute/path/to/squeeze-mcp/dist/index.js"]
}
}
}Then tell your agent once, for example in CLAUDE.md: "Run builds, tests and installs with the squeeze run tool."
Tools
Tool | What it does |
| Runs a command ( |
| Searches a run's full output with a regular expression, with line numbers and context. |
| Returns a range of lines from a run's full output. |
| Compacts text you already have, such as a pasted log or stack trace. |
| Lists the runs still kept, newest first. |
How the squeezing works
Colour codes are stripped and carriage-return progress redraws are reduced to their final state.
Consecutive lines that differ only in numbers, hashes or timestamps are collapsed to first, count and last.
If the result is still over budget, each line is scored: start and end are always kept, then errors (score 3), lines near errors (2) and summary lines (1) fill the remaining budget.
Gaps are marked with
… [N lines omitted], so the agent knows exactly what it has not seen.
The logic is in src/squeeze.ts and has no dependencies, so you can reuse it elsewhere.
Settings
Environment variable | Default | Meaning |
|
| How many runs to keep in memory. |
|
| Output kept per run. Past this, the first and last halves are kept. |
Commands run with CI=1, NO_COLOR=1 and FORCE_COLOR=0 so tools print plain, non-interactive output. Stdin is closed, so a command that waits for input ends instead of hanging.
Safety
run executes shell commands with your user's permissions, exactly like your agent's built-in shell tool. Keep your MCP client's approval prompts on for it, and don't connect it to agents you don't trust.
Development
npm test # builds, then runs unit tests and end-to-end tests against the real serverLicense
MIT
Available Tools
5 toolsgrep_outputSearch a run's full outputB
Searches the full stored output of an earlier run with a regular expression and returns matching lines with line numbers.
Inputs: id (required), pattern (required), context, ignore_case, +1 more.
list_runsList kept runsB
Lists recent runs whose full output is still kept, newest first.
Inputs: no named parameters.
read_outputRead lines from a run's full outputB
Returns a range of lines from the full stored output of an earlier run.
Inputs: id (required), count, start.
runRun a command, get compact outputA
Runs a shell command and returns a compact view of its output: the first and last lines, every error with nearby context, and summary lines, with repeated lines collapsed. The full output is kept under a run id; use grep_output or read_output to see anything omitted. Prefer this over a plain shell for builds, tests, installs and anything noisy.
Inputs: command (required), cwd, budget_lines, timeout_seconds.
squeeze_textCompact a block of textA
Compacts a log, stack trace or other long text the same way run does, without running anything.
Inputs: text (required), budget_lines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: run executes and compacts, squeeze_text compacts without executing, read_output retrieves line ranges, grep_output searches by regex, and list_runs discovers runs. The only surface overlap is between grep_output and read_output, but they are clearly differentiated by search vs. range access.
Four of five tools follow a clear verb_noun pattern (grep_output, read_output, squeeze_text, list_runs), while run is a bare verb. The deviation is minor and still readable, so the set is mostly consistent.
Five tools is well-scoped for a focused log/output squeezing server. Each tool serves a distinct part of the workflow—execution, standalone compaction, discovery, and full-output retrieval—with no redundant entries.
The core lifecycle is covered: run creates stored output, list_runs discovers it, and read_output/grep_output retrieve it, while squeeze_text handles standalone text. Minor gaps exist around run metadata (e.g., exit status/duration) and cleanup/deletion of stored runs, but these are workable omissions.
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Run commands, code and file operations for AI agents in Cloud Hypervisor microVM sandboxes.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to run commands, capture outputs, and manage background processes with filtering capabilities for debugging and monitoring.-
- AlicenseNot gradedqualityCmaintenanceAn MCP server that executes shell commands and intelligently compresses, filters, and extracts errors from verbose output to save AI agent context windows. It strips ANSI, collapses repetitive lines, and always preserves error information.1MIT
- AlicenseAqualityCmaintenanceEnables running commands and capturing their output, then provides only the relevant lines to the model, with features for following long-running processes, outlining files, and summarizing logs.724 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceIt enables AI coding agents to execute shell commands and compact noisy terminal output into token-efficient Markdown, isolate actionable failures, and provide structured error explanations through MCP tools.34 npm1MIT