AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
LLM Infra/
llmtrim
llmtrim logo

llmtrim

Active·★ 255·AGPL-3.0·Updated 2026-10-20

llmtrim is a local proxy that sits between your AI tools (Claude Code, Codex, Cursor or your own app) and the LLM provider. It strips wasted tokens out of every request, such as a 200-line build log where only two lines are errors, a tool schema resent identically dozens of times, or a JSON array of near-identical rows, and forwards the smaller request while the reply comes back unchanged. The README reports a 31% input and 74% output token reduction measured over 112 A/B cases, with no change in answer quality.

It can be used as a proxy, a CLI, an MCP server, or a library for Python, Ruby, Swift and Kotlin, and installs with npm, an install script, Homebrew, cargo, scoop or Docker. Each compression step is re-measured with the provider's tokenizer and reverted if it does not save tokens, and the original request is resent if the provider rejects the compressed one. Setup installs a private certificate limited to LLM API domains, a shell proxy setting and a login service; `llmtrim uninstall` reverses all three, and prompts are not written to disk.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-17.

License
MPL-2.0
Latest release
v0.13.7 · 2026-09-16
Last commit
2026-10-01
Contributors
5
Forks
23
Open issues and PRs
12
First published
2026-06-07
npm package
@llmtrim/cli 0.13.4 · 172 downloads last week
PyPI package
llmtrim 0.13.7 · 183 downloads last week

Source: GitHub, npm and PyPI public APIs.

#LLM Proxy#Token Compression#Cost Optimization#Context Management#Prompt Optimization#API Optimization#Developer Tooling
$ Install
$ npm install -g @llmtrim/cli@latest && llmtrim setup
↗ Visit site★ GitHub
01

Features

01Transparent LLM API Request Compression via Local Proxy
02Intelligent Content Optimization for Various Data Types (logs, code, context, JSON)
03Guaranteed Answer Quality and Cost Savings with Automatic Reversion of Ineffective Compression
04Flexible Integration Options: CLI, Library (Python, Ruby, Swift, Kotlin), and MCP Server
02

Why choose it

+Compresses prompts, history, tool output and code before they are sent, with no extra model needed.
+Re-measures each step with the provider's tokenizer and reverts steps that do not save tokens.
+Falls back to the original request if the provider rejects the compressed one.
+Works as a proxy, CLI, MCP server or library, and installs through many package managers.
03

Trade-offs

!Setup installs a local HTTPS proxy with a private CA certificate, a shell proxy setting and a login service, which some users will want to review first.
!The README says Anthropic and Gemini token counts are approximate, and live output savings are not measured by the proxy itself.
!The default mode is quality-gated rather than lossless; the safe preset is needed for a byte-faithful round trip. The licence is AGPL-3.0.
04

Maintenance check

ActiveChecked: 2026-10-19
Last commit
2026-09-29
Commits, last 90 days
100+
Releases, last 90 days
22
Latest release
v0.13.7 (2026-09-16)
Open issues
13
Recent issues with at least one comment
9/13
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 9, 10, 28, 0, 4, 5, 13, 0, 1, 0, 0, 0

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

Most discussed open issues

  • #273 feat: Codex localhost gateway without MITM proxy1 comments · 2026-08-28
  • #156 feat: `sub` hot swapping1 comments · 2026-07-12
  • #297 mcp install: add a DeepSeek Harness (DSH) target0 comments · 2026-09-16

Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.

05

Compatibility

Python
Language
Verified via docs
Ruby
Language
Verified via docs
Swift
Language
Verified via docs
Kotlin
Language
Verified via docs
Rust
Language
Verified via docs
CLI
Interface
Verified via docs
06

Quick start

1
$ npm install -g @llmtrim/cli@latest
2
$ llmtrim setup
07

Use cases

↳Reducing LLM API costs for AI agents (e.g., Claude Code, Cursor, Aider).
↳Optimizing token usage in custom LLM applications and SDKs.
↳Compressing large context windows (e.g., pasted docs, conversation history) for RAG systems.
↳Shrinking verbose tool outputs like build logs, diffs, or large JSON arrays sent to LLMs.
08

Alternatives

⚡Top VS:
VSconduit★235→VScodex-pooler★233→VSfastmcp-ts★78→VSmcpmu★19→
conduit logo
conduit★ 235
Local MCP gateway that cuts your agent's tool-token overhead ~90%. Every MCP server's tools collapse to 3 meta-tools the agent searches on demand. Measured: 97% less per request, same results. Keys in your OS keychain, no cloud.
VSCompare→
codex-pooler logo
codex-pooler★ 233
🤖 Pool and route Codex accounts behind one Gateway
VSCompare→
fastmcp-ts logo
fastmcp-ts★ 78
🏎️ The official FastMCP TypeScript library - build MCP servers, clients, and apps... fast! 🏎️
VSCompare→
mcpmu logo
mcpmu★ 19
MCP server multiplexer, configure all your MCP's in a single MCP with profiles, both TUI and web UI
VSCompare→
projectmem logo
projectmem★ 868
Local-first AI coding memory for AI agents. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.
VSCompare→
aoci-code logo
aoci-code★ 1.7k
A persistent, Git-versioned map of your whole codebase and database schema that coding agents read before they touch anything. Local-first MCP server + CLI in Go: a governed repository index of code knowledge that gives Claude Code, Codex, Cursor, and opencode long-term context, memory, and code intelligence.
VSCompare→
harnessrouter logo
harnessrouter★ 3.2k
HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
VSCompare→
GoodMemory logo
GoodMemory★ 20
Local-first, auditable memory layer for AI apps and coding agents — Codex, Claude Code, MCP, HTTP, TypeScript, and Python.
VSCompare→
See all alternatives →

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs04Maintenance check05Compatibility06Quick start07Use cases08Alternatives
fkiene /
llmtrim
↗

Local proxy that compresses LLM requests to cut token costs

25523AGPL-3.0
Last commit3d ago
StatusActive
CategoryLLM Infra
Contributors5
Latest releasev0.13.7
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.