
Quick answer
What should a production MCP security stack control?
Start with the route an agent can actually reach. MCP tool calls should pass through a boundary that can normalize inputs, apply configured deterministic rules before execution, surface suspicious patterns for review, and emit structured outcomes. Those controls apply to calls routed through the boundary; they do not protect traffic that bypasses it.
- Control the routeLimit direct exposure and use an authenticated transport appropriate to the deployment.
- Evaluate before executionUse tool, path, and destination rules first; treat semantic signals as advisory where enabled.
- Record the outcomeCapture routed allow, block, or review decisions and add stronger evidence only where integrated.
For an implementation path, see the McpVanguard security proxy. For the threat model behind these controls, read the MCP prompt-injection research. For concise definitions, see the MCP glossary entry and the McpVanguard glossary entry.
Why MCP Security Is Critical in 2026
The Model Context Protocol (MCP) is a widely adopted standard for connecting AI agents to external tools and data — supported by Anthropic, OpenAI, Google, and Microsoft. By mid-2026, public security reporting described large numbers of MCP server instances directly exposed to the internet and a small number of high-severity (CVSS 9.x) vulnerabilities in production deployments — figures that vary by source and are difficult to verify independently.
The core problem is architectural. MCP was designed for capability, not for defense. It exposes a rich surface of tool calls — filesystem access, API calls, database queries, shell execution — that an AI agent can invoke on the basis of text instructions alone. When those instructions can be manipulated, the consequences are not theoretical.
The MCP Attack Surface
Every MCP deployment has the same four primary attack vectors. Understanding them is the prerequisite for defending against them.
Adversarial instructions embedded in user input, tool outputs, or retrieved documents override the agent's intended behavior and cause it to invoke unauthorized tools or exfiltrate data.
Agents with web-fetch or HTTP tools can be instructed to target internal cloud metadata endpoints (169.254.169.254), private network ranges, or internal services via crafted URLs.
Filesystem tools that accept relative paths can be exploited with sequences like ../../etc/passwd to read files outside the intended working directory.
Poisoned context — via RAG retrieval, memory injection, or malicious MCP server responses — redirects the agent to invoke tools with attacker-controlled arguments.
For deeper technical analysis of each vector, see the prompt injection research article and the AI Security Glossary.
A Five-Layer Defense Architecture
Effective MCP security cannot rely on a single control. The NIST AI Risk Management Framework AI RMF 1.0 recommends defense-in-depth for AI systems — multiple independent controls that each reduce risk independently but compound together.
Transport Isolation
MCP servers should never be directly reachable from the internet. Place them behind an authenticated proxy. Enforce mTLS between agent runtime and MCP server. Restrict network ingress to named principals only.
Deterministic Rule Enforcement
A rules engine at the proxy layer evaluates routed tool calls before execution. Allowlists for permitted tool names and schemas. Pattern matching for known attack signatures (traversal sequences, metadata IPs, exfil patterns). Binary block/allow with no model inference involved.
Semantic Intent Scoring
Rules catch known patterns. When enabled, semantic scoring can evaluate routed tool-call arguments against configured context and policy signals. A file-read tool called with a path outside the stated working directory may surface an anomaly signal, even if no rule explicitly covers it.
Behavioral Monitoring
Track tool call frequency, argument variance, and sequence patterns per session. A legitimate agent working on a code task does not call a web-fetch tool 40 times in 90 seconds. Rate limits and behavioral anomaly detection catch exfiltration and misuse that rules miss.
Audit and Evidence
Routed permitted and denied tool calls should emit structured audit events. Higher-assurance deployments can preserve selected governed actions with tamper-evident evidence for incident reconstruction and compliance workflows.
McpVanguard packages deterministic enforcement with optional semantic and behavioral controls in a form that can be added to existing MCP deployments without changing server implementations.
Production Readiness Checklist
Before deploying any MCP-connected agent to production, verify the following controls are in place:

Implement this in your stack today.
McpVanguard is an open-source security proxy for MCP designed to be introduced into existing deployments with minimal friction.
What Is an MCP Proxy Server? Security Proxy Guide
What an MCP security proxy does, how an MCP proxy server inspects routed tool calls, and where configured policy can reduce prompt-injection impact before upstream execution.
Why MCP Security Needs Layered Runtime Enforcement
Historical v2.1.0 release analysis: preflight normalization, deterministic blocking, camouflage detection, semantic scoring as an advisor, behavioral signals, and explicit policy composition.
MCP Prompt Injection Defense: Tool Poisoning & RAG
How direct and indirect MCP prompt injection reaches tool calls through tool poisoning, retrieval, and responses, plus scoped defenses with deterministic policy.
McpVanguard MCP Security Proxy
Open-source MCP security proxy for inspecting tool calls, enforcing policy, and blocking risky actions before execution.