ContextGuard – Open-source security monitoring for MCP servers
ContextGuard – Open-source security monitoring for MCP servers
I built ContextGuard after discovering that 43% of MCP servers have critical security vulnerabilities. MCP (Model Context Protocol) is the new standard that lets Claude Clients(Desktop, Windsurf, Cursor, etc.) access external tools and data sources - think of it as a plugin system for AI assistants. The problem: When you give those clients access to your filesystem, databases, or APIs through MCP servers, you're opening up serious attack vectors. Prompt injection, data leakage, and path traversal attacks are all possible. Most developers building MCP servers don't have security expertise, and there wasn't an easy way to add protection. What ContextGuard does: - Wraps your MCP server as a transparent security proxy - Detects 8+ prompt injection patterns in real-time - Scans for sensitive data (API keys, passwords, SSNs) in responses - Prevents path traversal attacks - Rate limiting to prevent abuse - Comprehensive JSON logging for auditing - <1% performance overhead Technical approach: - TypeScript-based stdio proxy - Pattern matching + heuristics for threat detection - Works with any MCP server using stdio transport - Zero code changes needed - just wrap your existing server - All detection happens synchronously in the request/response flow The README includes a testing section where you can see the same attacks succeed on an unprotected server vs being blocked with ContextGuard enabled. It's pretty eye-opening to see how easy these attacks are. Why open source: Security tools need transparency. I want the community to audit the detection patterns, contribute new ones, and help identify blind spots. Plus, MCP is still early days - we need to establish security best practices together. Roadmap: Currently working on SSE/HTTP transport support, a web dashboard for monitoring, and a custom rule engine. Planning to offer Pro features for enterprises (team management, priority support, advanced analytics) while keeping the core security features free and open source forever. I'd love feedback on: 1. What other attack patterns should I prioritize detecting? 2. Is the web dashboard a must-have or nice-to-have? 3. Any blind spots in the current detection logic? 4. Should I focus more on detection accuracy or performance? The project is on GitHub with full docs and examples: https://github.com/amironi/contextguard You can try it right now: npm install -g contextguard contextguard --server "node your-mcp-server.js" Happy to answer any questions!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
GuMCP – Open-source MCP servers, hosted for free
Open-source project to convert FastAPIs to MCP servers
mTarsier is an open-source platform for managing MCP servers
MCP Manager – Open-Source CLI to Manage Your MCP Servers
Heimdall – Open Source Observability Platform for MCP servers and apps
Open-source platform for managing MCP servers and clients
Open source SDK and infra for MCP servers & agents
Representing Agents as MCP Servers
Open Source Boat Monitoring
Lightmeter 1.0: all-in-one Open Source mailserver monitoring