prompt-compressor-mcp
v1.0.4MCP server for rule-based prompt compression — cut LLM token usage without a model, without an API, without sending data anywhere.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
compress_prompt Compress prompt
Compress a prompt, system prompt, or context block to use fewer tokens, using deterministic rule-based algorithms (no LLM call). Template variables like {{name}} and {var} are preserved. Returns the compressed text and token stats.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to compress. |
level | string | Risk level. 'none' = whitespace/unicode only; 'very-low' = + filler, phrases, JSON/SQL minify; 'low' = + hedging, comments, dedup (recommended); 'medium' = + near-duplicate removal and light summariza… |
compress_file Compress file
Read a local text file (prompt, docs, logs, JSON, code) and return a compressed version with token stats. Does not modify the file.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to a local text file. |
level | string | Risk level. 'none' = whitespace/unicode only; 'very-low' = + filler, phrases, JSON/SQL minify; 'low' = + hedging, comments, dedup (recommended); 'medium' = + near-duplicate removal and light summariza… |
compare_levels Compare compression levels
Run every risk level on the same text and report token savings for each, so you can pick the right trade-off.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to analyze. |
estimate_tokens Estimate tokens
Estimate the token count of a text (fast heuristic, no tokenizer download).
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to measure. |