claude-code - 💡(How to fix) Fix Feature Request: Allow Claude Desktop to be configured to only read MCP servers from claude_desktop_config.json (not ~/.claude/.claude.json)

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…

Claude Desktop currently reads MCP server definitions from both:

  1. %APPDATA%\Claude\claude_desktop_config.json
  2. ~/.claude/.claude.json (the Claude Code CLI user config)

There is no configuration option to prevent Claude Desktop from reading the Claude Code CLI config. This makes it impossible to maintain clean separation between a local development/test server (used with Claude Code CLI) and a production remote server (used with Claude Desktop).

Root Cause

The two config files appear to have been designed independently by the Claude Code and Claude Desktop teams, with Claude Desktop later being given the ability to also read the Claude Code user config — but without any opt-out mechanism for users who need isolation between the two environments.

Code Example

{
  "mcpServers": { ... },
  "preferences": {
    "readUserMcpConfig": false
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Claude Desktop currently reads MCP server definitions from both:

  1. %APPDATA%\Claude\claude_desktop_config.json
  2. ~/.claude/.claude.json (the Claude Code CLI user config)

There is no configuration option to prevent Claude Desktop from reading the Claude Code CLI config. This makes it impossible to maintain clean separation between a local development/test server (used with Claude Code CLI) and a production remote server (used with Claude Desktop).

Concrete Use Case

A developer is building and testing a local MCP server (localhost:8008) while also using a production MCP server (172.31.128.125:8008) for day-to-day work in Claude Desktop.

Desired setup:

ClientConfig fileMCP ServerEndpoint
Claude Code CLI~/.claude/.claude.jsondata-intelligencelocalhost:8008/mcp
Claude Desktopclaude_desktop_config.jsondataframe-mcp172.31.128.125:8008/mcp

Actual behavior:

Claude Desktop reads both config files and sees both MCP servers simultaneously. Depending on which server responds first at session startup, either data-intelligence or dataframe-mcp wins — creating a non-deterministic "ping-ponging" effect between sessions where you can't predict which server Claude Desktop will connect to.

Investigation

After exhaustive investigation of all config files on the system:

  • claude_desktop_config.json → defines only dataframe-mcp (remote server)
  • ~/.claude/.claude.json → defines data-intelligence (localhost) — intended for Claude Code CLI only
  • ~/.claude/settings.json → no MCP server definitions
  • No other config files define either server

The data-intelligence server appears in Claude Desktop sessions solely because Claude Desktop reads ~/.claude/.claude.json, which is the Claude Code CLI user config. There is no mechanism to prevent this.

Root Cause

The two config files appear to have been designed independently by the Claude Code and Claude Desktop teams, with Claude Desktop later being given the ability to also read the Claude Code user config — but without any opt-out mechanism for users who need isolation between the two environments.

Requested Fix

Add a preference to claude_desktop_config.json to disable reading the Claude Code user config, for example:

{
  "mcpServers": { ... },
  "preferences": {
    "readUserMcpConfig": false
  }
}

This is a one-line fix on Anthropic's end but has a significant impact on developer workflows. Testing a local MCP server while using a production server in Claude Desktop is one of the most basic developer use cases — and it is currently impossible to do cleanly.

Environment

  • Platform: Windows
  • Claude Desktop version: 1.8555.2
  • Claude Code CLI: installed separately
  • ~/.claude/.claude.json: exists with local MCP server definition
  • claude_desktop_config.json: exists with remote MCP server definition

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