Compressor Reflex MCP
Provides a transparent proxy mode that can wrap Git MCP servers or compress Git diffs and inspection output to reduce token consumption in the context window.
Automatically retrieves and caches the compression model's weights and tokenizers from Hugging Face Hub, enabling local model management and offline use after initial download.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Compressor Reflex MCP
Compressor Reflex MCP is a Model Context Protocol (MCP) server and transparent proxy that provides high-fidelity tool-output compression for Cursor, Antigravity IDE, Claude Desktop, and other MCP-compliant developer environments.
Powered by aialchemist-dev/compressor-reflex (fine-tuned ModernBERT-151M), the model reduces tool-output token consumption by up to 90% while guaranteeing 100% retention of compiler errors, test failures, target locations, and decisive anchors.
Key Capabilities
89.7% Measured Tool Compression: Condenses extensive test suites, git diffs, directory listings, and file dumps into their essential operational lines.
100.0% Critical Anchor Retention: Calibrated at decision threshold tau* = 0.50 across held-out evaluations. Error tracebacks, fail signatures, and query targets remain intact.
Fail-Open Bypass Policy: Outputs containing <= 5 physical lines or <= 64 tokens automatically bypass compression and pass through verbatim, avoiding latency overhead on short outputs.
Dual Deployment Modes:
Direct MCP Tools: Exposes standard callable tools (
compress_tool_output,compress_file) for explicit agent invocation.Transparent Proxy: Wraps any standard MCP server (such as filesystem, git, or terminal) to automatically compress output streams before delivery to the context window.
Automated Weight Management: Model weights (INT8 ONNX) and tokenizers are automatically retrieved from Hugging Face Hub on initial startup and cached locally.
Related MCP server: genpark-agent-context-dynamic-compressor-skill
Installation
From PyPI
pip install compressor-reflex-mcpOr run directly without installation via uvx:
uvx compressor-reflex-mcp serveFrom Source or Git
git clone https://github.com/ericmaddox/compressor-reflex-mcp.git
cd compressor-reflex-mcp
pip install -e .Optional Model Pre-Caching
To download the model weights ahead of time:
compressor-reflex-mcp downloadModel files are cached in the standard user cache directory (~/.cache/compressor-reflex/ or %LOCALAPPDATA%/compressor-reflex/). The cache path can be overridden using the COMPRESSOR_MODEL_DIR environment variable.
IDE Configuration
Cursor
Add the server definition to your workspace .cursor/mcp.json or global Cursor settings:
{
"mcpServers": {
"compressor-reflex": {
"command": "python",
"args": ["-m", "compressor_reflex_mcp.server"]
}
}
}Or using uvx:
{
"mcpServers": {
"compressor-reflex": {
"command": "uvx",
"args": ["compressor-reflex-mcp", "serve"]
}
}
}Antigravity IDE
Add to ~/.gemini/config/mcp_config.json or your project .gemini/mcp_config.json:
{
"mcpServers": {
"compressor-reflex": {
"command": "python",
"args": ["-m", "compressor_reflex_mcp.server"]
}
}
}Transparent Proxy Mode (Antigravity and Cursor)
Wrap existing tools to automatically compress outputs from heavy providers (for example, filesystem or git inspection):
{
"mcpServers": {
"filesystem-compressed": {
"command": "compressor-reflex-mcp",
"args": [
"proxy",
"--",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
}
}
}Claude Desktop
Update claude_desktop_config.json:
{
"mcpServers": {
"compressor-reflex": {
"command": "python",
"args": ["-m", "compressor_reflex_mcp.server"]
}
}
}Tool Reference
Tool | Parameters | Description |
|
| Extracts relevant lines from raw terminal stdout, test logs, or diffs with optional intent routing. |
|
| Reads a file from disk and extracts decisive lines based on the provided intent. |
| None | Returns metadata on local model cache status, Hugging Face Hub link, and threshold settings. |
Command-Line Interface
Inputs exceeding 5,242,880 characters or 10,000 lines bypass model work and
return the original text without truncation. For these resource-limit bypasses,
token counts are null because tokenization is skipped; the compression ratio
is zero and MCP metadata includes a bypass_reason. For in-budget inputs,
selected lines are returned in full even when their scoring tokens are shortened
to fit the model sequence budget.
# Launch the stdio MCP server
compressor-reflex-mcp serve
# Run as transparent proxy wrapping another command
compressor-reflex-mcp proxy -- npx -y @modelcontextprotocol/server-filesystem /path/to/project
# Compress a file or standard input directly
compressor-reflex-mcp compress tests/results.log --intent "find failures"
# Verify model cache and runtime configuration
compressor-reflex-mcp info
# Pre-fetch weights from Hugging Face
compressor-reflex-mcp downloadEmpirical Performance
Metrics collected across real multi-turn developer sessions in IDE environments:
Metric | Measured Value | Methodology / Context |
Tool Compression Ratio | 89.69% | Measured over 181 tool outputs (129,405 raw to 13,339 kept tokens) |
Critical Anchor Retention | 100.0% | 611/611 anchor lines preserved at calibrated threshold tau* = 0.50 |
Fail-Open Bypass Rate | 9.39% | Automatically bypassed on outputs with <= 5 physical lines or <= 64 tokens |
Maximum Single-Session Savings | 60.54% | Measured in deep multi-module code exploration session |
Model Size | 143 MB | INT8 quantized ONNX (ModernBERT-151M) |
Agent Instructions
For system prompt guidelines and autonomous agent behavior rules, refer to AGENTS.md.
License
This project is licensed under the MIT License. See LICENSE for details.
Model architecture and pre-trained weights are hosted at Hugging Face.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Compress coding-agent context ~64%. Hosted Neural Keep MCP for Cursor/Claude/Codex.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA task-aware context compression layer for Agent workflows, RAG pipelines, and AI Coding assistants, reducing noisy logs, retrieval chunks, and code context into high-signal LLM inputs via CLI, Python SDK, and MCP.16 PyPI322MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP-compliant clients to dynamically shrink long-horizon context windows, pruning verbose tool outputs, HTML boilerplate, and semantic redundancy by roughly 40-70% without frontier LLM round-trips. Runs deterministically as a zero-dependency Python stdio server, accepting a payload plus optional compression and risk-bound options.7-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables MCP-compatible clients and autonomous agents to dynamically compress long-horizon context by pruning verbose tool outputs, HTML boilerplate, and semantic redundancy by 40-70%. It reduces token burn and latency through deterministic, zero-dependency processing.-
- AlicenseNot gradedqualityBmaintenanceCompresses multi-turn conversation history by stripping verbose boilerplate and filler tokens while preserving critical tool parameters and named entities, deterministically cutting inference costs by 40-60%. Runs as a zero-dependency Python MCP server or importable module, compatible with Claude Desktop, Cursor, and other MCP runtimes.7MIT