Skip to main content
MCP server CX Codex

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

Local MCP server that trims logs and JSON payloads before sending them to LLM context. Runs offline without API keys to cut token usage.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add latent-gate -- uvx latent-gate
Open on GitHub

What LatentGate does

LatentGate filters heavy error logs and structured data dumps before they reach the model. It operates deterministically. Web links and raw code snippets stay untouched byte for byte.

The default optimization folds repetitive logs into summary ranges showing first and last items. Because of this, unique identifiers inside folded blocks are dropped. You have to switch to level="lossless" if you need every line preserved.

Running the tool requires Python 3.10+ and the uvx runner. Initial dependency fetching takes extra time before later starts stabilize at two seconds. It also integrates with Ollama for vision tasks and exports metrics to Prometheus.

What it helps with

  • shrink repetitive application logs before feeding them to the agent
  • reduce context token consumption on heavy JSON payloads
  • clean long documents without losing code blocks or URLs
  • process bulky prompt context locally without external API keys

Example prompts for the agent

  • Inspect app.log through LatentGate and identify why checkout failed
  • Compress data.json and summarize the error payload
  • Parse repetitive log lines in service.log using lossless mode

How to install LatentGate

Platform CLI

claude mcp add latent-gate -- uvx latent-gate

uvx runs the command named after the package; if the README names another one, use uvx --from latent-gate <command>

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 LatentGate

How to install LatentGate in Claude Code?

Run claude mcp add latent-gate -- uvx latent-gate in your terminal. You need uv installed so uvx can fetch the package.

What does LatentGate do?

It prunes redundant text from logs and JSON files before your coding agent processes them. It shrinks token usage while keeping URLs and code blocks intact.

Does LatentGate discard critical log data?

Default settings fold near-identical log lines into ranges, which drops individual IDs between the first and last line. For zero data loss, the lossless setting removes only whitespace and identical duplicates.

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