Garry Alexander — Senior Full Stack Product Engineer

Stop MCP Responses from Eating Your Context Window with Clov

— by Garry Alexander

In brief

Clov is an open-source Rust CLI that compresses Model Context Protocol responses to prevent LLM context bloat, saving 40-75% of context tokens with zero-copy streaming.

Stop MCP Responses from Eating Your Context Window with Clov

Deep agentic sessions die the same way every time: tool responses pile up, the context window degrades, and the agent starts forgetting its own plan. Clov attacks that directly.

What it does

Clov is a structure-aware JSON compressor written in Rust. It intercepts Model Context Protocol (MCP) responses before they reach the model and strips structural redundancy, the repeated keys, envelopes, and nesting that cost tokens without carrying meaning.

Why structure-aware matters

Naive truncation deletes content and breaks schemas. Clov preserves 100% of the semantic schema, so downstream reasoning still sees every field it needs, just without the bloat. Documented savings: 40-75% of context tokens.

How it runs

Get it

Clov is open source and maintained by Garry Alexander: github.com/alexandephilia/clov-ai

FAQ

What is Clov?

Clov is an open-source, structure-aware JSON compressor written in Rust by Garry Alexander. It intercepts Model Context Protocol (MCP) responses and compresses them so agent tool-calling output does not blow past context token boundaries. Code: https://github.com/alexandephilia/clov-ai

How much context does Clov save?

40 to 75 percent of context tokens, depending on response shape. It strips structural redundancy while preserving 100 percent of the semantic schema downstream reasoning depends on.

Which tools does Clov work with?

Clov is a drop-in filter for Claude Code, Cursor, and any custom MCP agent loop. It uses zero-copy stream decompression, so it stays fast inside deep agentic reasoning sessions.

References