MCP security threats and defenses
For engineers
The attacks specific to MCP, from poisoned tool descriptions to confused deputies and token passthrough, and the layered controls that stop them
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Where does a tool poisoning attack put its malicious instructions?
Check yourself · 2 of 5
Which three things make up the lethal trifecta?
Check yourself · 3 of 5
What makes the proxy in a confused deputy attack the deputy?
Check yourself · 4 of 5
What is token passthrough?
Check yourself · 5 of 5
Why is a local MCP server's startup command risky?
Topics
- Tool poisoning, shadowing and rug pulls4 min read · Hidden instructions in tool descriptions, tools that redirect calls meant for another server, and definitions that change after approval
- Prompt injection through tool results and resources4 min read · Issues, emails, web pages and files returned by servers that steer the agent, and server combinations that complete the lethal trifecta
- Confused deputy attacks on MCP proxy servers5 min read · Proxy servers with a static client id, cached consent and dynamic registration, and why per-client consent closes the hole
- Why token passthrough is forbidden4 min read · Servers that accept tokens not issued for them or forward client tokens downstream, and audience checks with separate downstream credentials
- Local server risks: command injection, SSRF and DNS rebinding5 min read · Startup commands that run arbitrary code, metadata URLs that reach internal networks, localhost HTTP servers open to web pages, and session hijacking
- Layered defenses for MCP deployments5 min read · Pinned and reviewed servers, sandboxed local servers, per-tool approvals, least-privilege tokens, egress limits and monitoring of tool calls
Start here
- MCP security best practices (opens in a new tab)DocsFree
The protocol's own list of attacks: confused deputy, token passthrough, SSRF, session hijacking and local server compromise.
- Invariant Labs: MCP tool poisoning attacks (opens in a new tab)ArticleFree
The original write-up of hidden instructions in tool descriptions, with a working example.
- Simon Willison: Model Context Protocol has prompt injection security problems (opens in a new tab)ArticleFree
Shows tool poisoning, shadowing and rug pulls in one short, readable survey.
Scenarios
110 questions · last verified 2026-12