Use cmd /c to launch npx-based MCP servers on Windows
You will wrap npx MCP server commands in cmd /c so Windows can launch them without a spawn error. This fixes the case where the server silently fails to show up in Roo Code or fails with spawn npx ENOENT.
- Find npx server entryLocate the MCP server using npx as its command
- Switch to cmd /cSet command to cmd and prefix args with /c
- Save correct fileConfirm Roo wrote to the file it reads
- Restart and check cardReload VS Code and confirm the server appears
Why it matters
On Windows, npx resolves to npx.ps1, a PowerShell script, and Roo Code cannot spawn .ps1 or .bat files directly, so the server fails to start (source (opens external site)). From Roo Code 3.9.0 onward, servers launched via npx or node silently fail to spawn and the configuration card never appears (source (opens external site)). Wrapping the command in cmd is the workaround that users confirmed.
Steps
-
Open your MCP settings JSON in Roo Code and find the server entry that uses npx as its command.
-
Change the command to cmd and move npx and its arguments into the args array, with /c first:
{
"mcpServers": {
"sequential-thinking": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}
-
If the server needs credentials, add them under env for that server only, not in a shared file. The brave-search example used this pattern with an env block for its API key (source (opens external site)).
-
Save the file, then confirm which file Roo actually wrote to. Roo may save to mcp_settings.json instead of cline_mcp_settings.json, so check the file that changed (source (opens external site)).
-
Restart VS Code if the server card does not appear. Commenters reported this sometimes restored it (source (opens external site)).
-
If you use fnm or another Node version manager, make sure its bin directory is on PATH for the editor session. A contributor said Roo passes PATH to the child process and that npx resolves as long as fnm's bin directory is there (source (opens external site)).
-
If the server still fails, check the spawn error in the MCP pane. Patching Roo's source to run every command through cmd is possible, but I would not do that for a daily setup because it is a local code change, not a config option.
Common mistakes
- Writing "cmd.exe" in one place and "cmd" in another. Pick one form and keep it consistent across your servers.
- Editing the file that Edit MCP Settings opens without checking which file Roo reads.
- Putting API keys in a shared or committed config. Keep them in per-server env entries and rotate any key that leaked.
- Assuming a fix in a newer version exists. The npx spawn issue was closed without a confirmed released fix in the thread.
Notes on the other error
If you see "Server's protocol version is not supported: 2025-06-18" in Continue with a GitLab MCP server, that is a different problem. Updating the Continue extension resolved it for a commenter (source (opens external site)).
Checklist
0 of 7 done