McpVanguard v2.1.0Open Source

Secure MCP agents before they act.

McpVanguard sits between agents and tools, inspecting each proposed tool call before execution, enforcing policy, and recording the decision.

View GitHub
mcp-vanguard - live
Monitoring
Execution trace
Boundary
Before execution
Primary path
Deterministic policy
Output
Audit-ready verdict
Decision flow

From model intent to policy verdict

When an agent proposes a tool call, McpVanguard turns that moment into an explicit security decision before the upstream MCP server is reached.

01

Tool call proposed

The agent asks to call a tool with arguments.

02

Normalize

Decode, canonicalize, and annotate risky input patterns.

03

Enforce policy

Apply rules, safe zones, auth context, semantic advice, and risk signals.

04

Compose verdict

Resolve findings into ALLOW, WARN, REVIEW, SHADOW-BLOCK, or BLOCK.

05

Execute or block

Allowed calls continue. Blocked calls never reach the upstream server.

Architecture

Runtime enforcement path

Layered controls let semantic scoring add context without becoming the only thing standing between an agent and a privileged action.

L0

Preflight

Normalize encodings, Unicode, size, depth, and scorer-targeting patterns before deeper inspection.

L1

Rules + Safe Zones

Block known high-risk paths, network destinations, command patterns, and boundary escapes deterministically.

L1.5

Camouflage

Detect fake approvals, trust labels, policy-waiver language, multilingual reassurance, and scorer-targeting text.

L2

Semantic Advisor

Score ambiguous intent and raise severity when useful. It can escalate, but it cannot downgrade deterministic blocks.

L3

Behavioral / Risk

Track repeated enumeration, suspicious sequences, pacing, and exfiltration-like behavior across the session.

Policy Composer

One explicit verdict before execution.

ALLOWWARNREVIEWSHADOW-BLOCKBLOCK
Later layers do not silently downgrade earlier deterministic blocks.
Rollout

Choose your enforcement profile

Start with the profile that matches your operational risk. Strict is powerful, but it is not always the right first step.

Monitor

Safe rollout

Audit-only discovery. See what agents are trying to do before you enforce.

Balanced

Recommended default

Default developer enforcement. Blocks high-confidence risks while keeping normal tool workflows moving.

Strict

Production-sensitive

Fail-closed semantic behavior, stricter deterministic boundaries, and stronger risk enforcement. Tune for admin and research workflows.

Evidence

Why layering matters

In corpus-scoped release research, semantic scoring alone missed cases that deterministic policy caught. That shaped the architecture: semantic scoring advises; it does not own the boundary.

L2 semantic only
15/5527.3%

Malicious cases blocked by semantic scoring alone in this corpus.

L1 deterministic
49/5589.1%

Malicious cases blocked by deterministic policy in the same run.

Full layered path
54/5598.2%

Malicious cases blocked when the layered path was composed.

These are corpus-scoped research results, not universal detection guarantees. The point is architectural: known hazards should be blocked deterministically, while semantic scoring adds context for ambiguous cases.
Deploy

Install and deploy

Run locally in front of stdio MCP servers, or expose McpVanguard as a hosted SSE / Streamable HTTP gateway with API key or JWT protection.

Commands

Install
pip install mcp-vanguard
Local stdio
vanguard start --profile balanced --server "your-mcp-server-command"
Hosted gateway
vanguard sse --profile balanced --server "your-mcp-server-command"
Readiness
vanguard audit-compliance
Benchmarks
vanguard benchmark-run --profile strict

Deployment paths

Local stdio wrapper

Wrap existing MCP server commands without rewriting the server.

Hosted gateway

Expose a protected SSE / Streamable HTTP gateway for remote workflows.

Deploy McpVanguard on Railway

Built for the MCP boundary, not as your only sandbox.

McpVanguard does not replace OS isolation, container boundaries, cloud IAM, or least-privilege tool design. It enforces policy at the MCP execution boundary so proposed tool calls are inspected before they reach real systems.