Where every MCP client keeps its config file
Five clients, five different answers, and no two of them agree on the format, the key the servers live under, or what makes a server count as switched on. This page is the reference table, followed by the specific quirk in each client that costs people an afternoon.
| Client | macOS | Windows | Format | Servers key |
|---|---|---|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
%APPDATA%\Claude\claude_desktop_config.json |
JSON | mcpServers |
| Claude Code | ~/.claude.json |
%USERPROFILE%\.claude.json |
JSON | mcpServers |
| Cursor | ~/.cursor/mcp.json |
%USERPROFILE%\.cursor\mcp.json |
JSON | mcpServers |
| VS Code | ~/Library/Application Support/Code/User/mcp.json |
%APPDATA%\Code\User\mcp.json |
JSONC | servers |
| Codex | ~/.codex/config.toml |
%USERPROFILE%\.codex\config.toml |
TOML | mcp_servers |
Two of these will catch you out. VS Code is the only client that keys its servers under servers rather than mcpServers — a block copied from any other client will parse fine and do nothing. And Codex is the only one using TOML, so a pasted JSON block is not a near-miss, it is a syntax error.
The four things that differ between clients
Knowing the path is the easy half. The reason a working server in one client refuses to appear in another usually comes down to one of these:
- The key name.
mcpServersin three clients,serversin VS Code,mcp_serversin Codex. - The file format. Plain JSON in three, JSONC in VS Code — where comments and trailing commas are expected and must survive an edit — and TOML in Codex.
- What counts as "enabled". In most clients a server is on because it is present in the file. Codex has a real
enabled = falseflag. Claude Code keeps its off-switch in a completely different file. Cursor and VS Code keep theirs somewhere you cannot edit by hand at all. - Scope. Some clients separate a user-wide setup from a per-project one. A server configured for the project you had open is invisible everywhere else, and that is by design.
The specific quirk in each client
Claude Desktop
- Also reads
~/Library/Application Support/Claude/Claude Extensions·%APPDATA%\Claude\Claude Extensions- On/off state for extensions
~/Library/Application Support/Claude/Claude Extensions Settings, under theisEnabledflag
An empty config file is normal, not broken. On current builds claude_desktop_config.json often has no mcpServers key at all, because servers arrive as extension bundles instead. A config containing only coworkUserFilesPath and preferences is a healthy config, and a great deal of time gets lost assuming otherwise.
Extensions keep their launch command in manifest.json under server.mcp_config, and their arguments frequently contain ${__dirname}. That placeholder is relative to the extension's own bundle directory and is expanded by Claude Desktop at launch — copying such an argument into another client's config verbatim will not work.
Claude Code
- Off-switch lives in
~/.claude/settings.json·%USERPROFILE%\.claude\settings.json, underdeniedMcpServers
~/.claude.json is not a small config file. It also stores per-project history and routinely runs to hundreds of kilobytes. Opening it expecting a tidy twenty-line document is a surprise, and editing it in something that reformats on save is a bad idea.
Only the top-level mcpServers is your user-wide setup (user scope). Entries under projects.<path>.mcpServers are local scope, which is where claude mcp add writes by default, and apply only inside that directory. A .mcp.json committed in a repository is project scope.
Enablement is the real trap: it lives in a different file entirely. deniedMcpServers in ~/.claude/settings.json is an array of objects each carrying a serverName. A denied server stays fully defined in your config and simply does not run — so a server that looks correctly configured, and is, can still be switched off from somewhere you were not looking.
Cursor
The same mcpServers shape as Claude Desktop, plus envFile, headers and auth fields.
Cursor's own enable/disable toggle does not live in mcp.json. It is stored internally, which means the file can look completely correct while the server is switched off in the interface. If a server is present in the file and still not running, check the toggle in Cursor itself.
One more thing worth knowing: ~/.cursor survives uninstalling Cursor. Finding that directory on a machine is not evidence that the client is installed.
VS Code
The only client that keys servers under servers. If you have pasted a block from a README written for Claude Desktop and nothing happened, this is almost always why — the JSON is valid, so nothing complains.
The file is JSONC. Comments and trailing commas are legal and any tool that rewrites the file should preserve them.
Enabled and disabled state is kept in globalStorage/state.vscdb, a SQLite database. It is not hand-editable in any reasonable sense, so treat presence in mcp.json as the only lever you control directly.
On an installation that has never configured MCP, mcp.json often does not exist yet. That is expected — create it.
Codex
- Also reads
~/.codex/plugins·%USERPROFILE%\.codex\plugins, each plugin carrying its own.mcp.json
The only TOML client — and the only one whose off-switch is genuinely pleasant. Set enabled = false on the server's own [mcp_servers.<name>] table and the definition stays exactly where it is.
Environment variables go in a [mcp_servers.<name>.env] sub-table, which means fully removing a server means removing two tables, not one. Leaving the orphaned .env table behind is a common and confusing leftover.
Like Claude Code's file, this one is not small: a real config.toml carries dozens of [projects."…"] tables recording per-directory history. None of that should move when you add a server.
Finally, two front ends share this one config — the ChatGPT desktop app and the codex CLI. A change made for one applies to both. Plugins under ~/.codex/plugins use the ordinary mcpServers JSON shape rather than TOML, but they sit in a cache directory the client repopulates, so editing them by hand does not survive.
Before you edit any of these by hand
Two habits save most of the damage. Make a copy of the file first — every one of these clients rewrites its own config, and an editor holding a stale copy in a buffer will silently undo whatever the client just wrote when you hit save. And close the client before editing, for the same reason.
If you want to know what the alternative looks like task by task, that is what editing MCP config files by hand vs. Kytto covers. If a server is configured correctly and still will not start, the causes are catalogued in why your MCP server is not showing up.