Security Considerations
Authentication and Authorization
According to the specification, the MCP server Authorization is OPTIONAL. However, it is recommended to implement it to ensure the security of the MCP server.
- For local MCP servers using the
stdiotransport, the specification recommends using the environment (environment variables) to access credentials. - For remote MCP servers using the
httptransport, the specification recommends using OAuth2 andAuthorizationheader.
For more detailed information you can check the Authorization section of the specification.
OWASP MCP Top 10
The OWASP (Open Web Application Security Project) started curating a list of the most critical security risks for MCP servers. You can find the list here.
Some notable risks are:
- MCP1:2025 – Token Mismanagement & Secret Exposure
- MCP2:2025 – Privilege Escalation via Scope Creep
- MCP6:2025 – Prompt Injection via Contextual Payloads