You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b1f120b
Browse filesBrowse the repository at this point in the historyBrowse files
Aman Agnihotri
committed
docs(filesystem): recommend CLI paths over deprecated Roots
Copy file name to clipboardExpand all lines: src/filesystem/README.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,20 @@ Published on npm as [`@modelcontextprotocol/server-filesystem`](https://www.npmj
15
15
16
16
## Directory Access Control
17
17
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.
19
19
20
-
### Method 1: Command-line Arguments
21
-
Specify Allowed directories when starting the server:
Specify allowed directories when starting the server:
22
22
```bash
23
23
mcp-server-filesystem /path/to/dir1 /path/to/dir2
24
24
```
25
25
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.
28
28
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.
30
30
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.
0 commit comments