See it work
Try it in your browser → The real optimizer runs on your
machine via WebAssembly; nothing you paste is uploaded.
A 400-line error log, read through LatentGate (balanced, measured with tiktoken):
BEFORE 13,641 tokens
2026-10-08 09:00:00 ERROR order 10000 failed: payment gateway timeout after 2982ms (retry 1/3)
... 398 more lines in the same shape ...
AFTER 145 tokens (98.9% saved)
2026-10-08 09:00:00 INFO app started, 3 workers
2026-10-08 09:00:00 ERROR order 10000 failed: payment gateway timeout after 2982ms (retry 1/3)
[… 398 similar lines: order 10001…10398, 2900…3100 ms …]
2026-10-08 09:06:39 ERROR order 10399 failed: payment gateway timeout after 3030ms (retry 1/3)
2026-10-08 09:07:00 FATAL circuit breaker open for payments-api
Install it into Claude Code in one line, then ask "read app.log and tell me why orders fail":
claude mcp add --scope user latent-gate -- uvx --from "latent-gate[mcp,tokens]" latent-gate-mcp
What you can rely on: the same input always gives the same output (so provider prompt caching keeps
working); output is never larger than input; code blocks, URLs and quoted strings come back
byte-for-byte; level="lossless" changes nothing but whitespace, JSON formatting and exact duplicates.
What you trade at the default level: runs of near-identical lines are folded to first, last and value
ranges, so individual IDs inside a folded run are not kept. The full corpus, including where it loses
facts, is in Cost Benchmarks and reproducible with latent-gate --optimizer-benchmark.
Works in Claude Code, Claude Desktop, Cursor, Cline, Continue and Zed, free and offline.
Don't want to install anything? The official hosted LatentGate on mcprush
also runs where local servers can't, such as claude.ai on the web and mobile. It has a free tier
(300 calls a month) and paid plans from $9/month.
The Problem
Every time you send an image or long prompt to GPT-4o / Claude / Gemini, you burn 1,000+ tokens on processing that could happen locally for free.
Traditional: Image -> Cloud LLM (1,200 tokens) -> Answer
LatentGate: Image -> Local Ollama (FREE) -> Cloud LLM (200 tokens) -> Answer
Features