شعار CLOV - Context Limiter & Output Vetter

CLOV - Context Limiter & Output Vetter

المجتمع
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.

الناشرalexandephilia
المستودعclov-ai
اللغةRust
التفريعات
3
النجوم
34
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الترخيصMIT
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح CLOV - Context Limiter & Output Vetter إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 34، والنسخ المتفرعة: 3 في المستودع المرتبط.

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.

التثبيت

TypingMind
المتطلبات المسبقة:

Node.js 18+

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

استخدم MCP الخاص بـ CLOV - Context Limiter & Output Vetter مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل CLOV - Context Limiter & Output Vetter، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف CLOV - Context Limiter & Output Vetter كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ CLOV - Context Limiter & Output Vetter.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "alexandephilia-clov-ai": {
      "command": "npx",
      "args": [
        "-y",
        "clov-ai"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ CLOV - Context Limiter & Output Vetter، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ CLOV - Context Limiter & Output Vetter.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام CLOV - Context Limiter & Output Vetter لمساعدتي في هذه المهمة؟
CLOV - Context Limiter & Output Vetter
بالتأكيد. قرأته.
إليك ما وجدته باستخدام CLOV - Context Limiter & Output Vetter.

الأسئلة الشائعة

ما استخدامات خادم MCP CLOV - Context Limiter & Output Vetter؟

CLOV - Context Limiter & Output Vetter هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP CLOV - Context Limiter & Output Vetter مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام CLOV - Context Limiter & Output Vetter مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP CLOV - Context Limiter & Output Vetter مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل CLOV - Context Limiter & Output Vetter، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP CLOV - Context Limiter & Output Vetter بـ TypingMind؟

يعمل CLOV - Context Limiter & Output Vetter عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP CLOV - Context Limiter & Output Vetter في TypingMind؟

يتيح CLOV - Context Limiter & Output Vetter إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP CLOV - Context Limiter & Output Vetter؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان CLOV - Context Limiter & Output Vetter يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇