Overview
Security is critical for MCP implementations, especially in enterprise environments. The MCP specification introduces unique challenges beyond traditional software security — as AI systems gain access to tools, data, and external services, new attack vectors emerge including prompt injection, tool poisoning, confused deputy problems, and token passthrough vulnerabilities.Current standard: This guide reflects MCP Specification 2025-06-18 security requirements.
Mandatory security requirements
The MCP specification mandates the following:Advanced authentication — .NET with Entra ID
Mandatory token validation
AI-specific security: prompt injection defense
MCP servers face sophisticated AI-specific attacks that require specialized defenses beyond traditional security.Microsoft Prompt Shields integration
Enterprise security decorator
Token passthrough prevention
The MCP specification mandates that servers MUST NOT accept tokens not issued for them.Security checklist
Transport security
Always use HTTPS. Never transmit tokens over plain HTTP.
Token audience validation
Validate the
aud claim matches your MCP server’s expected audience on every request.Prompt injection scanning
Use Azure Content Safety or Microsoft Prompt Shields to screen all user inputs.
Rate limiting
Implement per-user and per-tool rate limits to prevent abuse.
Audit logging
Log all tool executions, authentication events, and security failures to Azure Monitor.
Secrets management
Store all secrets in Azure Key Vault. Never hardcode credentials.
Additional resources
- OWASP MCP Top 10 — Security risks and mitigations
- MCP Security Summit Workshop (Sherpa) — Hands-on security training
- MCP Specification Security Requirements