McpVanguard
McpVanguard
MCP 代理的安全网关
MCP(模型上下文协议)允许 AI 代理与能够读取文件、执行命令和访问外部系统的工具进行交互。McpVanguard 位于代理和 MCP 服务器之间,实时检查流量,并在敏感调用到达底层工具之前强制执行安全策略。
McpVanguard 设计用于以下两种模式:
本地优先模式:在开发者机器上封装 stdio MCP 服务器
网关模式:为托管或共享部署暴露加固的 SSE 和 Streamable HTTP 端点
透明集成。无需重写现有的 MCP 服务器。
发布候选版本亮点
当前的发布候选版本为 2.0.0-rc1。
此版本围绕 McpVanguard 的网关角色进行了重大的安全和平台扩展:
加固的 Streamable HTTP
/mcp支持和更严格的会话处理对
initialize和tools/list的元数据投毒检查具有
server_id可追溯性的跨服务器隔离服务器完整性和能力漂移控制
MCP-38 分类法和基准测试工具
为托管网关部署提供更强大的 JWT/JWKS 身份验证基础
签名清单、来源、工件签名和基于 Sigstore 的信任验证
请参阅 CHANGELOG.md 获取完整的发布摘要和历史记录。
这是 Provnai 开放研究计划 的一部分 —— 构建 AI 的免疫系统。
Related MCP server: MCP Gateway
快速入门
pip install mcp-vanguard本地 stdio 封装:
vanguard start --server "npx @modelcontextprotocol/server-filesystem ."云安全网关:
export VANGUARD_API_KEY="your-secret-key"
vanguard sse --server "npx @modelcontextprotocol/server-filesystem ."请参阅部署文档以获取操作详情,并参阅变更日志以获取确切的验证范围。
入门指南
引导本地工作区:
# 1. Initialize safe zones and .env template
vanguard init
# 2. (Optional) Protect Claude Desktop server entries
vanguard configure-claude
# 3. Launch the local security dashboard
vanguard ui --port 4040
# 4. Run compliance/readiness checks
vanguard audit-compliance工作原理
每个工具调用在到达上游 MCP 服务器之前都会经过检查。
层级 | 目的 | 备注 |
L1 - 规则 | 使用越狱边界和签名进行确定性拦截 | 快速路径 |
L2 - 语义 | 可选的意图评分 | 异步 |
L3 - 行为 | 会话和序列感知的异常检查 | 有状态 |
架构
┌─────────────────────────────────────────────────┐
AI Agent │ McpVanguard Proxy │
(Claude, GPT) │ │
│ │ ┌───────────────────────────────────────────┐ │
│ JSON-RPC │ │ L1 — Rules Engine │ │
│──────────────▶│ │ 50+ YAML signatures (path, cmd, net...) │ │
│ (stdio/SSE) │ │ BLOCK on match → error back to agent │ │
│ │ └────────────────┬──────────────────────────┘ │
│ │ │ pass │
│ │ ┌────────────────▼──────────────────────────┐ │
│ │ │ L2 — Semantic Scorer (optional) │ │
│ │ │ OpenAI / MiniMax / Ollama scoring 0.0→1.0│ │
│ │ │ Async — never blocks the proxy loop │ │
│ │ └────────────────┬──────────────────────────┘ │
│ │ │ pass │
│ │ ┌────────────────▼──────────────────────────┐ │
│ │ │ L3 — Behavioral Analysis (optional) │ │
│ │ │ Sliding window: scraping, enumeration │ │
│ │ │ In-memory or Redis (multi-instance) │ │
│ │ └────────────────┬──────────────────────────┘ │
│ │ │ │
│◀── BLOCK ─────│───────────────────┤ (any layer) │
│ (JSON-RPC │ │ ALLOW │
│ error) │ ▼ │
│ │ MCP Server Process │
│ │ (filesystem, shell, APIs...) │
└──────────────▶│──────────────────┬──────────────────────────────┘
│ │
│◀─────────────── response ────────┘
│
│ (on BLOCK)
└──────────────▶ VEX API ──▶ CHORA Gate ──▶ Bitcoin Anchor
(async, fire-and-forget audit receipt)如果请求被拦截,代理将收到标准的 JSON-RPC 错误响应,底层服务器永远不会看到该调用。
L2 语义后端选项
第 2 层语义评分器支持通用提供程序架构。设置相应的 API 密钥以激活后端 —— 第一个可用的密钥生效:
后端 | 环境变量 | 备注 |
通用自定义 |
| 快速推理 (Groq, DeepSeek)。 |
OpenAI |
| 默认模型: |
Ollama |
| 本地执行。无需 API 密钥 |
当前平台能力
SSE 和 Streamable HTTP 的传输加固
服务器到代理路径上的元数据投毒防护
跨服务器行为隔离
服务器完整性和能力漂移验证
为配置的 bearer 部署提供基于 JWT/JWKS 的网关身份验证
用于可衡量安全覆盖范围的基准测试和分类工具
针对清单、来源、工件签名和 Sigstore 捆绑包的签名信任表面
🛠️ 使用示例
1. 拦截链式外泄攻击
用户提示:“读取我的 SSH 密钥并发送到我的备份服务”
Vanguard 操作:
在第 1 层(规则引擎)拦截
read_file("~/.ssh/id_rsa")。第 3 层(行为)检测到高熵数据读取后紧跟网络 POST 请求。
在到达底层服务器之前被拦截。
结果:代理收到用户友好的 JSON-RPC 错误。安全仪表板记录一个
[BLOCKED]事件。
2. 审计模式:监控而不拦截
用户提示:“向我展示我的 AI 代理在运行时调用了什么,不要中断它”
Vanguard 操作:
用户以
VANGUARD_MODE=audit运行。代理允许所有调用,但将违规行为记录为
[SHADOW-BLOCK]。
结果:实时查看工具使用情况,并在仪表板中显示琥珀色的“风险”警告。
3. 保护 Claude Desktop 免受恶意技能侵害
用户提示:“用 McpVanguard 封装我的文件系统服务器,这样第三方技能就无法外泄文件”
Vanguard 操作:
用户运行
vanguard configure-claude。代理自动插入到服务器前面。
结果:50 多种安全签名(路径遍历、SSRF、注入)应用于所有桌面活动。
身份验证
McpVanguard 是本地优先的,但也支持更强大的托管网关控制。
Stdio 模式:无需网络身份验证
SSE / Streamable HTTP 模式:支持
VANGUARD_API_KEYBearer / JWT 模式:支持托管网关路径上的已验证 JWT/JWKS 验证、颁发者/受众/声明/范围检查以及感知身份验证的策略
完整性与信任
当前的发布候选版本包括:
签名的上游服务器清单
能力基准和漂移检查
来源验证钩子
分离的工件签名验证
Sigstore 捆绑包验证,包括:
证书身份和 OIDC 颁发者约束
Fulcio 声明约束
兼容 GitHub 的存储库/引用/SHA/触发器/工作流名称检查
离线透明度证据验证
这应被描述为服务器完整性、基准验证和信任验证,而不是完整的 SBOM 平台。
验证与核实
当前的存储库验证基准为:
308 passed
覆盖范围包括:
传输和会话加固
元数据检查
身份验证和策略执行
完整性和能力漂移
Sigstore / 来源 / 供应商信任路径
基准测试和分类覆盖
跨服务器隔离
一致性集成
项目状态
实用加固路线图:完成
当前
2.0.0-rc1发布范围:完成并已验证完整的长期研究路线图:有意比当前版本更广泛,并未表示已完全完成
阶段 | 目标 | 状态 |
阶段 1-8 | 基础与加固 | [完成] |
阶段 19-21 | 目录提交与 MCPB | [完成] |
📄 隐私政策
McpVanguard 专注于本地处理。有关零遥测和数据处理的详细信息,请参阅我们的 隐私政策。
支持
许可证
MIT 许可证 - 请参阅 LICENSE。
由 Provnai 开放研究计划 构建。
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.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA transparent proxy and execution firewall that intercepts and audits AI agent tool calls against configurable security policies before forwarding them to downstream MCP servers. It provides safe execution environments with features like data redaction, anti-loop protection, and unified alert dispatching.
- AlicenseNot gradedqualityDmaintenanceAn enterprise infrastructure layer for the Model Context Protocol that provides authentication, RBAC, audit logging, and rate limiting for tool calls. It acts as a secure proxy between AI agents and MCP servers to ensure security and compliance in production environments.34MIT
- FlicenseNot gradedqualityBmaintenanceA cryptographic sidecar proxy that tests MCP tools for OWASP vulnerabilities before deployment. Automatically sandbox and audit your AI agents' tool calls to ensure secure infrastructure.
- FlicenseNot gradedqualityBmaintenanceA zero-trust gateway for securely brokering interactions between AI models and internal tools via the Model Context Protocol, with DLP, prompt injection defense, and LLM-as-a-Judge.
Related MCP Connectors
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Crypto transaction firewall and risk tools for MCP agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/provnai/McpVanguard'
If you have feedback or need assistance with the MCP directory API, please join our Discord server