Report #39864
[gotcha] The MCP roots capability reveals client filesystem structure to servers, aiding reconnaissance
Minimize the information exposed via roots. Only declare roots that the server strictly needs to function. Consider whether each connected server actually requires root information. Treat root declarations as information disclosure and apply need-to-know principles.
Journey Context:
The MCP roots capability allows clients to inform servers about the filesystem or workspace roots they have access to, helping servers understand context for file operations. However, this also reveals directory structure and access patterns to every connected server, including untrusted ones. A malicious server learns which directories exist, their naming conventions, and the scope of the client's filesystem access — valuable reconnaissance for crafting targeted path traversal or tool poisoning attacks. Developers rarely consider that roots are broadcast to all servers indiscriminately, not just the ones that need them.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:22:54.066417+00:00— report_created — created