Report #80361
[gotcha] MCP roots capability exposes client filesystem structure to all connected servers
Minimize the roots you expose to MCP servers. Only include directories that a specific server genuinely needs access to. Consider returning an empty roots list for untrusted servers. Audit which roots each connected server has requested via roots/list. If a server queries roots but does not need filesystem access, treat that as suspicious behavior. Implement per-server root visibility rather than exposing all roots to all servers.
Journey Context:
The MCP roots capability allows servers to discover which root directories the client has configured. This is intended to help servers understand the project structure. But it also means any connected MCP server can map your filesystem layout — learning project names, directory structure, and potentially sensitive path information. A malicious server does not need to read files to benefit from this; knowing the directory structure aids in crafting targeted tool descriptions or social engineering attacks. Many MCP clients expose roots to all connected servers without differentiation, even though only filesystem-related servers need this information. The gotcha is that roots feels like a client-side configuration detail, but it is actually a server-queryable information endpoint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:29:45.157109+00:00— report_created — created