Book an Appointment

MCP Security: Securing the Model Context Protocol

The Model Context Protocol connects AI applications with tools, data, and systems – creating a new attack surface in the process. We put the current guidance from the NSA, OWASP, and Wiz into context and show how you can secure MCP servers and clients.

The Model Context Protocol (MCP), released by Anthropic as an open standard in November 2024, has become the de facto standard for connecting AI applications to external tools and data sources. Its rapid adoption, however, has outpaced the development of its security model: authorization is optional in the protocol, and token lifecycle and message integrity are left to implementers. MCP servers frequently operate with delegated user permissions and chain multiple tool calls – amplifying the impact of a single vulnerability. With the NSA guidance from May 2026 and the OWASP GenAI Security Project guide from February 2026, robust hardening requirements are now available. This page summarizes the most important MCP-specific threats and countermeasures.

The Essentials at a Glance

01

What MCP is – and why it creates attack surface

The Model Context Protocol connects AI applications to tools, data sources, and APIs through a unified interface; MCP servers act as a bridge, often operating with delegated user permissions. Dynamic tool integration at runtime, implicit trust relationships between components, and shared contexts create attack paths that classic API security does not cover. In addition, the protocol defines neither mandatory access control nor token lifecycle management – secure implementation rests entirely with implementers.

02

MCP-specific threats

Key risks include Tool Poisoning (hidden instructions in tool descriptions), Rug Pulls (replacing already-approved tool definitions after the fact), and code injection through model inputs passed on without validation. Token passthrough creates a Confused Deputy risk: the MCP server is abused to perform unauthorized actions with another user's privileges; insecurely stored API keys and OAuth tokens enable credential theft. Real-world incidents – from the exfiltration of private GitHub repositories and leaked WhatsApp messages to the RCE vulnerability CVE-2025-49596 in the MCP Inspector – demonstrate that these attacks work in practice.

03

Server-side hardening

The OWASP guide requires OAuth 2.1/OIDC for all remote MCP servers, short-lived and tightly scoped tokens, and schema validation of all inputs and outputs. Users and sessions must be strictly isolated, and tool execution belongs in hardened sandboxes (containers, seccomp/AppArmor) with minimal privileges and a segmented network. Secrets are kept in vaults and must never be accessible to the LLM at any time.

04

Client and host protection

Wiz Research recommends deploying only MCP servers from trusted sources and auditing them like privileged software packages before use – auto-installation and auto-run of tools are high-risk patterns. A mature MCP client with approval dialogs, permission management, and human-in-the-loop for critical actions limits the damage from compromised servers. A central MCP-Gateway and Allowlisting on the host consolidate audit logging, guardrails, and policy enforcement at a single control point.

05

Detection and operations

All tool and model calls should be logged, including parameters and the identities involved, and integrated into existing SIEM and detection pipelines. The NSA also recommends regularly scanning your own network for unauthenticated, vulnerable, or unapproved MCP servers – since MCP servers can change ports dynamically, periodic scans with differential reports are advisable. In addition, a formal process for tracking MCP-related vulnerabilities (CVEs, vendor advisories) belongs in routine operations.

06

Governance and approval process

No tool and no tool change should go into production without a formal approval process: code scanning (SAST), dependency analysis (SCA), and manual security review are mandatory. Signed tool manifests with version pinning safeguard integrity; the advertised functionality of a tool description must be validated against its actual runtime behavior. A well-maintained inventory of all deployed MCP servers and tools, including versions and patch history, accelerates triage and response when new vulnerabilities become known.

Standards & Sources

The content on this page is based on the following publicly available guides and studies.

National Security Agency (NSA) · 2026

Model Context Protocol (MCP): Security Design Considerations for AI-Driven Automation, Ver. 1.0

Cybersecurity Information Sheet on design and implementation weaknesses of MCP, documented real-world incidents, and recommendations on Sandboxing, logging, vulnerability tracking, and network scans.

OWASP GenAI Security Project · 2026

A Practical Guide for Secure MCP Server Development, Version 1.0

Best practices for secure MCP servers – from architecture and tool design through OAuth 2.1/OIDC and Prompt Injection controls to deployment, governance, and the “MCP Security Minimum Bar” review checklist.

Wiz Research · 2025

Inside MCP Security: A Research Guide on Emerging Risks

Research guide on the risks of local and remote MCP servers, trust signals in registries (typosquatting, Rug Pulls), and client risks, including recommendations for secure use today and tomorrow.

Model Context Protocol Project · 2025

MCP Security Best Practices (Specification, Rev. 2025-11-25)

Official best-practices section of the MCP specification, cited in the NSA guidance on topics including Token passthrough and lifecycle handling.

Embedding MCP security in your organization

VamiSec supports you with consulting, security assessments, and pentests for MCP and AI agent environments. In our MCP security webinar, we take a deeper look at attack vectors and protective measures – get in touch.