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
Copy file name to clipboardExpand all lines: src/filesystem/README.md
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,21 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
12
12
13
13
**Note**: The server will only allow operations within directories specified via `args`.
14
14
15
+
**Security Note**: You can prevent write operations to sensitive files (such as `.env`, `.env.*`, or any custom pattern) by using the `--ignore-write` command-line argument. See below for usage.
-`<allowed-directory>`: One or more directories the server is allowed to access.
26
+
-`--ignore-write <pattern1> <pattern2> ...`: (Optional) List of filenames or glob patterns to block from write operations. Example: `--ignore-write .env .env.* *.secret`
27
+
28
+
If a file matches any of the ignore patterns, write operations to that file will be blocked, even if it is inside an allowed directory.
0 commit comments