mcp-fs-shell-windows 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -12
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,14 +12,14 @@ Heavily extended fork of [fabienvauchelles/mcp-filesystem-extended](https://gith
|
|
|
12
12
|
|---|---|
|
|
13
13
|
| Official base | `@modelcontextprotocol/server-filesystem` (Anthropic, PBC; MIT) |
|
|
14
14
|
| Base fork | [fabienvauchelles/mcp-filesystem-extended](https://github.com/fabienvauchelles/mcp-filesystem-extended) @ `b6c317a` (MIT) |
|
|
15
|
-
| This fork | v0.2.1 tool parity + `transfer_files` rename, robustness patches, 8 shell tools (v0.2.2), verbatim argv (v0.2.4), `launch_file` launcher (v0.2.7) — see [Differences](#differences-from-the-base-fork) |
|
|
15
|
+
| This fork | v0.2.1 tool parity + `transfer_files` rename, robustness patches, 8 shell tools (v0.2.2), verbatim argv (v0.2.4), `launch_file` launcher (v0.2.7), raw-byte access + `dir_diff` + text encodings (v0.2.9–v0.2.11), `wait_for_file` (v0.2.12), `replace_regex` (v0.2.14), reparse-point & long-path hardening (v0.2.15–v0.2.16), Recycle-Bin deletes (v0.2.17), `create_link` (v0.2.18) — see [Differences](#differences-from-the-base-fork) |
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- **
|
|
19
|
+
- **30 filesystem tools** — batched read/write/append/delete (including raw-byte access, per-file text encodings, Recycle-Bin deletes, and link creation), move/copy, line-number patching, search (name / glob / regex / fuzzy / wait-for-file), in-place regex replacement, tree, counts, checksums, file and directory diffs, exact-match text editing. Confined to the allowed directories passed on the command line.
|
|
20
20
|
- **8 shell tools** — synchronous, background, and interactive command execution implemented *inside the MCP server process*: no client-side permission toggles, survives client restarts, works with any MCP client.
|
|
21
21
|
- **1 launcher tool** (`launch_file`, Windows-only) — opens files, folders, and http(s) links in their OS default app, fully detached: returns the moment the opener is spawned (never waits for the app), no console window, no stdio inheritance; filesystem targets are confined to the allowed directories.
|
|
22
|
-
- **Windows-first** — drive roots, UNC roots, `cmd.exe /d /c` with verbatim argv, whole-process-tree kills (`taskkill /T /F`), detached interactive console windows.
|
|
22
|
+
- **Windows-first** — drive roots, UNC roots, long paths beyond the 260-char `MAX_PATH` limit, `cmd.exe /d /c` with verbatim argv, whole-process-tree kills (`taskkill /T /F`), detached interactive console windows.
|
|
23
23
|
- **NAS-safe startup** — an allowed directory that is missing or offline (e.g., a powered-down network share) logs a warning and the server continues instead of exiting.
|
|
24
24
|
|
|
25
25
|
## Requirements
|
|
@@ -65,22 +65,22 @@ node dist\index.js <allowed-dir> [more-dirs...]
|
|
|
65
65
|
|
|
66
66
|
Then point your MCP config at `node <path-to-repo>\dist\index.js` with the allowed directories as the remaining args (same shape as the npx example above).
|
|
67
67
|
|
|
68
|
-
### Filesystem tools (
|
|
68
|
+
### Filesystem tools (30)
|
|
69
69
|
|
|
70
70
|
| Tool | Purpose |
|
|
71
71
|
|---|---|
|
|
72
|
-
| `read_files` | Read one or more files, line-numbered; `offset`/`limit` paging |
|
|
73
|
-
| `write_new_files` | Create files (per-file `overwrite`, optional `base64`
|
|
72
|
+
| `read_files` | Read one or more files, line-numbered; `offset`/`limit` paging; per-file `encoding` (utf8/utf16le/utf16be/cp1252, auto-detected when omitted) |
|
|
73
|
+
| `write_new_files` | Create files (per-file `overwrite`, `textEncoding` utf8/utf16le/utf16be/cp1252, optional `base64` for binary) |
|
|
74
74
|
| `append_files` | Append to files (creates them if missing) |
|
|
75
|
-
| `delete_files` | Delete files/directories (`recursive
|
|
75
|
+
| `delete_files` | Delete files/directories (`recursive`; junctions/symlinks are removed as links, never followed; `toRecycleBin` - Windows: send to Recycle Bin instead of permanent delete) |
|
|
76
76
|
| `copy_file` | Copy files/directories (`recursive`, `overwrite`) |
|
|
77
77
|
| `transfer_files` | Move/rename items (`overwrite`, creates parent dirs) |
|
|
78
78
|
| `patch_files` | Patch by line ranges (`replace`/`insertBefore`/`delete`, `dryRun`, git-diff output) |
|
|
79
79
|
| `create_directories` | Create directory paths (nested chains) |
|
|
80
|
-
| `list_directory` | Single-level listing (sizes, pagination, type filter, ignore globs) |
|
|
81
|
-
| `directory_tree` | Recursive tree view (JSON) with exclusion patterns |
|
|
80
|
+
| `list_directory` | Single-level listing ([FILE]/[DIR]/[LINK] prefixes, sizes, pagination, type filter, ignore globs) |
|
|
81
|
+
| `directory_tree` | Recursive tree view (JSON) with exclusion patterns; includes empty dirs and link nodes |
|
|
82
82
|
| `search_files` | Recursive case-insensitive name-substring search |
|
|
83
|
-
| `search_regex` | Content grep over a single file or directory tree (paged) |
|
|
83
|
+
| `search_regex` | Content grep over a single file or directory tree (paged; total + per-file match counts, `countOnly` mode) |
|
|
84
84
|
| `search_glob` | Glob-based file search (e.g. `**/*.ts`, paged) |
|
|
85
85
|
| `fuzzy_find_files` | Typo-tolerant name/path search (Levenshtein) |
|
|
86
86
|
| `delete_files_by_pattern` | Regex delete within a single directory |
|
|
@@ -89,8 +89,15 @@ Then point your MCP config at `node <path-to-repo>\dist\index.js` with the allow
|
|
|
89
89
|
| `content_diff` | Unified diff of two strings |
|
|
90
90
|
| `checksum_files` | md5/sha1/sha256/sha512 for files |
|
|
91
91
|
| `checksum_files_verif` | Verify files against expected hashes |
|
|
92
|
-
| `get_file_info` | Size, timestamps, type, permissions |
|
|
93
|
-
| `edit_files` | Exact-match text replacement, EOL-tolerant |
|
|
92
|
+
| `get_file_info` | Size, timestamps, type, permissions, `isReparsePoint`, (Windows) NTFS attributes |
|
|
93
|
+
| `edit_files` | Exact-match text replacement, EOL-tolerant (dominant line ending preserved) |
|
|
94
|
+
| `read_bytes` | Read raw bytes at (offset, length) as base64 JSON — any binary file, any size |
|
|
95
|
+
| `write_bytes` | Write raw bytes (base64) into an existing file at an offset — in place, or `extend` past EOF (gap zero-filled) |
|
|
96
|
+
| `replace_regex` | In-place regex replacement across one or more files; `dryRun` defaults to true (unified-diff preview); preserves dominant line endings |
|
|
97
|
+
| `dir_diff` | Recursive two-directory comparison (added/removed/changed/identical; unified diff for changed text files; `ignore` globs, `maxFiles` cap) |
|
|
98
|
+
| `convert_encoding` | Convert a file's text encoding (utf8/utf16le/utf16be/cp1252, source auto-detected) to a new file |
|
|
99
|
+
| `wait_for_file` | Poll until at least one file matching a glob appears under a directory (configurable timeout/interval) |
|
|
100
|
+
| `create_link` | Create a hardlink, directory junction, or file/directory symlink to an existing target (`auto`/`symlink`/`junction`/`hardlink`) |
|
|
94
101
|
| `list_allowed_directories` | List the allowed root directories |
|
|
95
102
|
|
|
96
103
|
### Shell tools (8, Windows-only)
|
|
@@ -149,6 +156,28 @@ The filesystem tools work in the image; the shell tools require a Windows host w
|
|
|
149
156
|
|
|
150
157
|
**v0.2.7 — `launch_file`:** the detached OS launcher (see above). Renamed from a local `open_file` prototype so it cannot collide with other servers' `open_file` tools. Hardened: spawn-failure returns an error (the handler awaits the child's `spawn`/`error` events — it never reports success for a process Windows refused to create), URLs are restricted to http(s) so `file:` URIs cannot bypass the allowed-root policy, and non-Windows platforms fail with a clear error.
|
|
151
158
|
|
|
159
|
+
**v0.2.8 — line-ending preservation:** `patch_files` and `edit_files` preserve the file's dominant line ending (CRLF or LF) on write.
|
|
160
|
+
|
|
161
|
+
**v0.2.9 — `read_bytes` / `write_bytes`:** raw binary access at (offset, length) — base64 reads from any part of a file (any size, e.g. GGUFs and blobs) and in-place byte writes into existing files (`extend: true` grows the file past EOF, zero-filling the gap).
|
|
162
|
+
|
|
163
|
+
**v0.2.10 — `dir_diff`:** recursive comparison of two directory trees — added/removed/changed/identical, unified diffs for changed text files, `ignore` glob patterns, and a `maxFiles` cap.
|
|
164
|
+
|
|
165
|
+
**v0.2.11 — text encoding support:** per-file `encoding` in `read_files` (utf8/utf16le/utf16be/cp1252, auto-detected from BOMs when omitted), `textEncoding` in `write_new_files`, and `convert_encoding` to transcode a file into a new encoding.
|
|
166
|
+
|
|
167
|
+
**v0.2.12 — `wait_for_file`:** polling file watcher — waits (up to `timeoutMs`, default 30 s, max 300 s) until at least one file matching a glob appears under a directory.
|
|
168
|
+
|
|
169
|
+
**v0.2.13 — `search_regex` match totals:** every pattern occurrence is counted (a line matching N times counts N); responses end with the total and per-file counts, and `countOnly: true` returns counts without the matching line text.
|
|
170
|
+
|
|
171
|
+
**v0.2.14 — `replace_regex`:** in-place regex replacement across one or more files (directories are rejected). `dryRun` defaults to `true` with a unified-diff preview; applied replacements preserve each file's dominant line ending; a missing path or invalid regex errors without writing anything.
|
|
172
|
+
|
|
173
|
+
**v0.2.15 — reparse-point safety:** junctions/symlinks are never followed. `delete_files` removes them as links (including nested links inside recursive deletes) without touching their targets; `list_directory` shows `[LINK]` entries; `directory_tree` reports link nodes and includes empty directories; `get_file_info` adds `isReparsePoint` and (on Windows) NTFS attributes.
|
|
174
|
+
|
|
175
|
+
**v0.2.16 — long-path support:** paths beyond the 260-char `MAX_PATH` limit work on Windows via `\\?\` extended-length form (drive and UNC), transparent to callers.
|
|
176
|
+
|
|
177
|
+
**v0.2.17 — `delete_files` `toRecycleBin`:** send deletes to the Windows Recycle Bin instead of permanent removal. Reparse points are still removed as links (the bin cannot hold them), and any path that cannot be recycled is reported as an error — never silently hard-deleted.
|
|
178
|
+
|
|
179
|
+
**v0.2.18 — `create_link`:** create hardlinks, directory junctions, and file/directory symlinks (`type: auto | symlink | junction | hardlink`) with strict checks: the target must exist, the link path must not, and the link path's parent must exist.
|
|
180
|
+
|
|
152
181
|
## Security
|
|
153
182
|
|
|
154
183
|
- The filesystem tools are confined to the allowed directories passed at startup (and their subtrees).
|
package/dist/server.js
CHANGED
package/package.json
CHANGED