Continue MCP on VSCode Remote/WSL: "cmd.exe" not found — how to fix?
Continue 1.3.24/1.2.10 in VS Code on Windows fails to start an MCP server when the workspace is on a remote Linux host or in WSL, with the error
command "cmd.exe" not found. Adding a server through the UI also fails with an ENOENT error for avscode-remote://path. Is there a config workaround so MCP servers run inside the remote environment?Originally asked on GitHub: https://github.com/continuedev/continue/issues/8732
6 answers
The issue was closed as NOT_PLANNED after being marked stale; the project did not post a fix in this thread. The workaround that worked for one commenter is to launch the MCP server through
bashon the remote side instead of letting Continue invokenpxon the Windows host.- Put the MCP config directly in
config.yaml. The UI flow that creates.continue/mcpServers/*.yamlfailed for the reporter with an ENOENT error on avscode-remote://path (the thread does not explain why). - Use
command: "bash"and setcwd: "${workspaceFolder}"orcwd: '~'. Without acwd, one user gotbash not found. - Pass the original command as arguments:
-cfollowed by the full command string.
Example from the thread that worked for the commenter's Angular server:
yamlmcpServers: - name: Angular command: "bash" cwd: "${workspaceFolder}" args: - "-c" - "npx -y @angular/cli mcp"The same workaround did not work for
chrome-devtools-mcp: both quoted and unquoted argument forms producedMCP error -32000: Connection closed. A different commenter fixed that exact error by forcing execution on the Windows host instead —command: npxwithcwd: "C:/Windows/System32/"— which requires npx installed on the Windows host. Another commenter pointed out that this defeats the purpose of WSL/remote: the server should run on the remote host, and the underlying problem was not resolved in this thread.Note: with the
cwd: "C:/Windows/System32/"workaround, the MCP server process executes on your Windows host, not in the remote environment, and uses whatever tooling and access your Windows user has.Did this work for you?- Put the MCP config directly in
What a GitHub user tried on GitHub (Didn't work)
Reporter added context7 to config.yaml with
command: npxand gotcommand "cmd.exe" not found; also tried the UI-created.continue/mcpServers/new-mcp-server.yamland got an ENOENT error for avscode-remote://path.Source: https://github.com/continuedev/continue/issues/8732 (opens external site)
Did this work for you?What @koesper tried on GitHub (Worked)
koesper moved the MCP config into config.yaml and used
command: "bash",cwd: "${workspaceFolder}", andargs: ["-c", "npx -y @angular/cli mcp"], which fixed the connection for their Angular server.Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3553189427 (opens external site)
Did this work for you?What @gund tried on GitHub (Didn't work)
gund applied the bash/cwd workaround to
chrome-devtools-mcpand gotMCP error -32000: Connection closed.Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3553539071 (opens external site)
Did this work for you?What @gund tried on GitHub (Didn't work)
gund tried both quoted and unquoted forms of the
npx -y chrome-devtools-mcp@latestargument; the result was the same connection-closed error.Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3556795180 (opens external site)
Did this work for you?What @osirisOfGit tried on GitHub (Worked)
Another user kept
command: npxand setcwd: "C:/Windows/System32/"for a GitLab MCP server, which fixed theConnection closederror by executing on the Windows host.Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3658360339 (opens external site)
Did this work for you?