MCP servers using npx fail to connect in VS Code 1.112

Resolved 💬 6 comments Opened Mar 18, 2026 by KyuRish Closed Mar 22, 2026

Description

After updating to VS Code 1.112, all npx-based MCP servers fail to connect with error -32000: Connection closed. Python/uv-based MCP servers continue to work fine.

Environment

  • VS Code: 1.112 (March 18, 2026)
  • OS: Windows 11
  • npx: 10.9.2 (on PATH, works from integrated terminal)

Reproduction

  1. Configure npx-based MCP servers (e.g. npx -y @modelcontextprotocol/server-github)
  2. Update to VS Code 1.112
  3. All npx-based servers show MCP error -32000: Connection closed
  4. Reconnect, reload window, and full restart all fail to fix it

Diagnosis

  • Failing: All npx-based MCP servers (server-github, playwright, context7, etc.)
  • Working: All Python/uv-based MCP servers
  • Running the same npx commands from the integrated terminal works perfectly - servers start and respond to JSON-RPC initialize requests
  • This worked on VS Code 1.111 with identical configuration

Likely cause

VS Code 1.112 introduced MCP server sandboxing and enable/disable features. While sandboxing is documented as macOS/Linux only, the surrounding refactoring may have changed how the extension spawns stdio subprocesses on Windows - possibly not inheriting the full PATH or shell environment that npx needs.

Workaround

None found so far.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗