
This fix is part of MCP troubleshooting, within The MCP Guide. Still stuck? Request a free MCP readiness review.
When an MCP server fails to start on Windows, the cause is usually a Windows-specific detail: single backslashes in JSON paths, npx being a .cmd file, a missing APPDATA variable, or a config file in a different folder than you think. The fastest fix is to run the exact command from your config in PowerShell, fix any error there, then double every backslash in the config and restart the app from the system tray.
Checked against: the MCP local server guide, the MCP build-a-server tutorial, the Node.js child_process docs and the VS Code MCP management page on 2 November 2026, plus the source of the @modelcontextprotocol/sdk 1.32.2 npm package. eSEOspace did not run these steps on a Windows machine.
Key Takeaways
- In JSON,
C:\Usersis invalid. WriteC:\\UsersorC:/Users, as the MCP build tutorial says. - If a log shows
${APPDATA}in a path, the MCP docs say to add the expandedAPPDATAvalue to the server'senvblock. - Node's docs say
.cmdfiles "are not executable on their own without a terminal," which affectsnpxin clients that do not handle it. - On Windows, the TypeScript SDK passes only a short list of variables, such as
APPDATA,PATH,USERPROFILEandTEMP, to stdio servers by default. - Closing the Claude Desktop window does not quit it on Windows; quit from the tray icon.
What this error means
The client tried to launch a program and either Windows could not find it or the program exited at once. Typical log text includes spawn npx ENOENT, "Failed to start," or a server marked as failed.
Windows adds three twists. Paths use backslashes, which JSON treats as escape characters. Many Node tools are .cmd wrapper scripts rather than .exe files. And GUI apps may see a different set of environment variables than your PowerShell window.
The 1.32.2 TypeScript SDK shows the default environment on Windows: APPDATA, HOMEDRIVE, HOMEPATH, LOCALAPPDATA, PATH, PROCESSOR_ARCHITECTURE, SYSTEMDRIVE, SYSTEMROOT, TEMP, USERNAME, USERPROFILE and PROGRAMFILES. Anything else, such as an API key you set in your profile, must go in env.
Quick fix
- Run it in PowerShell. Copy the
commandandargsinto a PowerShell window. Fix any error you see first. - Escape paths. Change every
\in JSON strings to\\. - Find the real executable. Run
where npx,where nodeorwhere uv. The build tutorial says you "may need to put the full path to theuvexecutable in thecommandfield." - Set
APPDATAif needed. If the log mentions${APPDATA}, add it toenv, as the local server guide shows. - Install npm globally if
%APPDATA%\npmdoes not exist. The same guide givesnpm install -g npm. - Quit from the tray and reopen the app.
Example from the MCP local server guide's Windows section:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"APPDATA": "C:\\Users\\user\\AppData\\Roaming\\",
"BRAVE_API_KEY": "..."
}
}
}
}
The Brave Search reference server has since moved to the MCP project's archive of unmaintained servers, so treat this as a pattern for the env block, not a server to install.
Fix by client / OS
Claude Desktop
The config file is %APPDATA%\Claude\claude_desktop_config.json and logs are in %APPDATA%\Claude\logs. To quit, the build tutorial says to right-click the Claude icon in the system tray, which "may be hidden in the 'hidden icons' menu," and select Quit or Exit.
Users have reported that MSIX-packaged installs read a second copy of the config under %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\. See config JSON not loading for details.
npx and other .cmd launchers
The Node.js docs list ways to run .cmd files, including "spawning cmd.exe and passing the .bat or .cmd file as an argument." The TypeScript SDK's client uses the cross-spawn package, which handles this. If your client still fails, use this form:
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\you\\Desktop"]
}
}
}
Cursor
Edit %USERPROFILE%\.cursor\mcp.json or the project's .cursor\mcp.json. Cursor's MCP docs support ${userHome} and ${env:NAME} inside paths, which avoids hard-coding your user name. Check Output > MCP Logs for the error.
VS Code
Run MCP: List Servers, pick the server and choose Show Output. The VS Code page notes that per-server sandboxing for stdio servers "isn't available on Windows," so sandbox settings will not help there. Use Restart Server after changes.
Claude Code
Claude Code's claude mcp add-from-claude-desktop import works only on macOS and WSL, per the Claude Code MCP docs. On native Windows, add servers with claude mcp add instead. If you run servers inside WSL, see WSL setup errors.
Where to find the logs
| Client | Log location |
|---|---|
| Claude Desktop | %APPDATA%\Claude\logs\mcp.log and mcp-server-SERVERNAME.log |
| Cursor | Output panel, MCP Logs |
| VS Code | MCP: List Servers > Show Output |
| Claude Code | claude mcp list and claude mcp get <name> |
To read Claude Desktop logs in PowerShell, the MCP debugging guide gives type "$env:AppData\Claude\logs\mcp*.log".
If it still fails
spawn ... ENOENTmeans the program was not found. See spawn npx ENOENT or uvx not found.- Starts, then exits. Read the server log, then see Connection closed.
- Paths with spaces. Node's docs say a script filename with spaces "needs to be quoted" when run through
cmd.exe. Avoid spaces in server paths where you can. - Look up codes with the MCP error code lookup.
Rolling MCP out to a Windows-heavy team? Our MCP readiness audit can produce a standard, tested config.
More in the MCP Guide
Free tools: MCP Error Code Lookup · MCP Config Generator
Latest research: State of MCP: October 2026
Frequently asked questions
Why do backslashes break my MCP config on Windows?
In JSON, a backslash starts an escape sequence such as \n. A path like C:\Users\new turns into something else or fails to parse. Double each backslash or use forward slashes.
Do I need cmd /c for npx?
Only if your client cannot start npx directly. Clients built on the official TypeScript SDK resolve .cmd files through cross-spawn.
Where does Claude Desktop keep logs on Windows?
In %APPDATA%\Claude\logs. mcp.log covers connections, and mcp-server-SERVERNAME.log holds each server's stderr output.
Can I run Claude Desktop MCP servers inside WSL?
It is possible, but paths, environment variables and installed tools then come from the Linux side, not Windows. Our WSL setup guide covers the common errors.











