[BUG]
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 Report: MCP Servers Not Loading in Subdirectories
Summary
MCP servers configured in the global settings file (~/.claude/settings.json) are not being recognized when Claude Code is started from project subdirectories, despite working correctly from the home directory.
Environment
- Claude Code Version: 2.1.91
- Platform: macOS (Darwin 25.3.0)
- Shell: zsh
- Installation Method: CLI
Configuration
- Global settings location:
/Users/*******/.claude/settings.json - MCP server configured:
github-enterprise - No local
.claude/settings.jsonexists in the project directory
Global Settings Content
{
"mcpServers": {
"github-enterprise": {
"command": "/Users/*******/.nvm/versions/node/v24.14.1/bin/node",
"args": [
"/Users/*****/.claude/mcp-servers/github-enterprise/index.js"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "********",
"GITHUB_API_URL": "*********"
}
}
}
}
What Should Happen?
Impact
This forces users to either:
- Always start Claude Code from their home directory
- Create duplicate
.claude/settings.jsonfiles in every project directory - Use symbolic links in each project
None of these are ideal solutions, and this breaks the expected behavior of global configuration.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Configure MCP servers in global settings file:
~/.claude/settings.json - Open a new terminal window
- Navigate to home directory:
cd ~ - Start Claude Code:
claude - Run
/mcpcommand
- Result: MCP server shows as connected ✓
- Exit Claude Code
- Open a new terminal window
- Navigate to a subdirectory:
cd ~/Project/********* - Start Claude Code:
claude - Run
/mcpcommand
- Result: "No MCP servers configured" ✗
Expected Behavior
Global MCP server configuration in ~/.claude/settings.json should be loaded and available regardless of the current working directory when starting Claude Code, unless explicitly overridden by a local .claude/settings.json file.
Actual Behavior
- When starting Claude Code from
/Users/*******/, the MCP server is loaded successfully - When starting Claude Code from
/Users/*******/Project/**********/, the MCP server is NOT loaded - Running
claude mcp listshows "No MCP servers configured" in the subdirectory - No local
.claude/settings.jsonexists to override the global configuration
Additional Testing
Test 1: Within the same Claude session
# While in a Claude session started from the project directory
cd /Users/****** && claude mcp list
# Result: Connected ✓
cd /Users/I585034/Project/GTT-V2-Shared-Library && claude mcp list
# Result: Connected ✓
This shows that within a single shell session, the MCP server remains connected.
Test 2: New terminal sessions
- Starting a fresh Claude session in the home directory: MCP works ✓
- Starting a fresh Claude session in the project subdirectory: MCP doesn't work ✗
Verification
- Verified global settings file exists and is readable: ✓
- Verified no local settings file exists in project directory: ✓
- Verified no
.envor other configuration files that might interfere: ✓ - Verified the issue persists across multiple new terminal sessions: ✓
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.91
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗