CLOV - Context Limiter & Output Vetter logo

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.

Publisheralexandephilia
Repositoryclov-ai
LanguageRust
Forks
3
Stars
34
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    CLOV - Context Limiter & Output Vetter exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    34 stars and 3 forks from the linked 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.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use CLOV - Context Limiter & Output Vetter MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once CLOV - Context Limiter & Output Vetter is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add CLOV - Context Limiter & Output Vetter as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the CLOV - Context Limiter & Output Vetter MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "alexandephilia-clov-ai": {
      "command": "npx",
      "args": [
        "-y",
        "clov-ai"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the CLOV - Context Limiter & Output Vetter MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the CLOV - Context Limiter & Output Vetter MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use CLOV - Context Limiter & Output Vetter to help me with this task?
CLOV - Context Limiter & Output Vetter
Sure. I read it.
Here is what I found using CLOV - Context Limiter & Output Vetter.

Frequently asked questions

What is the CLOV - Context Limiter & Output Vetter MCP server used for?

CLOV - Context Limiter & Output Vetter is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use CLOV - Context Limiter & Output Vetter MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use CLOV - Context Limiter & Output Vetter with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use CLOV - Context Limiter & Output Vetter MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With CLOV - Context Limiter & Output Vetter connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect CLOV - Context Limiter & Output Vetter MCP to TypingMind?

CLOV - Context Limiter & Output Vetter runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does CLOV - Context Limiter & Output Vetter MCP provide in TypingMind?

CLOV - Context Limiter & Output Vetter exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use CLOV - Context Limiter & Output Vetter MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If CLOV - Context Limiter & Output Vetter requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇