Claude Code mode in Claude Desktop does not inherit user-configured MCP servers

Resolved 💬 3 comments Opened Mar 18, 2026 by ChristopherStavros Closed Mar 18, 2026

Bug Description

When using Claude Code mode inside Claude Desktop (sidebar mode: "code"), user-configured MCP servers from both claude_desktop_config.json and ~/.claude/settings.json are not passed to the Claude Code subprocess. Only the 3 built-in SDK servers (mcp-registry, Claude Preview, scheduled-tasks) are included in the --mcp-config argument.

Environment

  • Claude Desktop on macOS (Darwin 25.3.0, Apple Silicon)
  • Claude Code version 2.1.76
  • Model: claude-opus-4-6 (1M context)

Steps to Reproduce

  1. Configure an MCP server in claude_desktop_config.json:
{
  "mcpServers": {
    "my-server": {
      "command": "/path/to/python",
      "args": ["/path/to/mcp_server.py"]
    }
  }
}
  1. Also tried adding it to ~/.claude/settings.json and .claude/settings.json (project-level) with the same command/args format.
  1. Open Claude Desktop and switch to Code mode (sidebar).
  1. The MCP server process IS spawned by Claude Desktop (visible via ps aux), but the tools are not available in the Claude Code session.

Expected Behavior

MCP servers configured in claude_desktop_config.json and/or ~/.claude/settings.json should be available as mcp__<server-name>__<tool> tools within Claude Code sessions, just as they are in regular Claude Desktop chat sessions.

Actual Behavior

The Claude Code subprocess is launched with only built-in SDK servers:

--mcp-config {"mcpServers":{"mcp-registry":{"type":"sdk","name":"mcp-registry"},"Claude Preview":{"type":"sdk","name":"Claude Preview"},"scheduled-tasks":{"type":"sdk","name":"scheduled-tasks"}}}

User-configured MCP servers are not merged into this config. The MCP server processes are spawned (they connect to the regular chat layer) but their tools are inaccessible from Claude Code mode.

Impact

This blocks workflows that depend on custom MCP tools for project context, code intelligence, and development operations. These tools work correctly in regular Claude Desktop chat mode but not in Code mode within the same application.

Workaround Attempted

  • Tried "url" (SSE) format in ~/.claude/settings.json — not picked up
  • Tried "command" (stdio) format in ~/.claude/settings.json — processes spawn but tools not available
  • Tried adding to project-level .claude/settings.json — same result
  • All three --setting-sources (user, project, local) were tried

No workaround found. The only option is to use Claude Code CLI directly from terminal (not tested yet) or use regular Claude Desktop chat (which does have the MCP tools).

View original on GitHub ↗

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