---
title: Do MCP roots restrict which files a server can read?
url: https://opencontroller.lyzr.com/blog/mcp-roots-and-file-access
published: 2026-11-15
updated: 2026-11-15
author: Lyzr
---

# Do MCP roots restrict which files a server can read?

**No. MCP roots tell a server which directories the client considers relevant, but the protocol does not enforce them. The specification calls roots "informational guidance rather than an access-control mechanism." A local MCP server can read any file its operating-system user can read, so real file restrictions come from sandboxing and OS permissions, not from roots.**

The question matters because roots look like a sandbox. A client shows a folder picker, the user chooses a project, and it feels as if the server is now confined to it. It is not. This post is part of the tools and MCP series; the pillar is [how to govern MCP servers](/blog/how-to-govern-mcp-servers).

## What are MCP roots?

Roots are a client feature in the Model Context Protocol. A client that supports them can share a list of `file://` URIs with a server, each with an optional name, such as a project directory or a few repositories. The server can ask for the list and use it to focus its work.

The [roots page of the MCP specification](https://modelcontextprotocol.io/specification/2026-07-28/client/roots) states plainly that the protocol does not enforce that servers stay within roots.

## Are roots still part of MCP?

They are deprecated. As of protocol version 2026-07-28, roots are marked deprecated (SEP-2577). Under the MCP feature lifecycle policy they stay in the specification for at least twelve months before they can be removed. New implementations should not adopt them. Existing ones should pass directories or files through tool parameters, resource URIs or server configuration instead.

For governance, that changes nothing about enforcement. Neither roots nor their replacements confine a server. They only describe intent. See [what changed in the July 2026 MCP specification](/blog/mcp-specification-july-2026-changes).

## What does the specification actually require?

| Party | Requirement level | What it says |
|---|---|---|
| Client | MUST | Only expose roots with appropriate permissions |
| Client | MUST | Validate root URIs to prevent path traversal |
| Client | MUST | Implement proper access controls |
| Server | SHOULD | Respect root boundaries during operations |
| Server | SHOULD | Validate all paths against provided roots |

"SHOULD" is a recommendation. A server that ignores it is still a conforming server, and a malicious or buggy one will ignore it anyway. The client's MUSTs are about what it shares, not about what the server can reach.

## Why can a local server read beyond its roots?

A local MCP server using the stdio transport is a process on the user's machine. It runs with that user's permissions. If the user can read `~/.ssh`, a browser profile or a cloud credentials file, so can the server. Roots are a message the server receives. They do not change the process's file system rights.

A remote server is different: it can only read what the client sends it or what its own credentials reach. But the same rule applies. Its boundaries come from where it runs and what it holds, not from roots. See [MCP stdio vs streamable HTTP security](/blog/mcp-stdio-vs-streamable-http-security).

## How do you actually restrict file access?

Use controls the operating system enforces.

1. **Run the server in a container** with only the project directory mounted, read-only where possible.
2. **Use an OS sandbox** where available, such as macOS sandbox profiles or Linux namespaces with seccomp and Landlock.
3. **Run under a dedicated low-privilege user** that cannot read the developer's home directory.
4. **Keep secrets out of reach.** Credentials files, SSH keys and browser profiles should not be readable by the server's user.
5. **Block network egress** for servers that only need local files, so data cannot leave even if it is read.
6. **Prefer servers that take explicit paths as tool parameters**, which you can validate in a gateway or wrapper.
7. **Inventory local servers** so you know which ones exist and what they run as. See [how to find local MCP servers on developer laptops](/blog/find-local-mcp-servers-on-developer-laptops).

For a fuller walkthrough, see [how to sandbox MCP servers](/blog/how-to-sandbox-mcp-servers).

## How Opencontroller does this

Opencontroller Edge extends control to developer devices, coding agents, skills and local MCP servers, and IT installs it through MDM. That gives you an inventory of the local servers that roots would never confine. In the cloud, Opencontroller keeps a governed registry of agents, tools and MCP servers, and Posture flags risky permission and configuration patterns. [Book a demo](https://www.lyzr.ai/book-demo/) to see it on your estate.

## Frequently asked questions

**Do MCP roots sandbox a server?**
No. The specification describes roots as informational guidance, not access control. The protocol does not enforce them.

**Are MCP roots deprecated?**
Yes. They are deprecated as of protocol version 2026-07-28 and remain in the specification for at least twelve months before they can be removed.

**What actually limits a local MCP server's file access?**
Operating-system controls: containers, OS sandboxes, a dedicated low-privilege user and keeping secrets unreadable by that user.

## Key facts

MCP roots are file:// URIs a client shares with a server to indicate relevant directories. The MCP specification calls them informational guidance rather than an access-control mechanism; the protocol does not enforce them. Roots are deprecated as of protocol version 2026-07-28 (SEP-2577) and remain for at least twelve months. Local stdio servers run with the user's OS permissions. Restrict file access with containers, OS sandboxes, dedicated low-privilege users and egress blocking. Opencontroller Edge inventories and governs local MCP servers on developer devices, installed via MDM.

## Related

- [How do you sandbox an MCP server?](https://opencontroller.lyzr.com/blog/how-to-sandbox-mcp-servers.md)
- [Is a local stdio MCP server safer than a remote HTTP one?](https://opencontroller.lyzr.com/blog/mcp-stdio-vs-streamable-http-security.md)
- [How do you find local MCP servers on developer laptops?](https://opencontroller.lyzr.com/blog/find-local-mcp-servers-on-developer-laptops.md)
- [More on Tools and MCP](https://opencontroller.lyzr.com/blog/cluster/tools-and-mcp)
