[BUG] Windows: Duplicate project entries created with different drive letter capitalization (d:/ vs D:/), causing MCP servers to not load

Resolved 💬 9 comments Opened Jan 14, 2026 by dmastag Closed Apr 16, 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, Claude Code creates duplicate project entries in ~/.claude.json when the same folder is opened with different drive letter capitalizations (e.g., D:/WorkBox/project vs d:/WorkBox/project).

VSCode and CLI resolve paths differently - one uses uppercase D:/, the other lowercase d:/. Since these are stored as separate JSON keys, project-specific settings like mcpServers configured for one entry are not available when Claude uses the other path.

This causes MCP servers to appear in CLI but not in VSCode (or vice versa), even though they're configured for the "same" project.

What Should Happen?

Claude Code should normalize Windows paths to a consistent case (e.g., always uppercase drive letters) before using them as keys in .claude.json. This would prevent duplicate entries and ensure MCP servers and other project settings work consistently across CLI and VSCode.

Error Messages/Logs

2026-01-14 16:30:08.154 [info] From claude: 2026-01-14T09:30:08.154Z [ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found

I do not know if this is Related, but I keept seeing this in VSCode Claude Code: Logs
Not sure if it is related

Steps to Reproduce

Steps to Reproduce

  1. On Windows, open a project folder in Claude Code CLI (e.g., via cd D:\MyProject && claude)
  2. Add an MCP server using /mcp command
  3. Verify MCP tools work in CLI
  4. Open the same folder in VSCode using Claude Code extension
  5. Notice MCP tools are NOT available in VSCode
  6. Inspect ~/.claude.json - you'll find two entries for the same project with different drive letter cases
  7. The entry VSCode uses has empty mcpServers: {}

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.7 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

VSCode Extension:

  • Claude Code for VS Code v2.1.7
  • Publisher: Anthropic (verified ownership of anthropic.com)
  • Marketplace: ~2.9M installs

Workaround: Manually copy the mcpServers configuration from the uppercase entry to the lowercase entry in ~/.claude.json.

Root cause: Windows paths are case-insensitive, but JSON object keys are case-sensitive. The path normalization doesn't account for drive letter case.

Affected settings: This likely affects all project-specific settings, not just mcpServers:

  • allowedTools
  • mcpContextUris
  • enabledMcpjsonServers
  • etc.

Suggested fix: Normalize all Windows paths to consistent case (uppercase drive letter) before using as keys:
// Before storing/looking up path
path = path.replace(/^([a-z]):/, (m, letter) => letter.toUpperCase() + ':');

View original on GitHub ↗

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