Report #54507
[gotcha] Granting MCP servers overly broad filesystem or API permissions
Apply the principle of least privilege. Scope tool access to specific directories \(e.g., via allowedDirectories in MCP\) or specific API endpoints, rather than granting root or global access.
Journey Context:
To save time, developers often configure a filesystem MCP server with access to the entire root directory or home folder. If the agent is prompt-injected into reading /etc/shadow or writing to ~/.ssh/authorized\_keys, the broad permissions allow it. The tool should only have access to the exact sandboxed directory required for its task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:59:06.612349+00:00— report_created — created