[BUG] VSCode extension doesn't load MCP servers on Windows due to drive letter case mismatch in .claude.json project key lookup

Resolved 💬 2 comments Opened Apr 8, 2026 by sap-sebelao Closed May 22, 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?

On Windows, MCP servers configured for a project are not available in the VSCode extension (the /mcp command shows "No MCP servers configured"), while the same project and same proxy/config work correctly in the CLI.

Root cause: The VSCode extension passes a lowercase drive letter (c:\...) as the working directory to the CLI subprocess, but the CLI writes project keys to ~/.claude.json with an uppercase drive letter (C:/...). The project key lookup appears to do a case-sensitive string comparison, so the VSCode subprocess finds no matching entry in .claude.json and loads no MCP servers.

What Should Happen?

Claude Code should normalize drive letter case (e.g. toLowerCase()) when writing and/or looking up project keys in .claude.json on Windows, since Windows paths are case-insensitive.

Error Messages/Logs

echo $PWD in terminal: C:\Users\...\my-project (uppercase C:)
VSCode session file cwd field: c:\\Users\\...\\my-project (lowercase c:)
.claude.json project key (written by CLI): "C:/Users/.../my-project" (uppercase C:)
VSCode subprocess lookup key after slash normalization: "c:/Users/.../my-project" — does not match

Steps to Reproduce

  1. On Windows, add MCP servers to a project via CLI: claude mcp add ... from a project directory
  2. The CLI writes a project key like "C:/Users/.../my-project" to ~/.claude.json; can be verified using /mcp with the Claude Code CLI
  3. Open the same project in VSCode and start a Claude Code session
  4. Run /mcp — shows "No MCP servers configured"

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.96

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Workaround

Manually duplicate the project entry in ~/.claude.json with both C:/... and c:/... as keys. Note: these entries will drift out of sync when MCP servers are updated via CLI vs extension.

Additional context

Most of this was analysed and found using Claude Opus, including finding the workaround, and the suggestion to post this bug report. The initial suspect was a faulty feature gate config, but after retrying with Claude Code CLI it was clear there is something else at play, given that CLI was working with the configured MCP servers normally/as expected.

Most of this was encountered in an internal project, so I can't give the exact project files and configuration files this occured with.

View original on GitHub ↗

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