Awesome Mcp Security
🔥🔒 Awesome MCP (Model Context Protocol) Security 🖥️
Awesome MCP Security 
Everything you need to know about Model Context Protocol (MCP) security.
Table of Contents
📔 Security Considerations
A short summary of the official MCP specification, revision 2026-07-28. The specification is the source of truth.
Warning
Tools represent arbitrary code execution. Tool descriptions and annotations are untrusted unless they come from a trusted server, and a human SHOULD always be able to deny a tool call.
Key principles (spec)
- User consent and control - users explicitly consent to data access and actions, and keep control over what is shared
- Data privacy - hosts get consent before exposing user data to servers and don't send it elsewhere without consent
- Tool safety - hosts get consent before invoking any tool, and users should understand what each tool does
Attacks covered by the official Security Best Practices
| Attack | In short |
|---|---|
| Confused deputy | MCP proxy servers to third-party APIs let malicious clients skip user consent |
| Token passthrough | a server accepts and forwards tokens that were not issued to it |
| SSRF | a malicious server makes the client request internal addresses or cloud metadata |
| State handle hijacking | guessed or leaked state handles (cart ID, workflow ID) passed as tool arguments |
| Local MCP server compromise | local servers run with direct access to the user's system |
| OAuth URL validation | malicious authorization URLs lead to XSS or RCE in the client |
| Mix-up attacks | a malicious authorization server tricks the client into sending it codes meant for another |
| Scope minimization | overly broad scopes increase the damage of a leaked token |
See also: Tools: Security Considerations (server MUSTs and client SHOULDs) and Authorization.
📃 Papers
From the project's README.