Skip to main content
MCP server CX Codex

llmtrim — Claude Code MCP server: what it does, how to install

Local proxy and MCP server that compresses context before sending it to LLMs. Trims noisy logs and tool schemas to lower API bills.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add llmtrim -- npx -y @llmtrim/cli
Open on GitHub

What llmtrim does

llmtrim intercepts agent requests locally to strip out filler data like repeated terminal logs and duplicated tool schemas. Your model receives a significantly leaner payload while original error messages and answers stay intact.

Processing happens entirely on your machine without third-party servers. The daemon provisions a private certificate in ~/.llmtrim/ restricted solely to LLM hostnames and wires into your shell via HTTPS_PROXY. Auth credentials pass directly through without being stored locally.

GitHub Copilot rejects this proxy because of certificate pinning. You inspect session compression metrics directly in your terminal using llmtrim status. When Claude Code is installed, the setup also hooks the /sub command to manage upstream accounts.

What it helps with

  • cut API token costs by reducing prompt payload size
  • filter noisy terminal output before forwarding to the model
  • monitor local context compression metrics across coding sessions

Example prompts for the agent

  • Inspect compression gains using llmtrim status
  • Repair local proxy configurations with llmtrim doctor --fix
  • Run an isolated session through the proxy using llmtrim wrap claude

How to install llmtrim

Platform CLI

claude mcp add llmtrim -- npx -y @llmtrim/cli

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about llmtrim

How to install llmtrim in Claude Code?

Run claude mcp add llmtrim -- npx -y @llmtrim/cli in your terminal.

What does llmtrim do?

It acts as a local proxy that strips redundant tokens from logs and tool schemas before queries hit the model provider.

Why does the llmtrim proxy fail with GitHub Copilot?

GitHub Copilot enforces certificate pinning, which halts network connections that pass through local proxy certificates.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor