Report #40967
[gotcha] Exposing the entire filesystem to an MCP server instead of restricting to specific directories
Always configure MCP servers with the most restrictive root directories possible. Never expose home directories or system directories unless absolutely necessary.
Journey Context:
When setting up an MCP file server, it is easy to grant access to the root or home directory to avoid file not found errors. This violates the principle of least privilege. If the agent is prompted to read sensitive files, it will succeed, leading to credential exposure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:14:02.142694+00:00— report_created — created