[BUG]

Resolved 💬 2 comments Opened Apr 3, 2026 by weichaen Closed Apr 3, 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 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.json exists 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:

  1. Always start Claude Code from their home directory
  2. Create duplicate .claude/settings.json files in every project directory
  3. 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

  1. Configure MCP servers in global settings file: ~/.claude/settings.json
  2. Open a new terminal window
  3. Navigate to home directory: cd ~
  4. Start Claude Code: claude
  5. Run /mcp command
  • Result: MCP server shows as connected ✓
  1. Exit Claude Code
  2. Open a new terminal window
  3. Navigate to a subdirectory: cd ~/Project/*********
  4. Start Claude Code: claude
  5. Run /mcp command
  • 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 list shows "No MCP servers configured" in the subdirectory
  • No local .claude/settings.json exists 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 .env or 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_

View original on GitHub ↗

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