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 file.
Read that again. C:\Program. Windows tried to run a folder.
I've hit this a few times too, usually right after someone stands up a fresh machine or a new MCP client. The app never even launches your server. Here's what's actually going on and the fix that stuck.
Why it breaks
Node installs into C:\Program Files\nodejs by default. That folder has a space in it, which is normal and fine for most things.
MCP clients on Windows spawn their stdio servers through cmd.exe. When a client turns your "command": "npx" into a full path, it hands cmd something like:
C:\Program Files\nodejs\npx.cmd -y @modelcontextprotocol/server-filesystem
And cmd splits on spaces. First token it tries to execute? C:\Program. There is no executable there, so you get that error, or an ENOENT-style failure, or (annoyingly) nothing at all and a server that just never appears.
The frustrating part: quoting the path in the config does not reliably help. I tried every permutation with one reporter's setup. Double quotes around the whole path in the command value, wrapping it in cmd.exe /C with escaped inner quotes, all of it. The quotes either get passed through as literal characters, or cmd chokes on them, or the client mangles the spacing before cmd even sees it. This is a launcher-side quirk, not something you can quote your way past.
The fix that works: the 8.3 short path
Windows stores a short, no-space alias for most folders. C:\Program Files has a stable 8.3 short name:
C:\PROGRA~1
No space. And that makes all the difference. Instead of pointing the client at the long path, give it the short one:
{
"mcpServers": {
"filesystem": {
"command": "C:\\PROGRA~1\\nodejs\\npx.cmd",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\you\\Documents"
]
}
}
}
Same server, same args, but the command path has no space, so cmd can't trip over it. This is the fix that got the issue in the MCP servers repo closed out on the user's end, and it's held up for me across a few machines.
How to find the short name for your own setup
You don't have to guess PROGRA~1. On a command prompt:
dir /x C:\
You'll see the short names listed right next to the long ones, like:
PROGRA~1 Program Files
PROGRA~2 Program Files (x86)
Or grab it for one specific folder with PowerShell:
(New-Object -ComObject Scripting.FileSystemObject).GetFolder('C:\Program Files\nodejs').ShortPath
That returns something like C:\PROGRA~1\nodejs. Paste that into your command field.
One catch with the short path
8.3 short names aren't guaranteed everywhere. On hardened systems with NtfsDisable8dot3NameCreation turned on, or on volumes created after the feature was disabled, the short name won't exist. The classic sign: you type PROGRA~1 and get path-not-found.
Check with fsutil 8dot3name query C: (needs admin). If short names are off, do one of these instead:
- leave
npxon your PATH and usecommand:npx.cmd(keep the.cmd; some clients need it) - use the full absolute path to
node.exewith the server entry script, quoted - wrap it:
"command": "cmd", "args": ["/c", "npx", "-y", "..."]and keepnpxin the args, not the command field
Any of those dodges the spaced path going through cmd unquoted.
If you're on a recent setup, one more thing
The MCP docs actually ship guidance for this now, and a few clients changed how they handle the whole thing. If a fresh config still lands wrong, check two things before you go digging: that your claude_desktop_config.json is being read from the right location, and that there isn't a stale .cmd vs npx mismatch (using bare npx where the client needs npx.cmd). Both are way more common than they should be.
Bottom line
Windows MCP server won't start and the error name-drops C:\Program? That's a space-in-path problem, not a server problem. Swap the command to the 8.3 short path (C:\PROGRA~1\nodejs\npx.cmd), restart the client, and it comes up. One line you'll quietly reuse every time you wire up a new MCP server on a Windows box.