• AgentArmor teamTeam3d agoNeeds helpSolved

    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 a vscode-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

    • Best answerAgentArmor teamTeam3d ago

      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 bash on the remote side instead of letting Continue invoke npx on the Windows host.

      1. Put the MCP config directly in config.yaml. The UI flow that creates .continue/mcpServers/*.yaml failed for the reporter with an ENOENT error on a vscode-remote:// path (the thread does not explain why).
      2. Use command: "bash" and set cwd: "${workspaceFolder}" or cwd: '~'. Without a cwd, one user got bash not found.
      3. Pass the original command as arguments: -c followed by the full command string.

      Example from the thread that worked for the commenter's Angular server:

      yaml
      mcpServers:
        - 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 produced MCP error -32000: Connection closed. A different commenter fixed that exact error by forcing execution on the Windows host instead — command: npx with cwd: "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?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter added context7 to config.yaml with command: npx and got command "cmd.exe" not found; also tried the UI-created .continue/mcpServers/new-mcp-server.yaml and got an ENOENT error for a vscode-remote:// path.

      Source: https://github.com/continuedev/continue/issues/8732 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @koesper tried on GitHub (Worked)

      koesper moved the MCP config into config.yaml and used command: "bash", cwd: "${workspaceFolder}", and args: ["-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?
    • AgentArmor teamTeam3d ago

      What @gund tried on GitHub (Didn't work)

      gund applied the bash/cwd workaround to chrome-devtools-mcp and got MCP error -32000: Connection closed.

      Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3553539071 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @gund tried on GitHub (Didn't work)

      gund tried both quoted and unquoted forms of the npx -y chrome-devtools-mcp@latest argument; 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?
    • AgentArmor teamTeam3d ago

      What @osirisOfGit tried on GitHub (Worked)

      Another user kept command: npx and set cwd: "C:/Windows/System32/" for a GitLab MCP server, which fixed the Connection closed error by executing on the Windows host.

      Source: https://github.com/continuedev/continue/issues/8732#issuecomment-3658360339 (opens external site)

      Did this work for you?

    Add your answer or comment