Skip to content

Commit b1f120b

Browse files
author
Aman Agnihotri
committed
docs(filesystem): recommend CLI paths over deprecated Roots
1 parent f46d957 commit b1f120b

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎src/filesystem/README.md‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,20 @@ Published on npm as [`@modelcontextprotocol/server-filesystem`](https://www.npmj
1515

1616
## Directory Access Control
1717

18-
The server uses a flexible directory access control system. Directories can be specified via command-line arguments or dynamically via [Roots](https://modelcontextprotocol.io/docs/learn/client-concepts#roots).
18+
The server restricts filesystem operations to allowed directories. For new configurations, specify those directories with command-line arguments. The server also supports client-provided [MCP Roots](https://modelcontextprotocol.io/specification/2026-07-28/client/roots) for existing integrations, but Roots is deprecated as of MCP `2026-07-28`; new implementations should use explicit configuration instead.
1919

20-
### Method 1: Command-line Arguments
21-
Specify Allowed directories when starting the server:
20+
### Method 1: Command-line arguments (recommended)
21+
Specify allowed directories when starting the server:
2222
```bash
2323
mcp-server-filesystem /path/to/dir1 /path/to/dir2
2424
```
2525

26-
### Method 2: MCP Roots (Recommended)
27-
MCP clients that support [Roots](https://modelcontextprotocol.io/docs/learn/client-concepts#roots) can dynamically update the Allowed directories.
26+
### Method 2: MCP Roots (deprecated)
27+
Existing MCP clients that support Roots can dynamically update the allowed directories. This remains functional for compatibility, but [the MCP specification deprecates Roots](https://modelcontextprotocol.io/specification/2026-07-28/deprecated) and recommends passing directories through tool parameters, resource URIs, or server configuration. For this server, use command-line arguments for new configurations.
2828

29-
Roots notified by Client to Server, completely replace any server-side Allowed directories when provided.
29+
Valid Roots provided by the client replace the server's allowed directories, including any set through command-line arguments. They do not add to the command-line directories.
3030

31-
**Important**: If server starts without command-line arguments AND client doesn't support roots protocol (or provides empty roots), the server will throw an error during initialization.
32-
33-
This is the recommended method, as this enables runtime directory updates via `roots/list_changed` notifications without server restart, providing a more flexible and modern integration experience.
31+
**Important**: If the server starts without command-line arguments and the client does not provide valid Roots, the server cannot operate. Existing Roots integrations can update directories at runtime via `notifications/roots/list_changed` without restarting the server.
3432

3533
### How It Works
3634

0 commit comments

Comments
 (0)