[BUG] VS Code extension ignores cwd field when launching MCP servers, causing module path collisions

Resolved 💬 3 comments Opened Apr 4, 2026 by findingsimple Closed Apr 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Description

When two MCP servers are configured with the same -m module path but different cwd
values, the VS Code extension appears to ignore the cwd field and resolves the
module relative to the current workspace directory instead. This causes the wrong
server module to load.

The same configuration works correctly in the terminal CLI.

Works in CLI

Running claude from the terminal in the same directory correctly resolves each
server's module from its own cwd.

Environment

  • macOS (Darwin 25.3.0)
  • Claude Code VS Code extension
  • Both MCP servers use separate Python venvs with absolute paths to their

interpreters

What Should Happen?

Each server resolves src.server from its own cwd. scryfall-local exposes 6 tools (search_cards, get_card, etc.) and mtg-prices-au exposes 1 tool (get_au_price).

Error Messages/Logs

Steps to Reproduce

Reproduction

Configure two user-level MCP servers in ~/.claude.json that share a -m module path
but have different cwd values:

"mcpServers": {
"scryfall-local": {
"command": "/Users/me/Repos/scryfall-local/.venv/bin/python",
"args": ["-m", "src.server"],
"cwd": "/Users/me/Repos/scryfall-local",
"type": "stdio"
},
"mtg-prices-au": {
"command": "/Users/me/Repos/mtg-prices-au/.venv/bin/python",
"args": ["-m", "src.server"],
"cwd": "/Users/me/Repos/mtg-prices-au",
"type": "stdio"
}
}

When opened from the mtg-prices-au workspace in VS Code, scryfall-local shows only
1 tool — get_au_price — which belongs to mtg-prices-au. The workspace directory
appears to override the configured cwd, so both servers load the same module.

Even when 1 MCP starts disabled the MCP from a different working directory shows incorrect tool count.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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