Logo di CLOV - Context Limiter & Output Vetter

CLOV - Context Limiter & Output Vetter

Community
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.

Autorealexandephilia
Repositoryclov-ai
LinguaRust
Fork
3
Stelle
34
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    CLOV - Context Limiter & Output Vetter mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    34 stelle e 3 fork nel repository collegato.

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.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

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

Usa MCP CLOV - Context Limiter & Output Vetter con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso CLOV - Context Limiter & Output Vetter, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi CLOV - Context Limiter & Output Vetter come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di CLOV - Context Limiter & Output Vetter.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "alexandephilia-clov-ai": {
      "command": "npx",
      "args": [
        "-y",
        "clov-ai"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di CLOV - Context Limiter & Output Vetter, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di CLOV - Context Limiter & Output Vetter.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare CLOV - Context Limiter & Output Vetter per aiutarmi con questa attività?
CLOV - Context Limiter & Output Vetter
Certo. Ho letto.
Ecco cosa ho trovato con CLOV - Context Limiter & Output Vetter.

Domande frequenti

A cosa serve il server MCP CLOV - Context Limiter & Output Vetter?

CLOV - Context Limiter & Output Vetter è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare CLOV - Context Limiter & Output Vetter MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare CLOV - Context Limiter & Output Vetter con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP CLOV - Context Limiter & Output Vetter con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando CLOV - Context Limiter & Output Vetter, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego CLOV - Context Limiter & Output Vetter MCP a TypingMind?

CLOV - Context Limiter & Output Vetter funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre CLOV - Context Limiter & Output Vetter MCP in TypingMind?

CLOV - Context Limiter & Output Vetter mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare CLOV - Context Limiter & Output Vetter MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se CLOV - Context Limiter & Output Vetter richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇