Skip to content

Problem MCP on remote server #8732

Closed as not planned
Closed as not planned

Description

@daunt

Before submitting your bug report

Relevant environment info

- OS: windows
- Continue version: 1.3.24 / 1.2.10
- IDE version: vscode
- Model: - 
- config:
  
mcpServers:
  - name: context7
    command: npx
    args:
      - "-y"
      - "@upstash/context7-mcp"

Description

I'm using a remote server (Linux) in VScode, and when I use mcp in the config.yaml, I get the error:

Failed to connect to "context7" Error: command "cmd.exe" not found. To use this MCP server, install the cmd.exe CLI.

Then I tried adding a new mcp using the available features.

.continue/mcpServers/new-mcp-server.yaml

and got the error

ENOENT: no such file or directory, open 'C:\Users\xxxxx\AppData\Local\Programs\Microsoft VS Code\vscode-remote:\tunnel%2Btunnel-dev\workspace\test-project.continue\mcpServers\new-mcp-server.yaml'. > vscode-remote://tunnel%2Btunnel-dev/workspace/test-project/.continue/mcpServers/new-mcp-server.yaml

To reproduce

No response

Log output

Activity

  1. added
    area:mcp
    ide:vscode
    kind:bug
    os:windows
    on Nov 15, 2025
  2. gund commented on Nov 17, 2025

    @gund

    Same problem but I'm running VSCode in WSL which should not try to use cmd.exe or anything windows related at all.
    Any idea how to fix it?

  3. koesper commented on Nov 19, 2025

    @koesper

    I got it to work!

    1. Add the MCP configuration directly to the config.yaml,
      Instead of as a separate file in .continue/mcpServers/foo.yaml.
      This solved the ENOENT error for me.
    2. Use command: "bash" instead of command: "npx"
    3. Give bash a folder to work from: cwd: '~' or cwd: "${workspaceFolder}"
      Otherwise you'll get 'bash not found'

    This was my settings.yaml

    ... your original settings like name/models/context etc...
    
    mcpServers:
      - name: Angular
          command: "bash"
          cwd: "${workspaceFolder}" 
          args:
            - "-c"       #you need this so you can pass the rest of the command as an argument
            - "npx -y @angular/cli mcp"      #or whatever your MCP server wants
    
  4. gund commented on Nov 19, 2025

    @gund

    @koesper thanks for sharing your solution.

    When I tried it I get the following error:

    Failed to connect to "chrome-devtools"
    Error: MCP error -32000: Connection closed
    

    My config.yaml with mcp config:

    mcpServers:
      - name: chrome-devtools
        command: bash
        cwd: '${workspaceFolder}'
        args:
          - -c
          - npx -y chrome-devtools-mcp@latest
    
  5. koesper commented on Nov 20, 2025

    @koesper

    @gund Allright, it looks like you are at least one step closer than you were before :D
    can you try the arguments with quotes around it?

    mcpServers:
      - name: chrome-devtools
        command: bash
        cwd: '${workspaceFolder}'
        args:
          - "-c"
          - "npx -y chrome-devtools-mcp@latest"
    
  6. gund commented on Nov 20, 2025

    @gund

    @gund Allright, it looks like you are at least one step closer than you were before :D
    can you try the arguments with quotes around it?

    mcpServers:
      - name: chrome-devtools
        command: bash
        cwd: '${workspaceFolder}'
        args:
          - "-c"
          - "npx -y chrome-devtools-mcp@latest"
    

    Yep I tried with and without quotes - the result is the same error as above unfortunately...

  7. osirisOfGit commented on Dec 16, 2025

    @osirisOfGit

    Heya, wanted to tack onto this - instead of having the servers execute in the WSL content, i set the CWD to windows System32:

      - name: GitLab
        command: npx
        cwd: "C:/Windows/System32/"
        args:
          - mcp-remote
          - "https://gitlab.com/api/v4/mcp"
        env: {}

    This fixed the Error: MCP error -32000: Connection closed i was getting, same as above

    Image
  8. gund commented on Dec 16, 2025

    @gund

    Heya, wanted to tack onto this - instead of having the servers execute in the WSL content, i set the CWD to windows System32:

    I get that it tries to execute on the host and you can make it work there, but the entire bug is that it should not even try to execute on the host when you are in a remote env like WSL or SSH or Container - it should always run on the remote host because you do not want to install anything on your host in the first place.

    For example I do not even have nodejs on my windows host and I do not want to install or run anything there, that defeats the entire purpose of having WSL.

  9. github-actions commented on Mar 17, 2026

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  10. github-actions commented on Mar 27, 2026

    @github-actions
    Contributor

    This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:mcpide:vscodekind:bugos:windowsstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions