Report #76279
[gotcha] The MCP roots capability leaks filesystem layout to servers
Expose only the minimum necessary root paths. Never expose '/' or home directory roots. Use chroot-style virtual roots where possible. Treat the roots list as sensitive metadata—it reveals OS type, username conventions, and directory structure that aids reconnaissance.
Journey Context:
The MCP roots capability lets a client tell a server which filesystem directories are available. It feels like harmless context—just helping the server understand where files live. But it hands the server a map of your filesystem: OS type from path separators, username from /home/you, project names, and organizational structure. This is reconnaissance data that would require multiple probes to obtain otherwise. Developers routinely expose broad roots like the entire home directory because the capability seems purely informational. In reality, it is an information disclosure channel that a malicious server can use to craft targeted attacks or exfiltrate structural knowledge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:37:46.903860+00:00— report_created — created