McpVanguard
A security proxy and active firewall for the Model Context Protocol that protects host systems from malicious intent, prompt injection, and data exfiltration. It acts as an interception layer between AI agents and tools, providing real-time verification and multi-layered defense mechanisms.
README
π‘οΈ McpVanguard
The Interception & Verification Layer for MCP Agents
McpVanguard is an open-source security proxy and active firewall for the Model Context Protocol (MCP). It acts as a real-time "Reflex System" between AI agents and their tools, protecting the host system from malicious intent, prompt injection, and data exfiltration.
Part of the Provnai Open Research Initiative β Building the Immune System for AI.
No changes to your agent. No changes to your server. Just wrap it.
β‘ Quickstart
# 1. Install
pip install mcp-vanguard
# 2. Start as a Cloud Security Gateway (SSE)
# This allows remote agents to connect over HTTP
vanguard sse --server "npx @modelcontextprotocol/server-filesystem ."
# 3. Traditional Stdio Wrap
vanguard start --server "npx @modelcontextprotocol/server-filesystem ."
# 4. Enable VEX Flight Recorder (Immutable Audit)
export VANGUARD_VEX_URL="https://api.vexprotocol.com"
export VANGUARD_VEX_KEY="your-agent-jwt"
vanguard sse --server "..." --behavioral
π§ The Interception Layer
McpVanguard sits at the Interception Layer of the Provnai stack. It prevents the gap between Cognitive Intent (what the agent thinks) and Environmental Execution (what actually happens to your PC).
3-Layer Defense-in-Depth
| Layer | Component | Defense Mechanism | Performance |
|---|---|---|---|
| L0 | Cloud Gateway | SSE/Network Bridge for remote agent access | <5ms |
| L1 | Static Rules | 60+ security signatures across 5 categories | <1ms |
| L2 | Semantic Intelligence | Local Ollama LLM intent classification | Async |
| L3 | Behavioral Analysis | Sliding-window anomaly detection (Scraping/Enum) | Stateful |
Rule Categories (Layer 1)
- Filesystem: Path traversal, restricted roots (
/etc/,~/.ssh/). - Command: Pipe-to-shell, reverse shells, privilege escalation.
- Network: Data exfiltration detection, tunnel host blocking.
- Jailbreak: Prompt extraction, instruction-ignore patterns.
- Privilege: SUID binary creation, crontab manipulation.
π‘οΈ VEX Protocol Integration (Flight Recorder)
McpVanguard integrates natively with the VEX Protocol. Whenever the proxy blocks a malicious action (L1/L2/L3), it instantly processes a "fire-and-forget" payload directly to the VEX API.
The VEX Server cryptographically hashes the blocked intent, runs it through the CHORA Gate, and anchors an immutable receipt (PoE) to the Bitcoin blockchain.
Enterprise auditors can mathematically prove exactly why an agent was blocked without relying entirely on local log trust.
ποΈ How It Works
βββββββββββββββββββββββββββββββ ββββββββββββββββ
AI Agent β McpVanguard Proxy β β VEX API β
(Claude, GPT) β βββAsyncββΆβ (CHORA Gate) β
β β ββββββββββββββββββββββββ β ββββββββββββββββ
βββJSON-RPCβΆβ β L1: Rules Engine β β β
β β β L2: Semantic Scorer β β βΌ
β β β L3: Behavioral Logic β β [Bitcoin Anchor]
β β ββββββββββββββββββββββββ β
βββ BLOCK βββ or ALLOW ββββββββββββΆβ MCP Server
β (Status β β (filesystem, shell...)
β Code) βββββββββββββββββββββββββββββββ
Traffic is inspected on every message, in both directions. Blocked messages return a standard JSON-RPC error response β the server never sees the attack.
πΊοΈ Project Status
| Phase | Goal | Status |
|---|---|---|
| Phase 1 | Foundation (Proxy, CLI, Defensive Rules) | β DONE |
| Phase 2 | Intelligence (L2 Semantic OpenAI, L3 Behavioral Redis Scaling) | β DONE |
| Phase 3 | Flight Recorder (VEX & CHORA Integration) | β DONE |
| Phase 4 | Distribution (v1.0.0 Stable, PyPI, WSL Verified) | β DONE |
π Resources
- Full Documentation
- Ecosystem Report
- Contributing Guide
-
π License
Apache License 2.0 β see LICENSE.
Built by the Provnai Open Research Initiative. "Verifying the thoughts and actions of autonomous agents."
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.