Windows: VS Code/VSCodium extension fails to spawn stdio MCP servers ("The system cannot find the path specified.") while CLI works
What's wrong
Any stdio MCP server fails to connect when launched by the VS Code / VSCodium extension, while the identical server config connects fine from the claude CLI (claude mcp list) and from the Claude Desktop session.
On connect, the extension logs:
[ERROR] "MCP server "github" Server stderr: The system cannot find the path specified.\r\n"
[DEBUG] MCP server "github": Connection failed after ~30ms: MCP error -32000: Connection closed
ERROR_PATH_NOT_FOUND from a cmd.exe child — the server binary/wrapper never executes.
Environment
- Windows 11
- VSCodium, extension
anthropic.claude-code2.1.168 (bundledresources/native-binary/claude.exe) - Same
claudeversion installed via npm globally — CLI works, extension does not - MCP server: GitHub MCP server v1.1.2 (local binary), stdio transport, single env var
GITHUB_PERSONAL_ACCESS_TOKEN
Diagnosis (extensive)
The extension's serve-mode process (native-binary/claude.exe, child of the extension host) spawns:
C:\WINDOWS\system32\cmd.exe /d /s /c "C:\…\server.exe ^"stdio^""
I captured the cmd child's PEB live at spawn (read via OpenProcess/ReadProcessMemory) across ~69 spawns:
- Command line: correct (standard Node-on-Windows quoting)
- Working directory: the opened workspace folder — exists, not a reparse point
- Environment: full, ordinary 67-variable block (
SystemRoot,ComSpec,PATH,PATHEXT,LOCALAPPDATA,TEMP,USERPROFILE, … all present and correct; no stale=C:/=D:per-drive vars)
The target binary never runs — cmd emits the error once and exits in ~30ms before executing anything.
Key test: cloning that exact command line + cwd + the full 67-variable environment block into a .NET Process.Start (and via plain cmd /d /s /c) reproduces as working — the server launches and connects. So command, cwd, and environment are conclusively not the cause.
That leaves something internal to serve-mode child-process creation on Windows — handle inheritance / STARTUPINFO / creation flags — which differs from the one-shot CLI spawn path that works with the same config. The failure is independent of the target (bare .exe and a .cmd wrapper both fail identically).
Steps to reproduce
- Windows + VSCodium (or VS Code) with the Claude Code extension.
- Add any stdio MCP server at user scope, e.g. an absolute-path
.exewithstdioarg. claude mcp listfrom a terminal → ✓ connected.- Reconnect the same server in the extension's MCP panel → fails with "The system cannot find the path specified." /
Connection closed.
Workaround
Use the remote HTTP transport (https://api.githubcopilot.com/mcp/) — it spawns no local process and connects fine in the extension.
Expected
Serve-mode (extension) should spawn stdio MCP servers the same way the one-shot CLI does, so a config that works in claude mcp list also works in the extension.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗