llmtrim_compressLABSCO SUMMARY
Three tools if you want the engine, a proxy if you want it automatic.
The MCP surface is the small door into a larger product: three tools that compress on request, with none of the CA-and-proxy setup the automatic path asks for. Two things hold either way — the default preset is quality-gated rather than lossless, so reach for safe when you need a byte-faithful round trip, and Anthropic and Gemini token counts are a BPE approximation flagged in status, because neither ships an exact public tokenizer.
What it is
A local proxy that trims LLM API traffic and forwards a smaller request, plus the same engine as a CLI, a library in six languages, and an MCP server. Compression runs on your machine and in-process, with no extra model call and nothing sent to the project. As an MCP server it is three tools — llmtrim_compress, llmtrim_compress_text and llmtrim_stats, the last reading the same ledger llmtrim status shows. Written in Rust (1.88+), MPL-2.0.
What you get
llmtrim_compressandllmtrim_compress_text— run a request or a block of text through the same engine the proxy uses, with no proxy involvedllmtrim_stats— the savings ledger, the same onellmtrim statusreads- Client setup in one command:
llmtrim mcp installfor Claude Code,llmtrim mcp install --printto paste into anything else; the entry is thellmtrimcommand with the argumentmcp - A proxy path for anything that honours
HTTPS_PROXY— Claude Code, Codex CLI, Gemini CLI, Cursor, Cline, Roo, Aider and others. GitHub Copilot is out, because of certificate pinning - Presets chosen by traffic shape:
auto(default, decides per request),safe(lossless input only),aggressive(max squeeze, quality-gated), plusagent,code,rag,cache,reasoningandfrugal— set throughLLMTRIM_PRESETorpresetin$XDG_CONFIG_HOME/llmtrim/config.toml - The same engine as a library —
cargo add llmtrim-core,pip install llmtrim,gem install llmtrim,@llmtrim/jsover WASM, plus Kotlin and Swift packages - A savings view in the terminal —
llmtrim status, with--daily,--weekly,--monthly,--jsonand--csv— and a menu-bar tray showing the same numbers - Published A/B numbers rather than claims: across 112 live cases, input tokens 71,031 → 49,062, output 25,843 → 6,628, round-trip cost $0.0365 → $0.0126, answer quality 78.9% → 82.2%
Requirements
For the MCP tools, the llmtrim binary on your PATH and nothing else — npm install -g @llmtrim/cli@latest, or Homebrew, Scoop, Cargo, the install script or the Docker image; the registry entry runs the npm package @llmtrim/cli as llmtrim mcp over stdio. Compression happens in-process, so there is no proxy to stand up and no API key stored. The proxy is a separate decision with a bigger footprint: llmtrim setup changes three things and llmtrim uninstall reverses all three — a name-constrained private CA in ~/.llmtrim/, HTTPS_PROXY plus CA trust in your shell environment, and a login service. Prompts never touch disk; recoverable tool results stay in bounded daemon RAM for five hours by default and disappear on restart.
Setup effort
One command — llmtrim mcp install
USE CASES
Shrinking a request on purpose before you send it
Hand the request to the tool and get a smaller one back through the same engine the proxy runs, with the preset picked from the shape of the traffic.
Cutting a pasted log down to what matters
Compress the text block on its own — a 200-line build log with two errors in it does not need to arrive whole.
Checking whether it is actually saving anything
Read the same ledger the terminal dashboard shows, so the answer is your own traffic rather than the project's benchmark.
Compressing without touching your network setup
The MCP path needs no CA, no HTTPS_PROXY and no login service — useful on a machine where installing a private CA is not something you want to do.
3 tools
Listed in project docs. Your client may show a different list.
llmtrim_compress_textllmtrim_statsBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
llmtrim on PATH
INSTALLATION
Connect your client
Server setup
Claude Code
llmtrim mcp installMCP Clients
Any MCP client
{
"mcpServers": {
"llmtrim": {
"command": "llmtrim",
"args": [
"mcp"
]
}
}
}