Skip to content

MCP local (stdio) servers from ~/.copilot/mcp-config.json fail with spawn ENOENT on Windows client + Remote WSL #345646

Closed

Description

@ericbaum

Does this issue occur when all extensions are disabled?: Yes. But with WSL enabled because it is needed a a condition.

  • VS Code Version: 1.144.0
  • OS Version: Windows 11 client, Remote WSL: openSUSE Tumbleweed

When VS Code runs on Windows and is connected to a Linux remote (Remote WSL in my case), local/stdio MCP servers discovered from ~/.copilot/mcp-config.json on the remote fail to start with spawn <command> ENOENT, even though the executable exists and runs fine from a WSL shell. The same server definitions start correctly when placed in the remote user mcp.json, and HTTP servers from ~/.copilot/mcp-config.json are not affected.

The cause appears to be the working directory VS Code assigns to these servers. The native discovery adapters set the launch cwd to the remote home directory converted to a path on the Windows client, which produces a Windows-style path (\home\<user>). On the Linux extension host that isn't a valid absolute directory, so Node's spawn fails with ENOENT. Node reports the error against the command, not the cwd, which makes it look like the executable is missing.

This is the same class of bug as #320167 (fixed for workspace .mcp.json by #330223), but the home-directory discovery adapters weren't covered by that fix. The Claude Desktop, Cursor, and Windsurf discovery sources share the same code path and are likely affected the same way.

Steps to Reproduce:

  1. On Windows, open VS Code and connect to a WSL distro using WSL: Connect to WSL.
  2. In a WSL shell (Node.js installed inside WSL), install the reference MCP server into ~/.local:
    npm install -g --prefix ~/.local @modelcontextprotocol/server-everything
    ls -l ~/.local/bin/mcp-server-everything
    Confirm it runs from the shell (it waits on stdin; exit with Ctrl+C):
    ~/.local/bin/mcp-server-everything
  3. Create ~/.copilot/mcp-config.json in WSL:
    {
      "mcpServers": {
        "everything": {
          "command": "/home/<user>/.local/bin/mcp-server-everything",
          "args": []
        }
      }
    }
  4. In VS Code (connected to WSL), make sure Copilot config discovery is enabled in user settings (it's the default):
    "chat.mcp.discovery.enabled": { "copilot": true }
  5. Run MCP: List Servers from the Command Palette. everything is listed as discovered from ~/.copilot/mcp-config.json.
  6. Select everything, choose Start Server, then Show Output.

Expected: the server starts and exposes its tools (e.g. echo).

Actual: the server fails to start:

Starting server from Remote extension host
Connection state: Error spawn /home/<user>/.local/bin/mcp-server-everything ENOENT

Activity

  1. added
    bug
    on Nov 5, 2026
  2. added 2 commits that reference this issue on Nov 5, 2026
    17d130e
    438933f
  3. added
    unreleased
    on Nov 5, 2026
  4. added this to the 1.146.0 milestone on Nov 5, 2026
  5. added
    insiders-released
    and removed
    unreleased
    on Nov 6, 2026
  6. added
    author-verification-requested
    on Nov 9, 2026
  7. vs-code-engineering commented on Nov 9, 2026

    @vs-code-engineering
    Contributor

    This bug has been fixed in the latest release of VS Code Insiders!

    Eric Baum (@ericbaum), you can help us out by commenting /verified if things are now working as expected.

    If things still don't seem right, please ensure you're on version 142e558 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

    Happy Coding!

  8. ericbaum commented on Nov 10, 2026

    @ericbaum
    ContributorAuthor

    /verified

  9. added
    verified
    and removed
    author-verification-requested
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ai-customizationsbuginsiders-releasedmcpverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions