mcp-context-dedup
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-context-dedupdeduplicate this repetitive output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-context-dedup
Zero-dependency semantic context stream compression & token deduplication engine for MCP tools (achieving 60%โ80% LLM token savings).
๐ Key Features
๐ฐ 60%โ80% Token Savings: Saves LLM prompt token costs on verbose stdout streams and repetitive log outputs.
โก Zero External Dependencies: Built 100% on Python Standard Library.
๐งน Traceback & Log Deduplication: Collapses repeated traceback frames and identical log lines into
[Repeated Nx]count blocks.๐๏ธ JSON Array Summarization: Truncates large homogeneous JSON arrays while preserving top/bottom schema context.
๐ ๏ธ Stdio MCP Server: Ready for instant integration into Claude Desktop, Cursor, and Windsurf via
uvx.
Related MCP server: logslim-mcp
๐๏ธ Architecture
+-------------------+ +--------------------------+ +------------------------+
| Verbose MCP Output| --> | mcpcontextdedup Engine | --> | Compressed Stream |
| (14k Tokens) | | (Deduplication & JSON) | | (2.8k Tokens / 80% Off)|
+-------------------+ +--------------------------+ +------------------------+๐ฆ Quickstart
uvx mcp-context-dedupPython Library Usage
from mcpcontextdedup import compress_context
raw_log = "error: connection reset\nerror: connection reset\nerror: connection reset\n"
res = compress_context(raw_log)
print(f"Reduction: {res.reduction_percentage}%")
print(res.text)
# Output:
# Reduction: 66.7%
# error: connection reset [Repeated 3x]โ๏ธ Claude Desktop & Cursor Setup
Add to your claude_desktop_config.json:
{
"mcpServers": {
"context-dedup": {
"command": "uvx",
"args": ["mcp-context-dedup"]
}
}
}โก Performance Benchmarks
Output Type | Original Tokens | Compressed Tokens | Token Savings | Execution Time |
Repeated Log Stream (1,000 lines) | 14,200 tokens | 280 tokens | 98.0% Savings | 1.8 ms |
Large JSON API Array (500 items) | 28,500 tokens | 4,200 tokens | 85.3% Savings | 3.4 ms |
Python Traceback Burst (50 frames) | 8,400 tokens | 1,600 tokens | 81.0% Savings | 1.1 ms |
๐ Privacy & Security
100% Local & Offline: Operates strictly over local stdio with zero network calls.
Zero Telemetry: No analytics, no tracking, and no phone-home mechanisms.
๐ License
MIT ยฉ Abhishek Prasad
Available Tools
1 toolcompress_mcp_outputA
Compress verbose tool outputs and deduplicate log lines to save LLM prompt tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| raw_text | Yes | Raw verbose stdout/stderr string |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the actions (compress, deduplicate) but does not disclose the output format, whether the compression is lossy, or how it handles edge cases like empty input. Without an output schema or annotations, critical behavioral context is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that is front-loaded with the primary action and includes the motivating purpose. Every word contributes value; no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (1 parameter, no output schema, no annotations), the description conveys the core functionality but lacks details about the return value and potential lossiness. It is minimally viable but has clear gaps for a tool that transforms user input.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter 'raw_text', which is adequately described as 'Raw verbose stdout/stderr string'. The description adds little beyond the schema, but since the schema already covers semantics, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Compress') and resource ('verbose tool outputs'), and adds a second distinct action ('deduplicate log lines') with a clear goal ('to save LLM prompt tokens'). This leaves no ambiguity about what the tool does, even without sibling context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use the tool: when dealing with verbose tool outputs that need token savings. It does not mention explicit exclusions or alternatives, but with no siblings present, the context is sufficient for a 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
compress_mcp_output
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlapping purposes. The tool's unique function is clear.
The single tool follows a clear verb_noun pattern (compress_mcp_output), and with only one tool, there are no inconsistencies to evaluate.
The server has a single tool, which feels borderline for a typical server. However, the narrow purpose of context deduplication makes one tool arguably sufficient, but it is still on the thin side.
The tool fully addresses the server's stated purpose of compressing MCP outputs and deduplicating logs. There are no obvious missing operations for this narrowly defined domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
Same functionality, consuming only 1/20 of the context window tokens.
Zero-auth MCP: image optimize, cited storage/format data, and dev utilities LLMs get wrong.
Related MCP Servers
- AlicenseBqualityDmaintenanceAdvanced Token-Optimized Object Notation MCP server that compresses JSON with up to 85% token reduction using AI-powered pattern detection, providing lossless compression and decompression through 12 MCP tools.129MIT
- AlicenseAqualityAmaintenanceCompacts noisy test, build, and cloud-log output before an AI agent reads it โ dedupes repeats, collapses stack frames, folds Playwright retries, and renders CloudWatch/GCP JSON logs down to the signal. Typically 80โ95% fewer tokens on failures. Tool: compact_output. Run: npx -y logslim logslim-mcp195MIT
- FlicenseBqualityCmaintenanceLocal MCP server for token optimization, providing tools to compress code/JSON, optimize prompts, and manage placeholder-based content redaction and hydration to reduce LLM token usage.5-
- AlicenseAqualityAmaintenanceAn MCP server that intelligently filters and compresses tool outputs to reduce context window usage, saving up to 90% of tokens by removing noise such as passing tests and redundant information.522MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/prasadabhishek/mcp-context-dedup'
If you have feedback or need assistance with the MCP directory API, please join our Discord server