Claude Desktop vs. Claude Code MCP Config: What's Different
Claude Code and Claude Desktop read MCP server settings from completely separate files, so
adding a server in one app never makes it appear in the other. Claude Code writes to
.mcp.json or ~/.claude.json, depending on which of its three scopes
you use, while Claude Desktop keeps one global claude_desktop_config.json per
machine. If you've connected open-context's MCP server to
one app and Claude can't find it in the other, this is why.
Key takeaways
- Claude Code and Claude Desktop read separate MCP configuration files — a server registered in one is invisible to the other.
- Claude Code supports three scopes: local (private, this project only, the default), project (
.mcp.json, committed for the whole team), and user (private, every project). - Claude Desktop has exactly one config file per OS — no scopes, no per-project behavior.
claude mcp add-from-claude-desktopcopies existing Desktop server entries into Claude Code on macOS and WSL.- open-context's MCP server entry is identical JSON in both apps — only the surrounding file and scope change.
Two apps, two configs, zero overlap
Claude Code (the CLI and IDE tool) and Claude Desktop (the standalone chat app) are built and
shipped separately, and they don't share settings. Each one maintains its own list of MCP
servers, in its own file, on its own schedule. That split is easy to miss because the JSON
shape of a server entry — a command, some args, maybe an
env block — looks identical in both. It's the file it lives in, and what that
file means for who can see it, that differs.
For a project like open-context, which ships setup instructions for both apps, this is the single most common point of confusion: someone follows the Claude Code steps, confirms the server is connected, then opens Claude Desktop later and finds no trace of it.
How Claude Code stores MCP servers
Claude Code resolves servers from one of three scopes, set when you run
claude mcp add (or by hand-editing the file):
| Scope | File | Visible to |
|---|---|---|
local | ~/.claude.json, under this project's entry | Only you, only this project (default) |
project | .mcp.json at the project root | Anyone who clones the repo |
user | ~/.claude.json, top-level mcpServers key | Only you, every project |
A server's scope is fixed at add time — changing it means removing the entry and re-adding it
with a different --scope flag. Run claude mcp get <name> to see
which scope currently holds a given server.
Register open-context once, for every project
If you only use open-context's MCP server for yourself, user scope is the right
choice — register it once and it's active everywhere you run Claude Code:
{
"mcpServers": {
"open-context": {
"command": "node",
"args": ["/path/to/opencontext/dist/mcp/index.js"]
}
}
}
Paste that into the top-level mcpServers key of ~/.claude.json, or
build the equivalent with the CLI:
claude mcp add --scope user open-context -- node /path/to/opencontext/dist/mcp/index.js
Share it with a team via project scope
If a team keeps shared conventions in open-context and wants everyone's Claude Code to pick up
the same server automatically, commit a .mcp.json at the project root instead —
the same JSON block, just checked into version control:
claude mcp add --scope project open-context -- node /path/to/opencontext/dist/mcp/index.js
The first time a teammate opens the project, Claude Code prompts them to approve the server before it runs — a project file can't silently launch a process on someone else's machine.
How Claude Desktop stores MCP servers
Claude Desktop has no scopes at all. There's one file, and whatever servers it lists are available in every conversation on that machine:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
The safest way to find the exact file your installed app reads is Settings → Developer → Edit Config inside Claude Desktop itself, rather than guessing the path — installer variants have been known to disagree with the documented default. open-context's Docker-based setup for Desktop looks like this, and you restart the app after saving:
{
"mcpServers": {
"open-context": {
"command": "docker",
"args": ["run", "-i", "--rm", "-v", "opencontext-data:/root/.opencontext",
"adityakarnam/open-context:latest", "node", "dist/mcp/index.js"]
}
}
}
Moving servers between the two apps
If you already configured open-context (or anything else) in Claude Desktop and want the same servers in Claude Code, you don't have to retype the JSON. On macOS and WSL, run:
claude mcp add-from-claude-desktop
This reads your existing claude_desktop_config.json and registers each server
with the Claude Code CLI at local scope, which you can then re-add at user or
project scope if you want it everywhere. There's no equivalent command in the
other direction — Claude Desktop has no CLI, so moving a Claude Code server into it means
copying the JSON by hand into claude_desktop_config.json.
Which one should you use for open-context?
If you're the only person touching a project and want open-context's memory everywhere you run
Claude Code, use user scope. If a team shares a repo and should all get the same
MCP setup without a Slack message explaining it, commit .mcp.json at
project scope. If you mainly live in the Claude Desktop chat app rather than the
CLI, the Docker entry above in claude_desktop_config.json is the one that matters
— and nothing about open-context's tools (save_context, recall_context,
search_contexts, and the rest) changes depending on which app calls them. For the
full list of what those tools do and when Claude reaches for each one, see
the MCP tools reference; for first-time
setup end to end, see
the persistent memory setup guide.
Give Claude persistent memory in Code, Desktop, or both.
Get started with open-context →FAQ
Do I need to configure open-context twice if I use both Claude Code and Claude Desktop?
Yes. Claude Code and Claude Desktop read separate configuration files, so adding the open-context MCP server in one does not make it available in the other — you add the same command/args entry in both places, or use claude mcp add-from-claude-desktop to copy it across.
Where exactly does Claude Desktop store its MCP config?
On macOS it's ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it's %APPDATA%\Claude\claude_desktop_config.json. The Settings → Developer → Edit Config button in the app opens the exact file it reads, which is the safest way to find it.
What's the difference between local, project, and user scope in Claude Code?
Local scope (the default) registers a server only for you, in the current project, inside ~/.claude.json. Project scope writes to a .mcp.json file in the repo root that you can commit so teammates get the same servers. User scope writes to the top-level mcpServers key in ~/.claude.json and makes the server available in every project you open.
Can I copy my Claude Desktop MCP servers into Claude Code automatically?
Yes, on macOS and WSL. Running claude mcp add-from-claude-desktop reads your existing claude_desktop_config.json and registers the same servers with the Claude Code CLI, so you don't have to retype each entry.
Does the open-context MCP server behave differently in Claude Code versus Claude Desktop?
No. The same save_context, recall_context, list_contexts, search_contexts, update_context, and delete_context tools run against the same local store either way. Only the configuration file and scope you register the server in differ between the two apps.