Repository navigation
Description
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:
- On Windows, open VS Code and connect to a WSL distro using
WSL: Connect to WSL. - In a WSL shell (Node.js installed inside WSL), install the reference MCP server into
~/.local:Confirm it runs from the shell (it waits on stdin; exit with Ctrl+C):npm install -g --prefix ~/.local @modelcontextprotocol/server-everything ls -l ~/.local/bin/mcp-server-everything
~/.local/bin/mcp-server-everything - Create
~/.copilot/mcp-config.jsonin WSL:{ "mcpServers": { "everything": { "command": "/home/<user>/.local/bin/mcp-server-everything", "args": [] } } } - 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 }
- Run
MCP: List Serversfrom the Command Palette.everythingis listed as discovered from~/.copilot/mcp-config.json. - Select
everything, chooseStart Server, thenShow 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
mcp: use URI-backed defaultCwd for home-directory discovery adapters
mcp: use URI-backed defaultCwd for home-directory discovery adapters (#…
vs-code-engineering commentedon Nov 9, 2026
This bug has been fixed in the latest release of VS Code Insiders!
Eric Baum (@ericbaum), you can help us out by commenting
/verifiedif 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: Aboutin the command palette to check), and leave a comment letting us know what isn't working as expected.Happy Coding!
ericbaum commentedon Nov 10, 2026
/verified