claude-code - 💡(How to fix) Fix Bug: /mcp dialog ignores global ~/.claude/.mcp.json when project has no .mcp.json [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56437Fetched 2026-05-06 06:28:04
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Code Example

2.1.89 (Claude Code)

---

plugin:context7:context7:Connected
filesystem:Connected
context7:Connected
mariadb:Connected
playwright:Connected
sequential-thinking:Connected
git:Connected
superpowers:Connected
apify:Failed to connect

---

1 server
  Built-in MCPs (always available)
❯ plugin:context7:context7 · ✔ connected
RAW_BUFFERClick to expand / collapse

Bug Description

The /mcp dialog only shows 1 server (plugin:context7:context7) when run from a directory that lacks a project-level .mcp.json, ignoring the global ~/.claude/.mcp.json.

Steps to Reproduce

  1. Open Claude Code in a directory without a project .mcp.json (e.g., /c/Users/xchunsk/)
  2. Run the /mcp command
  3. Only shows "plugin:context7:context7" (1 server)

Expected Behavior

Should show all MCP servers configured in the global ~/.claude/.mcp.json (8 servers in my case).

Actual Behavior

/mcp dialog shows only 1 server. However, claude mcp list from the same directory shows all 8 servers correctly.

Version

2.1.89 (Claude Code)

Additional Context

claude mcp list output (correct):

plugin:context7:context7: ✓ Connected
filesystem: ✓ Connected
context7: ✓ Connected
mariadb: ✓ Connected
playwright: ✓ Connected
sequential-thinking: ✓ Connected
git: ✓ Connected
superpowers: ✓ Connected
apify: ✗ Failed to connect

/mcp dialog output (broken):

1 server
  Built-in MCPs (always available)
❯ plugin:context7:context7 · ✔ connected

The MCP resolution appears to be directory-dependent:

  • From ~/.claude/ (where global .mcp.json lives): all 8 servers
  • From project folders without their own .mcp.json: fewer servers shown in GUI

This suggests the /mcp dialog is not reading the global config file when no project-level config exists, while the claude mcp list CLI command handles this correctly.

extent analysis

TL;DR

The /mcp dialog may not be reading the global .mcp.json configuration file when run from a directory without a project-level .mcp.json, resulting in only one server being shown.

Guidance

  • Verify that the global ~/.claude/.mcp.json file is correctly formatted and contains all the expected MCP server configurations.
  • Check if the issue is specific to the /mcp dialog or if it also affects other commands that rely on the .mcp.json configuration.
  • Compare the implementation of the /mcp dialog and the claude mcp list command to identify any differences in how they handle the absence of a project-level .mcp.json file.
  • Consider adding a project-level .mcp.json file to the directory from which the /mcp command is run to see if it resolves the issue.

Example

No code snippet is provided as the issue does not contain sufficient information to create a relevant example.

Notes

The issue seems to be related to how the /mcp dialog resolves the .mcp.json configuration file when no project-level file is present. The claude mcp list command handles this scenario correctly, suggesting a potential discrepancy in the implementation.

Recommendation

Apply a workaround by creating a project-level .mcp.json file in the directory from which the /mcp command is run, or investigate the difference in implementation between the /mcp dialog and the claude mcp list command to identify a more permanent fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING