Logo vun CLOV - Context Limiter & Output Vetter

CLOV - Context Limiter & Output Vetter

Communautéit
alexandephilia

Context Limiter & Output Vetter for context bloat. It is a highly specialized, structure-aware JSON built specifically to intercept and compress MCP responses before they annihilate your LLM's context window.

Editeuralexandephilia
Repositoryclov-ai
SproochRust
Forks
3
Stären
34
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    CLOV - Context Limiter & Output Vetter stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    34 Stären an 3 Forks aus dem verlinkte Repository.

CLOV Stars

License: MIT Version Go Python Rust

「Context Limiter & Output Vetter」

CLOV includes work derived from RTK, extended with a Rust implementation, deeper MCP proxy support, structured-response filtering, dynamic truncation controls, and a more local-first workflow with filtering and telemetry handled on-device.

Typing SVG

Claude Homebrew Ghostty macOS Linux Windows

Primary command names now use the CLOV surface (pulse, hook, bridge, settings, doctor, inspect). The old names were removed as part of the CLI migration.

MCP (Model Context Protocol) servers are brilliant, but their outputs are an uncontrolled firehose of context-destroying noise. When your AI agent pulls web search results or database dumps, it swallows navigation chrome, tracking parameters, and megabytes of unstructured JSON.

clov is the apex predator for context bloat. It is a highly specialized, structure-aware JSON-RPC proxy built specifically to intercept and compress MCP responses before they annihilate your LLM's context window.

As a secondary capability, clov intercepts raw terminal streams (git, cargo, npm, etc.), mercilessly executing ANSI codes and redundant progress bars.

Deploy clov between your AI agent and the world. Reclaim up to 95% of your context window. Stop paying hyperscalers for garbage tokens.


The Economics of Context

clov savings

When an AI coder hits an MCP search tool, a single raw response easily spikes over 50,000 tokens. clov intercepts, analyzes the structure, and prunes it intelligently.

Tactical TargetRaw TokensFiltered via clovAnnihilated %
MCP Web Search / Scraping~65,000~4,50093%
MCP Database Connectors~40,000~5,00087%
CLI: Test Suites (cargo test)~25,000~2,50090%
CLI: Source Control (git diff)~13,000~3,10076%
CLI: Deep Linters (tsc, ruff)~15,000~3,00080%

Measured during live AI coding sessions on massive monolithic architectures.


Deployment

Zero friction. Complete control.

bash
# MacOS / Linux (Homebrew)
brew tap alexandephilia/clov
brew install clov

# Rust Toolchain (Cargo)
cargo install --git https://github.com/alexandephilia/clov-ai

# Direct Injection (Curl)
curl -fsSL https://raw.githubusercontent.com/alexandephilia/clov-ai/refs/heads/main/install.sh | sh

(Pre-compiled binaries for all architectures are available in standard releases).


MCP Universal Filtering

clov mcp preview

To armor your MCP servers, wrap their invocation command with the clov bridge proxy bridge. clov operates as a transparent JSON-RPC layer, handling MCP stdio framing (Content-Length and newline-delimited payloads) and compacting both text and structured tool results on the wire.

clov mcp proxy example

Note: This is a real-world example of clov intercepting and filtering Exa search results during an AI coding session.

Before 😩After 😎
271K Tokens~143.5K Tokens
Context PollutionClean Filtering
Bloated78.8% Reduction

Configuration example for your AI agent (e.g., ~/.mcp.json):

json
"mcpServers": {
  "web-search-engine": {
    "command": "/opt/homebrew/bin/clov",
    "args": [
      "bridge",
      "proxy",
      "--preset", "claude-code-balanced",
      "--max-tokens", "4096",
      "--tokenizer-profile", "claude",
      "--max-array-items", "6",
      "--max-object-keys", "16",
      "npx", "-y", "target-mcp-server"
    ]
  },
  "sql-connector": {
    "command": "/opt/homebrew/bin/clov",
    "args": [
      "bridge",
      "proxy",
      "--preset", "gemini-search-heavy",
      "--max-tokens", "6000",
      "--tokenizer-profile", "generic-code",
      "--max-array-items", "10",
      "python", "-m", "db_mcp"
    ]
  }
}

Dynamic knobs available on clov bridge proxy:

  • --preset <name>: load named defaults like claude-code-balanced, openai-balanced, or gemini-search-heavy
  • --max-tokens <N>: target token budget before truncation
  • --tokenizer-profile <profile>: choose approx, claude, openai, gemini, or generic-code heuristics for budget enforcement
  • --max-array-items <N>: keep more or fewer rows before inserting summaries
  • --max-object-keys <N>: retain more or fewer keys on wide objects
  • --preserve-code <true|false>: keep code-like payloads intact or force prose-style cleanup
  • --aggressive-chrome-strip <true|false>: enable or relax nav/footer/ad stripping

The same settings can also be supplied through environment variables for MCP hosts that prefer env-driven config:

  • CLOV_MCP_PRESET
  • CLOV_MCP_MAX_TOKENS
  • CLOV_MCP_TOKENIZER_PROFILE
  • CLOV_MCP_MAX_ARRAY_ITEMS
  • CLOV_MCP_MAX_OBJECT_KEYS
  • CLOV_MCP_PRESERVE_CODE
  • CLOV_MCP_AGGRESSIVE_CHROME_STRIP

You can also persist defaults in ~/.config/clov/config.toml under [mcp], for example:

toml
[mcp]
preset = "claude-code-balanced"
max_tokens = 5000
tokenizer_profile = "claude"
max_array_items = 8

The Universal AI Logic:

  1. Dynamic Content Classification: Identifies web/search payloads, code, structured data, and plain text without server-specific hardcoding.
  2. Aggressive Chrome Stripping: Removes navigation, footers, ad markers, and other low-signal page chrome from textual payloads.
  3. Structured Data Reduction: Samples large arrays, keeps high-signal keys, and inserts explicit truncation summaries instead of dumping raw connector output.
  4. Density-Aware Truncation: Auto-scales truncation limits based on payload density while preserving code shape and useful context.

Standalone CLI Intervention

clov doesn't just proxy MCPs. It dominates the terminal. For AI coders like Claude Code, clov can inject a global auto-rewrite hook to govern terminal output automatically.

bash
# Establish global terminal intercept hooks
clov hook --global

When your AI executes git log, npm test, or cargo clippy, clov intercepts the invocation transparently, executing the process, tearing out the ANSI codes, deleting the progress bars, and feeding only pure signal back to the LLM.

Covered Toolchains:

  • Version Control: Condenses git statuses, tightens PR views (gh).
  • Web Stacks: Mutes npm, pnpm, eslint, tsc, Next.js, vitest.
  • Systems: Crushes cargo test, cargo build, cargo clippy.
  • Pythonic: Condenses pytest, ruff, mypy, pip.
  • Go: Strips go test, go build, golangci-lint.
  • DevOps: Minimizes docker, kubectl output.

If clov doesn't recognize a command, it bypasses filtering automatically.


Local Telemetry

clov tracks your token economy rigorously. No cloud pings. No data theft. 100% local SQLite metrics.

bash
clov pulse             # Lifetime efficiency readouts
clov pulse --graph     # 30-day visual velocity charting
clov pulse --all       # Granular temporal exports

Deep Configuration

clov requires no configuration, but command-line veterans can manipulate the tracking database and telemetry environments via ~/.config/clov/config.toml.

bash
clov settings --create  # Scaffold custom parameters
clov doctor             # Validate hook integrity hashes
clov inspect            # Scan AI logs for missed optimization vectors

Full-Fidelity Output Recovery (Tee Mode)

If clov aggressively intercepts a test failure and the AI actually needs the unadulterated noise to debug, clov writes the raw bypass data to a temporary file. A minimal pointer line is provided, allowing the AI to read the full context if—and only if—it is absolutely required.


Technical Index

  • ARCHITECTURE.md — Universal Filter system design and JSON-RPC proxy internals.
  • CLAUDE.md — Behavioral guidelines for AI operation.
  • docs/AUDIT_GUIDE.md — Advanced economic charting and localized analytics APIs.

Repo Maintainers

Star History

Star History Chart

Acknowledgments

CLOV includes derivative work based on rtk-ai/rtk, an MIT-licensed project focused on token optimization for AI coding workflows.

This project extends that foundation with a Rust implementation, MCP proxy support, structured-response filtering, dynamic truncation controls, and local telemetry integrations.

Upstream RTK attribution and bundled license text are included in LICENSES/RTK-MIT-LICENSE.


License

MIT License — see LICENSE.

Third-party attribution and bundled license text for RTK are included in LICENSES/RTK-MIT-LICENSE.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "alexandephilia-clov-ai": {
      "command": "",
      "args": []
    }
  }
}

CLOV - Context Limiter & Output Vetter MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal CLOV - Context Limiter & Output Vetter verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

CLOV - Context Limiter & Output Vetter als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu CLOV - Context Limiter & Output Vetter an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "alexandephilia-clov-ai": {
      "command": "npx",
      "args": [
        "-y",
        "clov-ai"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu CLOV - Context Limiter & Output Vetter. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu CLOV - Context Limiter & Output Vetter.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat CLOV - Context Limiter & Output Vetter?
CLOV - Context Limiter & Output Vetter
Jo. Ech hunn et gelies.
Dat hunn ech mat CLOV - Context Limiter & Output Vetter fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server CLOV - Context Limiter & Output Vetter benotzt?

CLOV - Context Limiter & Output Vetter ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech CLOV - Context Limiter & Output Vetter MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir CLOV - Context Limiter & Output Vetter mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat CLOV - Context Limiter & Output Vetter MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann CLOV - Context Limiter & Output Vetter verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech CLOV - Context Limiter & Output Vetter MCP mat TypingMind?

CLOV - Context Limiter & Output Vetter leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt CLOV - Context Limiter & Output Vetter MCP an TypingMind zur Verfügung?

CLOV - Context Limiter & Output Vetter stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir CLOV - Context Limiter & Output Vetter MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann CLOV - Context Limiter & Output Vetter eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇