Back to full roadmap
topicadvanced
MCP Security
MCP servers give the agent executor authority — sandboxing, scope, audit are mandatory.
2 hours1 prereqs
MCP servers give the agent tools with real-world impact (write files, send email, modify DB). Security:
- Capability scope: grant each server minimum needed privilege (e.g. read-only DB)
- Sandbox: run filesystem tools in a chroot/container
- Confirmation prompts: require user approval on destructive ops (Claude Desktop does this)
- Audit log: log all tool calls, anomaly alerts
- Untrusted MCP servers: code-review community servers before installing
Prompt injection via MCP: injection can hide in MCP server output → output sanitization mandatory.