Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

MCP servers won't start on Windows: the 'C:\Program' space-in-path fix

You follow all the setup steps. Node is installed the normal way, on the default path. You drop an MCP server into your Claude Desktop config, pointing command at npx. You save, restart, and wait. Nothing starts. The server row just sits there. In some clients you get the real error, and it's a weird one: 'C:\Program' is not recognized as an internal or external command, operable program or batch…

MCP server startup issues on Windows can be attributed to a problem with paths containing spaces. By default, Node.js installations create folders like C:\Program Files\nodejs, which have spaces in their names. MCP clients on Windows execute commands through cmd.exe, and when the `command` value is parsed, the space causes cmd to incorrectly split the path. This leads to cmd.exe trying to execute C:\Program, a non-existent file, and ultimately failing to start the server.

The solution to this issue is to use the 8.3 short path name instead of the long path name. The 8.3 short path is a compact, no-space alias for long folder names, created by Windows. For example, C:\Program Files can be referenced as C:\PROGRA~1, where "~1" represents the space. To determine the short path for your specific setup, you can use the `dir /x C:\` command or retrieve it programmatically through PowerShell.

Once you have the short path, update the `command` value in your `claude_desktop_config.json` file accordingly. This will resolve the error and allow the MCP server to start successfully.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Friday 21 August →