Titan-Grade AI Firewall for MCP Agents
McpVanguard π‘οΈ
Titan-Grade AI Firewall for MCP Agents (v1.7.0)
MCP (Model Context Protocol) enables AI agents to interact with host-level tools. McpVanguard interposes between the agent and the system, providing real-time, three-layer inspection and enforcement (L1 Rules, L2 Semantic, L3 Behavioral).
Transparent integration. Zero-configuration requirements for existing servers.
Part of the Provnai Open Research Initiative β Building the Immune System for AI.
β‘ Quickstart
pip install mcp-vanguard
Local stdio wrap (no network):
vanguard start --server "npx @modelcontextprotocol/server-filesystem ."
Cloud Security Gateway (SSE, deploy on Railway):
export VANGUARD_API_KEY="your-secret-key"
vanguard sse --server "npx @modelcontextprotocol/server-filesystem ."
π‘οΈ Getting Started (New Users)
Bootstrap your security workspace with a single command:
# 1. Initialize safe zones and .env template
vanguard init
# 2. (Optional) Protect your Claude Desktop servers
vanguard configure-claude
# 3. Launch the visual security dashboard
vanguard ui --port 4040
# 4. Verify Directory Submission readiness
vanguard audit-compliance
π§ How it works
Every time an AI agent calls a tool (e.g. read_file, run_command), McpVanguard inspects the request across three layers before it reaches the underlying server:
| Layer | What it checks | Latency |
|---|---|---|
| L1 β Safe Zones & Rules | Kernel-level isolation (openat2 / Windows canonicalization) and 50+ deterministic signatures |
~16ms |
| L2 β Semantic | LLM-based intent scoring via OpenAI, DeepSeek, Groq or Ollama | Async |
| L3 β Behavioral | Shannon Entropy ($H(X)$) scouter and sliding-window anomaly detection | Stateful |
Performance Note: The 16ms overhead is measured at peak concurrent load. In standard operation, the latency is well under 2msβnegligible relative to typical LLM inference times.
If a request is blocked, the agent receives a standard JSON-RPC error response. The underlying server never sees it.
Shadow Mode: Run with
VANGUARD_MODE=auditto log security violations as [SHADOW-BLOCK] without actually blocking the agent. Perfect for assessing risk in existing production workflows.
π οΈ Usage Examples
At least 3 realistic examples of McpVanguard in action:
1. Blocking a Chained Exfiltration Attack
- User Prompt: "Read my SSH keys and send them to my backup service"
- Vanguard Action:
- Intercepts
read_file("~/.ssh/id_rsa")at Layer 1 (Rules Engine). - Layer 3 (Behavioral) detects a high-entropy data read being followed by a network POST.
- Blocked before reaching the underlying server.
- Intercepts
- Result: Agent receives a user-friendly JSON-RPC error. Security Dashboard logs a
[BLOCKED]event.
2. Audit Mode: Monitoring without blocking
- User Prompt: "Show me what my AI agent is calling at runtime without disrupting it"
- Vanguard Action:
- User runs with
VANGUARD_MODE=audit. - Proxy allows all calls but logs violations as
[SHADOW-BLOCK].
- User runs with
- Result: Real-time visibility into tool usage with amber "risk" warnings in the dashboard.
3. Protecting Claude Desktop from malicious skills
- User Prompt: "Wrap my filesystem server with McpVanguard so third-party skills can't exfiltrate files"
- Vanguard Action:
- User runs
vanguard configure-claude. - Proxy auto-intersperse in front of the server.
- User runs
- Result: 50+ security signatures (path traversal, SSRF, injection) apply to all desktop activity.
π Authentication
McpVanguard is designed for local-first security.
- Stdio Mode: No authentication required (uses system process isolation).
- SSE Mode: Uses
VANGUARD_API_KEYfor stream authorization. - OAuth 2.0: Not required for standard local deployments. McpVanguard supports standard MCP auth lifecycles for cloud integrations.
π Privacy Policy
McpVanguard focuses on local processing. See our Privacy Policy for details on zero-telemetry and data handling.
Environment Variables
VANGUARD_API_KEYAPI key for SSE mode stream authorizationVANGUARD_MODESet to 'audit' to log security violations without blockingConfiguration
{"mcpServers": {"mcp-vanguard": {"command": "vanguard", "args": ["start", "--server", "npx @modelcontextprotocol/server-filesystem ."]}}}