What is MCP security?

MCP security is the threat model and set of controls managing permissions, isolation, tool definition integrity and misuse in AI applications that connect to tools and data sources through the Model Context Protocol.

It differs from MCP authorisation in scope: authorisation defines the identity and permission flow, while MCP security combines it with tool definition review, server isolation, monitoring and supply chain controls. The core principle: tool descriptions and responses from servers are untrusted input.

Topic
AI security
Also known as
Model Context Protocol security

How MCP security works

  1. Instructions hidden in tool descriptions can steer the model (tool poisoning); definitions are reviewed before approval and monitored for later changes (rug pull).
  2. Servers' file system, network and backend API access follow least privilege; servers run isolated.
  3. User permissions apply on every call; host tokens are not passed through to servers (MCP authorisation).
  4. Only approved servers are used; unauthorised ones are detected and blocked (shadow MCP server) and every call is logged.

In more detail

Cross-server tool shadowing and cross-privilege abuse

When a host connects to multiple MCP servers simultaneously, a low-trust server can poison the shared context to hijack tools on a high-trust server, known as cross-server tool shadowing or 'lethal trifecta' flows (combining access to private data, untrusted external input and an exfiltration channel). Security controls must isolate tool scopes and prevent untrusted server outputs from triggering privileged external actions automatically.

The token passthrough ban, audience validation (RFC 8707) and transport security

Under MCP's OAuth 2.1 security requirements, token passthrough is explicitly forbidden: servers must reject tokens not bound to their specific resource audience (RFC 8707), preventing confused deputy attacks. On HTTP transports, servers must also validate Origin headers against DNS rebinding and guard dynamic OAuth metadata discovery against SSRF.

Code execution risk in local stdio servers and container and egress isolation

Local stdio MCP servers execute arbitrary code with the user's local OS privileges and often rely on dynamic package runners ('npx', 'uvx'), creating severe supply-chain and workstation RCE risks. Enterprise deployments pin verified server artefacts in internal registries and run MCP servers inside ephemeral, least-privilege containers or microVMs with strict egress firewalls.

Commonly confused terms

TermHow it differs
MCP authorisationMCP authorisation governs authentication, OAuth 2.1 flows, token audience validation and permission scopes; MCP security encompasses the full threat model including tool poisoning, rug pulls, indirect prompt injection, server sandboxing and supply chain integrity.
AI guardrailsLLM guardrails filter model inputs and outputs for toxicity, PII or jailbreaks at the inference layer; MCP security protects the protocol, tool definitions, execution sandboxes, identity boundaries and supply chain around external actions and data.
MCP gatewayAn MCP gateway is an architectural enforcement component (policy, logging, DLP proxy) that helps implement parts of MCP security; MCP security is the broader discipline covering hosts, clients, servers, transports and human-in-the-loop controls.

Why MCP security matters for on-premises AI

MCP servers let agents act in internal systems, so each server is a new attack surface and one weak server can compromise the whole agent. Data returned by servers can carry indirect prompt injection. Tools that change data or move money need human approval. An MCP gateway can provide central policy and logging. Running in-house cuts external connections but does not make permission and tool definition checks unnecessary.

ON-PREMISES EXAMPLE

A bank connects signature approval and transfer initiation tools to its internal correspondence assistant over MCP; a gateway checks every call against policy and the transfer tool will not run without human approval.

Common questions

What are the main security risks in MCP?

Instructions hidden in tool descriptions, prompt injection via server responses, over-privileged servers, unauthorised servers and mishandled identity tokens.

Do in-house MCP servers need checking too?

Yes. Running in-house reduces external exposure, but tool definitions, permissions and returned content still need checking.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.