{"slug": "mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix", "title": "MCP servers won't start on Windows: the 'C:\\Program' space-in-path fix", "summary": "A developer identified a Windows-specific issue where MCP servers fail to start because the path to npx contains a space, causing cmd.exe to misinterpret 'C:\\Program' as a command. The fix involves using the 8.3 short path 'C:\\PROGRA~1\\nodejs\\npx.cmd' in the client configuration. The developer also provides methods to find short names and alternative workarounds for systems where short names are disabled.", "body_md": "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.\n\nNothing starts. The server row just sits there. In some clients you get the real error, and it's a weird one:\n\n```\n'C:\\Program' is not recognized as an internal or external command,\noperable program or batch file.\n```\n\nRead that again. `C:\\Program`\n\n. Windows tried to run a folder.\n\nI'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.\n\nNode installs into `C:\\Program Files\\nodejs`\n\nby default. That folder has a space in it, which is normal and fine for most things.\n\nMCP clients on Windows spawn their stdio servers through `cmd.exe`\n\n. When a client turns your `\"command\": \"npx\"`\n\ninto a full path, it hands `cmd`\n\nsomething like:\n\n```\nC:\\Program Files\\nodejs\\npx.cmd -y @modelcontextprotocol/server-filesystem\n```\n\nAnd `cmd`\n\nsplits on spaces. First token it tries to execute? `C:\\Program`\n\n. 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.\n\nThe 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`\n\nwith 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.\n\nWindows stores a short, no-space alias for most folders. `C:\\Program Files`\n\nhas a stable 8.3 short name:\n\n```\nC:\\PROGRA~1\n```\n\nNo space. And that makes all the difference. Instead of pointing the client at the long path, give it the short one:\n\n```\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"C:\\\\PROGRA~1\\\\nodejs\\\\npx.cmd\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-filesystem\",\n        \"C:\\\\Users\\\\you\\\\Documents\"\n      ]\n    }\n  }\n}\n```\n\nSame server, same args, but the command path has no space, so `cmd`\n\ncan'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.\n\nYou don't have to guess `PROGRA~1`\n\n. On a command prompt:\n\n```\ndir /x C:\\\n```\n\nYou'll see the short names listed right next to the long ones, like:\n\n```\nPROGRA~1        Program Files\nPROGRA~2        Program Files (x86)\n```\n\nOr grab it for one specific folder with PowerShell:\n\n```\n(New-Object -ComObject Scripting.FileSystemObject).GetFolder('C:\\Program Files\\nodejs').ShortPath\n```\n\nThat returns something like `C:\\PROGRA~1\\nodejs`\n\n. Paste that into your command field.\n\n8.3 short names aren't guaranteed everywhere. On hardened systems with `NtfsDisable8dot3NameCreation`\n\nturned on, or on volumes created after the feature was disabled, the short name won't exist. The classic sign: you type `PROGRA~1`\n\nand get path-not-found.\n\nCheck with `fsutil 8dot3name query C:`\n\n(needs admin). If short names are off, do one of these instead:\n\n`npx`\n\non your PATH and use `command`\n\n: `npx.cmd`\n\n(keep the `.cmd`\n\n; some clients need it)`node.exe`\n\nwith the server entry script, quoted`\"command\": \"cmd\", \"args\": [\"/c\", \"npx\", \"-y\", \"...\"]`\n\nand keep `npx`\n\nin the args, not the command fieldAny of those dodges the spaced path going through cmd unquoted.\n\nThe 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`\n\nis being read from the right location, and that there isn't a stale `.cmd`\n\nvs `npx`\n\nmismatch (using bare `npx`\n\nwhere the client needs `npx.cmd`\n\n). Both are way more common than they should be.\n\nWindows MCP server won't start and the error name-drops `C:\\Program`\n\n? 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`\n\n), 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.", "url": "https://wpnews.pro/news/mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix", "canonical_source": "https://dev.to/milkyway008/mcp-servers-wont-start-on-windows-the-cprogram-space-in-path-fix-2daa", "published_at": "2026-08-21 17:22:15+00:00", "updated_at": "2026-08-21 17:44:45.583497+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Windows", "Node.js", "MCP", "Claude Desktop", "cmd.exe", "npx", "PROGRA~1"], "alternates": {"html": "https://wpnews.pro/news/mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix", "markdown": "https://wpnews.pro/news/mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix.md", "text": "https://wpnews.pro/news/mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix.txt", "jsonld": "https://wpnews.pro/news/mcp-servers-won-t-start-on-windows-the-c-program-space-in-path-fix.jsonld"}}