MCP roots
A list of folders, as file:// URIs, that an MCP client tells a server it considers relevant, so the server can focus its work there. Roots are guidance, not an access control, and 2026-07-28 deprecates them.
A coding assistant opens a project, and a filesystem or git server needs to know which project. Roots are how the client says so. The client declares the roots capability; the server asks with roots/list; the client answers with a list of roots, each a file:// URI with an optional name. In 2025-11-25 the server sends roots/list as its own request on the session, and a client that declared listChanged sends notifications/roots/list_changed when the user switches folders. In 2026-07-28 the server instead returns an input_required result that asks for roots/list, and the client retries its call with the answer.
Roots are a client feature, like elicitationElicitation (MCP): An MCP server asking the person for input through the client, usually while it handles a request such as a tool call: a message with a simple form, or a URL to open for sensitive steps. and samplingSampling (MCP): An MCP server asking the client to run a model call on its behalf, so a tool can use the client's model without its own API key.: the server asks, and the client answers.
Example
{"jsonrpc":"2.0","id":1,"result":{"roots":[
{"uri":"file:///home/ana/repos/frontend","name":"Frontend"},
{"uri":"file:///home/ana/repos/backend","name":"Backend"}]}}In 2025-11-25, a client without roots support should answer roots/list with -32601 (method not found).
Common confusion
Roots are not a sandbox. The 2026-07-28 text says they are "informational guidance rather than an access-control mechanism" and adds: "The protocol does not enforce that servers stay within roots." A server process can read whatever its operating system lets it read, roots or not. That is why the specification puts duties on both sides: clients must validate root URIs against path traversal and should ask the user before exposing them, and servers should validate every path against the roots they were given. Real confinement comes from the operating system: a container, a separate user, read-only mounts. That is least privilegeLeast privilege: The security principle that each user, program or agent gets only the access it needs for its task, and nothing more., applied below the protocol.
The 2026-07-28 revision deprecates roots. It stays in the specification for at least twelve months; the migration path is to pass folders or files as tool parameters, resource URIs or server configuration.
In L2M
L2M does not declare the roots capability. On a 2025-11-25 session it answers a server's roots/list with -32601, and on 2026-07-28 a request for roots ends the call with an error. To confine what a local server can touch, run it in a sandboxed container: host folders can be mounted only under MCP_SANDBOX_ALLOWED_MOUNT_ROOTS (none by default) and are read-only unless marked writable. Pass the folder a tool should use as an argument or in the server's command line.
Further reading
- MCP specification 2025-11-25: roots (modelcontextprotocol.io)
- MCP specification 2026-07-28: roots (modelcontextprotocol.io)
- MCP 2026-07-28: deprecated features (modelcontextprotocol.io)