Project-scoped MCP servers stop resolving from parent directory mid-session
Bug Description
MCP servers registered to a parent directory path stop resolving when Claude Code runs from a child directory. The servers work at session start, then silently stop being available mid-session. New sessions started from the same child directory also fail to resolve them.
Environment
- Claude Code version: 2.1.86
- Install method: native (macOS)
- Auto-updates: OFF
- macOS Darwin 24.6.0, Apple Silicon (M1 Max)
Reproduction
- Register MCP servers at a parent directory scope:
```
claude mcp add -s local gemini-cli -- npx -y gemini-mcp-tool
claude mcp add -s local codex -- codex mcp-server
claude mcp add -s local gitnexus -- npx gitnexus mcp
~/wibuz_sourcec_code`
These are registered while CWD is
- Start Claude Code from a child directory:
````
cd ~/wibuz_sourcec_code/laravel-api
claude
- Servers resolve correctly at session start. ToolSearch finds them. MCP tools work.
- After extended usage (several hours, many tool calls), servers stop being available. ToolSearch returns "No matching deferred tools found" for the same tools that worked earlier.
- Starting a NEW Claude Code session from the same child directory also fails to find the servers.
What We Found
~/.claude.jsoncontains the servers underprojects["/Users/mackmother/wibuz_sourcec_code"].mcpServers— 6 servers registered- There is NO entry for the child path
projects["/Users/mackmother/wibuz_sourcec_code/laravel-api"] - The servers were NOT deleted or overwritten — they're still in the config file
- No external process wrote to
~/.claude.json(verified via forensics — nia installer explicitly skips CLI-based IDEs) - Parent path resolution simply stopped working
Expected Behavior
Servers registered to ~/wibuz_sourcec_code should always resolve when Claude Code runs from ~/wibuz_sourcec_code/laravel-api. The parent scope should persist across sessions.
Workaround
Moved all server configs to .mcp.json in the child directory (git-tracked). This bypasses the project-scoped resolution entirely.
Impact
This caused 6 MCP servers (gemini-cli, codex, gitnexus, qmd, chrome-dev-1/2/3) to silently disappear mid-session. On a project that relies on multi-model council collaboration, this broke the entire engineering workflow. Previously caused a 48-hour fake council incident (S661) when similar MCP config loss went undetected.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗