# llmtrim

> Compress LLM requests to reduce token use.

- **URL**: https://followmcp.com/en/servers/llmtrim
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 280
- **FMRS Score**: 48/100 (Grade D)
- **Source**: https://github.com/fkiene/llmtrim
- **Transports**: stdio (local process)
- **Runtimes**: Node.js, Prebuilt binary
- **Auth**: No credential needed

## Overview
llmtrim is an MCP server that also provides a CLI, libraries, and a local proxy for compressing LLM prompts, tool output, and replies to reduce token use. The README reports measurements from 112 live A/B cases; results depend on the request and configuration.

## Best for
- Developers who want to compress LLM requests locally.
- Users who want to call compression features or view statistics through an MCP client.

## Not for
- Users who need guaranteed token savings or unchanged answers for every workload.
- Users who need model replies to be restored or reverse-transformed.

## Required permissions
- The example configuration launches the local `llmtrim mcp` command over stdio; specific runtime file or system permissions are not stated in the supplied material.
- The supplied MCP configuration shows no credential or additional permission settings.

## Risks
- The README says the default automatic configuration can enable lossy compression; the `safe` preset is available for lossless input compression only.
- According to the README, compression stages remeasure token counts and revert transformations that do not save tokens; if an upstream provider rejects a compressed request, the original is resent.
- The README says Anthropic and Gemini token counts are approximate. Its reported output savings come from offline A/B benchmarks, not live proxy statistics.

## Client config (JSON)
```json
{"mcpServers":{"llmtrim":{"command":"llmtrim","args":["mcp"]}}}
```

## Tools (3)
- `llmtrim_compress`: Compress an LLM request.
- `llmtrim_compress_text`: Compress text.
- `llmtrim_stats`: View token savings statistics; it uses the same ledger as the status command.
