Skip to content

[server-filesystem] Windows: server fails to start when Node.js installed at default path (C:\Program Files\nodejs) due to space in command path #4487

Description

@Chris-CGG

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

  1. Install Node.js to default location: C:\Program Files\nodejs\
  2. Configure claude_desktop_config.json:
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem@2026.1.14", "C:\\path\\to\\dir"]
    }
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions