modelcontextprotocol / modelcontextprotocol/servers
[server-filesystem] Windows: server fails to start when Node.js installed at default path (C:\Program Files\nodejs) due to space in command path
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
Environment
- OS: Windows 11 (domain-joined, service account
manifold.svc) - Claude Desktop: latest (2026)
- Node.js install path:
C:\Program Files\nodejs\(default Windows installer location) - server-filesystem version:
@modelcontextprotocol/server-filesystem@2026.1.14
Description
The filesystem MCP server fails to start on Windows when Node.js is installed in the default location (C:\Program Files\nodejs) because the path contains a space. Claude Desktop passes the command value through cmd.exe, which splits the path at the space and attempts to execute C:\Program as a standalone command.
This affects every Windows user who installs Node.js to its default location — which is the majority of users.
Error
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Steps to Reproduce
- Install Node.js to default location:
C:\Program Files\nodejs\ - Configure
claude_desktop_config.json:"filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem@2026.1.14", "C:\\path\\to\\dir"] } - Launch Claude Desktop — server immediately disconnects on every attempt.
What Was Tried
Every quoting approach via cmd.exe fails:
| Config | Error |
|---|---|
"command": "npx" |
Claude Desktop resolves to C:\Program Files\nodejs\npx.cmd, passes unquoted → splits at space |
"command": "cmd.exe", "args": ["/C", "\"C:\\Program Files\\nodejs\\npx.cmd\"", "-y", "..."] |
The filename, directory name, or volume label syntax is incorrect |
| Single-string cmd /C with inner quotes | '"C:\Program Files\nodejs\npx.cmd"' is not recognized — quotes passed as literals |
Workaround
Use the Windows 8.3 short path, which has no spaces and requires no quoting:
"filesystem": {
"command": "C:\\PROGRA~1\\nodejs\\npx.cmd",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2026.1.14",
"C:\\Users\\username\\allowed-directory"
]
}
PROGRA~1 is the stable 8.3 short name for Program Files on all Windows systems. This has been tested and confirmed working on Windows 11.
Suggested Fix
The Claude Desktop documentation for Windows should prominently document the 8.3 short path workaround. Alternatively, the server package or Claude Desktop launcher should internally resolve the Node.js path using where.exe npx and apply proper quoting before passing to the shell.
Related Issues
- #447 — covers spaces in allowed directory paths (different from this issue, which is about spaces in the command path)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Windows configuration example in claude_desktop_config.json and the reported cmd.exe handling of npx.cmd at C:\Program Files\nodejs. Confirm whether this belongs in Claude Desktop documentation or requires a launcher change; done means a documented or tested configuration that starts the server without the path-splitting error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- documentation, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100