[BUG] CLI and VS Code extension read from different drive letter cases on Windows, breaking MCP server config

Resolved 💬 2 comments Opened Feb 5, 2026 by RalphSleiman Closed Feb 5, 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

On Windows, the Claude Code CLI and VS Code extension use different drive letter cases when resolving project paths in ~/.claude.json. This causes MCP servers to be invisible to one interface or the other depending on which case was used when the config was created.

  • CLI reads from uppercase drive letter path (e.g., C:/Users/...)
  • VS Code extension reads from lowercase drive letter path (e.g., c:/Users/...)

Since Windows paths are case-insensitive at the filesystem level, but the config lookup uses case-sensitive string matching, MCP servers configured under one case are invisible to the interface that expects the other case.

Impact

  • MCP servers configured via CLI (which writes uppercase C:) are invisible to the VS Code extension
  • MCP servers configured via VS Code extension (which writes lowercase c:) are invisible to the CLI
  • Users may believe their MCP servers are broken when they're simply stored under the "wrong" case
  • No error messages indicate the cause

What Should Happen?

Both CLI and VS Code extension should normalize Windows paths before comparison (e.g., using case-insensitive comparison or .toLowerCase()) so that:

  • MCP servers are visible regardless of which case was used when configuring
  • Both interfaces read from and write to the same project entry

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Configure an MCP server via CLI using claude mcp add - this creates a project entry with uppercase C:/Users/...
  1. Open VS Code in the same project directory
  1. Start a Claude Code session in the VS Code extension
  1. Ask Claude what MCP servers are available - the server is not found
  1. Open the integrated terminal and run claude /mcp - the server appears correctly

Verification

To confirm the case mismatch is the root cause:

  1. Add two project entries in ~/.claude.json with different drive letter cases and different MCP servers:

``json
{
"projects": {
"C:/Users/username/projects/my-project": {
"mcpServers": {
"server-uppercase": { "command": "npx", "args": ["-y", "server-a"] }
}
},
"c:/Users/username/projects/my-project": {
"mcpServers": {
"server-lowercase": { "command": "npx", "args": ["-y", "server-b"] }
}
}
}
}
``

  1. Test in CLI (claude /mcp): Only server-uppercase appears
  1. Test in VS Code extension (ask Claude what MCP servers are available): Only server-lowercase appears
  1. Check ~/.claude.json after using each interface: Session telemetry data updates under different path entries depending on which interface was used

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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