McpVanguard

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.

Category
Visit Server

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.

Tests License: Apache 2.0 Python 3.11+

No changes to your agent. No changes to your server. Just wrap it.


⚑ Quickstart

Deploy on Railway

# 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

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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured