MCP Security
Security considerations for MCP: authentication, authorization, input validation, and sandboxing strategies.
Last updated
4.5 — Security in MCP: Step-by-Step
MCP servers are trust boundaries — they sit between an LLM (which can be manipulated via prompt injection) and real systems with real data. Security is not optional. Here's a 6-layer defense model.
Layer 1: Transport Security
| Transport | Security Model | What to Configure |
|---|---|---|
| stdio | Inherits OS user permissions. No network exposure | Ensure server process runs as the end user, not root. Use file permissions on the server script |
| SSE / HTTP | Standard HTTPS. Requires TLS termination | TLS certificates, CORS headers, reverse proxy. Never expose MCP over plain HTTP |