mcp-fs-shell-windows 0.2.4 → 0.2.6
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 +27 -23
- package/dist/shell/handler.js +1 -1
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# mcp-fs-shell-windows — filesystem + standalone Windows shell MCP server
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A Windows-first MCP server that gives AI clients **comprehensive filesystem access** (batched read/write/search/patch across your chosen drives and UNC shares) plus **reliable local shell execution** (synchronous, background, and interactive) — in a single Node.js process with no client-side permission toggles.
|
|
4
4
|
|
|
5
|
-
Developed and tested primarily on **Windows**: drive-letter roots (`C:\`, `D:\`) and UNC network-share roots (`\\server\\share`) are first-class, and the shell tools run commands through `cmd.exe` byte-for-byte
|
|
5
|
+
Heavily extended fork of [fabienvauchelles/mcp-filesystem-extended](https://github.com/fabienvauchelles/mcp-filesystem-extended), which itself extends the official [`@modelcontextprotocol/server-filesystem`](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem). Developed and tested primarily on **Windows**: drive-letter roots (`C:\`, `D:\`) and UNC network-share roots (`\\server\\share`) are first-class, and the shell tools run commands through `cmd.exe` byte-for-byte.
|
|
6
|
+
|
|
7
|
+
**npm:** [mcp-fs-shell-windows](https://www.npmjs.com/package/mcp-fs-shell-windows) · **Source:** [gerarddeluca/mcp-fs-shell-windows](https://github.com/gerarddeluca/mcp-fs-shell-windows)
|
|
6
8
|
|
|
7
9
|
## Provenance
|
|
8
10
|
|
|
@@ -25,34 +27,22 @@ Developed and tested primarily on **Windows**: drive-letter roots (`C:\`, `D:\`)
|
|
|
25
27
|
- Windows for the shell tools (they spawn `cmd.exe`, `taskkill`, and `powershell`). The filesystem tools work on any platform Node runs on.
|
|
26
28
|
- `shell_python` requires Python on the system PATH.
|
|
27
29
|
|
|
28
|
-
##
|
|
30
|
+
## Quick start (npm)
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
npm ci
|
|
32
|
-
npm run build
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Run the server:
|
|
32
|
+
Published on npm — `npx` downloads the server (and all dependencies) and runs it:
|
|
36
33
|
|
|
37
34
|
```bat
|
|
38
|
-
|
|
35
|
+
npx -y mcp-fs-shell-windows C:\ D:\
|
|
39
36
|
```
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Example MCP client config (Claude Desktop / LM Studio `mcp.json` style):
|
|
38
|
+
MCP client config (Claude Desktop / LM Studio `mcp.json` style):
|
|
44
39
|
|
|
45
40
|
```json
|
|
46
41
|
{
|
|
47
42
|
"mcpServers": {
|
|
48
43
|
"filesystem": {
|
|
49
|
-
"command": "
|
|
50
|
-
"args": [
|
|
51
|
-
"C:/path/to/repo/dist/index.js",
|
|
52
|
-
"C:\\",
|
|
53
|
-
"D:\\",
|
|
54
|
-
"\\\\server\\share"
|
|
55
|
-
]
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "mcp-fs-shell-windows", "C:\\", "D:\\", "\\\\server\\share"]
|
|
56
46
|
}
|
|
57
47
|
}
|
|
58
48
|
}
|
|
@@ -60,6 +50,20 @@ Example MCP client config (Claude Desktop / LM Studio `mcp.json` style):
|
|
|
60
50
|
|
|
61
51
|
The filesystem tools can only touch the passed directories (and anything under them). A root that cannot be accessed at startup logs a warning and is skipped; the server keeps running. Note that the shell tools are **not** root-restricted — see [Security](#security).
|
|
62
52
|
|
|
53
|
+
## Build from source
|
|
54
|
+
|
|
55
|
+
For developers, or to run uncommitted changes:
|
|
56
|
+
|
|
57
|
+
```bat
|
|
58
|
+
git clone https://github.com/gerarddeluca/mcp-fs-shell-windows
|
|
59
|
+
cd mcp-fs-shell-windows
|
|
60
|
+
npm ci
|
|
61
|
+
npm run build
|
|
62
|
+
node dist\index.js <allowed-dir> [more-dirs...]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
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).
|
|
66
|
+
|
|
63
67
|
### Filesystem tools (23)
|
|
64
68
|
|
|
65
69
|
| Tool | Purpose |
|
|
@@ -105,15 +109,15 @@ User commands are spawned as `cmd.exe /d /c <command>` with **verbatim argv**
|
|
|
105
109
|
|
|
106
110
|
Practical notes:
|
|
107
111
|
|
|
108
|
-
- Background jobs live in an **in-memory registry** inside the server process: the table is lost on server restart, but job log files persist (under `%TEMP%\mcp-
|
|
112
|
+
- Background jobs live in an **in-memory registry** inside the server process: the table is lost on server restart, but job log files persist (under `%TEMP%\mcp-fs-shell-windows\shell-jobs`).
|
|
109
113
|
- `timeout /t` can fail when stdin is not an interactive console — use `ping -n N 127.0.0.1 >nul` for sleeps.
|
|
110
114
|
- Synchronous calls are bounded (max 28 s) so they cannot wedge the MCP request channel; anything longer should go through `shell_start`.
|
|
111
115
|
|
|
112
116
|
## Docker
|
|
113
117
|
|
|
114
118
|
```bat
|
|
115
|
-
docker build -t mcp
|
|
116
|
-
docker run -i --rm -v /path/to/dir:/data mcp
|
|
119
|
+
docker build -t mcp-fs-shell-windows .
|
|
120
|
+
docker run -i --rm -v /path/to/dir:/data mcp-fs-shell-windows /data
|
|
117
121
|
```
|
|
118
122
|
|
|
119
123
|
The filesystem tools work in the image; the shell tools require a Windows host with `cmd.exe`.
|
package/dist/shell/handler.js
CHANGED
|
@@ -13,7 +13,7 @@ import { SHELL_MAX_TIMEOUT_SEC } from "./schema.js";
|
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
// Shared state & helpers
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
|
-
export const SHELL_JOBS_DIR = nodePath.join(os.tmpdir(), "mcp-
|
|
16
|
+
export const SHELL_JOBS_DIR = nodePath.join(os.tmpdir(), "mcp-fs-shell-windows", "shell-jobs");
|
|
17
17
|
const jobs = new Map();
|
|
18
18
|
let defaultShellCwd = process.cwd();
|
|
19
19
|
// Best-effort startup cleanup: drop job log files older than 24 h.
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-fs-shell-windows",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "MCP filesystem server: batched file tools + standalone Windows shell tools (extended fork)",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author": "Gerard",
|
|
6
|
+
"author": "Gerard DeLuca",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/gerarddeluca/mcp-fs-shell-windows.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/gerarddeluca/mcp-fs-shell-windows#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/gerarddeluca/mcp-fs-shell-windows/issues"
|
|
14
|
+
},
|
|
7
15
|
"engines": {
|
|
8
16
|
"node": ">=20"
|
|
9
17
|
},
|