Match the output to a fix
| Output shows | Fix |
|---|---|
spawn npx ENOENT / spawn node ENOENT | The command isn't on VS Code's PATH: full path or cmd /c |
| A stack trace, then the process exits | The server crashes: run its command in a terminal and fix that first |
| Nothing; startup is blocked | Trust: review the server config and Workspace Trust |
| HTTP or connection errors | Remote server: check the URL and network access |
| Server not allowed | Managed setup: ask your admin to check the MCP allowlist |
What VS Code's docs say to check
- stdio servers: "Check the command, arguments, runtime installation, and PATH in the execution environment. A command available locally might be missing remotely." That last part matters in Remote SSH, WSL and dev containers: the server runs on the remote side, where Node or uv may not be installed.
- Trust: "Startup is blocked by trust. Review the server configuration and Workspace Trust."
- Docker servers: "Don't use detached mode (
-d), because the client needs the stdio connection." - HTTP servers: "Check the endpoint and network access."
- After any fix: "restart the server and retry a request that needs its tools."
macOS: works in the terminal, fails in VS Code
VS Code's FAQ: when VS Code is launched from the dock rather than a terminal, "you don't have access to those environment settings" from your shell profile. VS Code tries to resolve your shell environment at startup (setting application.shellEnvironmentResolutionTimeout, default 10 seconds). If nvm or Homebrew paths still aren't found, use the full path to the command, or start VS Code from a terminal with code ..
Several servers failing at once
VS Code shows "Multiple MCP servers were unable to start successfully" with the list. Check each one's output separately: one missing runtime (Node, uv) usually breaks every server that uses it.
Running Claude Code, Codex or Cursor on real repos, or shipping an AI agent? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers. Request a Quick Review
FAQ
Which app shows MCP server was unable to start successfully?
VS Code. The text is in VS Code's chat MCP code (mcpCommands.ts). It only says the server failed; the reason is in the server's output.
How do I see why an MCP server failed in VS Code?
Open the MCP Servers view, choose the server's ... menu, then Show Output. Or run MCP: List Servers from the Command Palette, pick the server and choose Show Output.
Why does my MCP server work in the terminal but not in VS Code?
Often PATH: VS Code started from the dock or Start menu may not see nvm, Homebrew or uv paths from your shell profile. Use the command's full path. In Remote SSH, WSL or containers, the runtime must be installed on the remote side.
Can I run an MCP server in Docker with -d?
No. VS Code's docs say not to use detached mode, because the client needs the stdio connection.
Related errors
- spawn npx ENOENT (MCP server)
- MCP error -32000: Connection closed
- Copilot inline suggestions not working in VS Code
Sources
Read 2 Dec 2026. These tools change often: if a step no longer matches, the linked page wins.
- VS Code docs: Manage MCP servers (Troubleshoot MCP servers): code.visualstudio.com/docs/agents/run/manage-mcp-servers
- microsoft/vscode source: contrib/mcp/browser/mcpCommands.ts: github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/mcp/browser/mcpCommands.ts
- VS Code FAQ: Resolving shell environment: code.visualstudio.com/docs/supporting/faq
- MCP docs: Debugging: modelcontextprotocol.io/docs/tools/debugging
- modelcontextprotocol/servers README (Windows: wrap npx with cmd /c): github.com/modelcontextprotocol/servers
- MCP config checker: scan your mcp.json for hard-coded tokens, unpinned servers and risky access
- mcp.json config check: the same checks as a local Python check
- MCP server security scanner: check an MCP server's source before you install it
- MCP server safety directory: hand-checked grades for popular MCP servers