mcp-context-guard
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-guardcompress this text to 100 tokens"
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 Guard — Context Window Management for AI Agents
Compress tool outputs, manage token budgets, deduplicate content, and filter by relevance. Zero dependencies, pure Python stdlib.
The Problem
AI agents waste context window tokens on:
Verbose tool outputs (file reads, search results, logs)
Duplicate content across tool calls
Irrelevant passages that don't match the task
Related MCP server: toonify-mcp
The Solution
MCP Context Guard sits between your tools and the LLM, compressing and filtering everything that enters the context window.
Tools (14)
Tool | What it does |
| Extractive summarization to N tokens |
| Set a total token budget |
| Check if text fits remaining budget |
| Deduct tokens from budget |
| Remove near-duplicate texts (Jaccard similarity) |
| Extract top-N key sentences |
| Truncate at sentence boundaries |
| Split into token-sized chunks with overlap |
| Estimate token count (word-based heuristic) |
| Compress conversation messages |
| BM25 relevance scoring, return top-K passages |
| Combine sources with dedup + compression |
| Context usage statistics |
| Reset all state |
Install
git clone https://github.com/aaameobius-crypto/mcp-context-guard.git
cd mcp-context-guard
python -m src.server --stdioTests
python -m pytest tests/ -v # 36 tests, all passingInspiration
headroom — 60-95% token reduction
context-mode — Intercept tool output
LLMLingua — Prompt compression
License
MIT — AMEOBIUS
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/aaameobius-crypto/mcp-context-guard'
If you have feedback or need assistance with the MCP directory API, please join our Discord server