Skip to content
InfratoApp
InfratoApp / Resources / MCP servers / llmtrim

llmtrim

llmtrim is an MCP server, listed under model apis. It reaches openrouter. It needs OPENROUTER_API_KEY to authenticate. Its repository has 254 GitHub stars and is licensed under MPL-2.0; we last read it on 2026-10-22.

llmtrim acts as a local proxy to compress LLM API requests, reducing costs without altering the responses. It trims wasted tokens from prompts, history, tool output, and code before sending them, achieving a -31% reduction in input and -74% in output, as measured live. It supports any provider and can be used as an MCP server or embedded as a library in Rust, Python, Ruby, Kotlin, Swift, or JavaScript/TypeScript.

Install

Read from llmtrim’s own README, close to verbatim -- not written by us, and not guessed.

npm install -g @llmtrim/cli@latest && llmtrim setup

What it reaches, and what it needs

Reaches
openrouter
Credential
OPENROUTER_API_KEY

Maintenance

Stars
254
State
listed
Licence
MPL-2.0
From the repository

Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).

llmtrim compared with similar servers

llmtrim compared with the closest alternatives, by services reached, credentials, stars, last update and licence
ServerReachesNeedsStarsLast updateLicence
llmtrim (this page)openrouterOPENROUTER_API_KEY2542026-10-20MPL-2.0
octomindopenrouter(1 shared)OPENROUTER_API_KEY1752026-10-22Apache-2.0
openrouter-mcp-multimodalopenrouter(1 shared)OPENROUTER_API_KEY1012026-10-24Apache-2.0
wetcredential, openrouter(1 shared)CF_BROWSER_RENDERING_TOKEN, CREDENTIAL_SECRET, MCP_DCR_SERVER_SECRET, MCP_JWT_SIGNING_SECRET, MCP_RELAY_PASSWORD, OPENROUTER_API_KEY202026-10-26Apache-2.0
wigologemini, wigoloGEMINI_API_KEY, WIGOLO_API_TOKEN, WIGOLO_GITHUB_TOKEN5,4982026-10-22NOASSERTION
KiCAD-MCP-Server—None listed2,9052026-10-01MIT

Ranked by services in common with llmtrim, then by stars. Figures are from each repository when we last read it.

Common questions about llmtrim

What does llmtrim do?
llmtrim acts as a local proxy to compress LLM API requests, reducing costs without altering the responses. It trims wasted tokens from prompts, history, tool output, and code before sending them, achieving a -31% reduction in input and -74% in output, as measured live. It supports any provider and can be used as an MCP server or embedded as a library in Rust, Python, Ruby, Kotlin, Swift, or JavaScript/TypeScript.
How do I install llmtrim?
Its own README gives this command: npm install -g @llmtrim/cli@latest && llmtrim setup. Run it where your MCP client can launch the server, and check the README for any settings it asks for.
What does llmtrim connect to, and what does it need?
It reaches openrouter. The credentials we found in its source are OPENROUTER_API_KEY.
Is llmtrim official and is it maintained?
We found nothing naming it as a vendor’s official server. Its repository has 254 GitHub stars and its state in our directory is listed. Its last commit we recorded was on 2026-10-20.
What licence does llmtrim use?
The repository declares the MPL-2.0 licence.

More MCP servers for model apis

All model apis entries →

Learn this on Infrato