Claude Desktop MCP setup: config file location and JSON example
To add a local MCP server to Claude Desktop, open Settings → Developer → Edit Config, add its definition under mcpServers in claude_desktop_config.json, then fully quit and reopen the app. Below are the macOS and Windows paths, a JSON example and checks for a server that does not appear.
Where is claude_desktop_config.json?
| What | macOS | Windows |
|---|---|---|
| Config file | ~/Library/Application Support/Claude/claude_desktop_config.json | %APPDATA%\Claude\claude_desktop_config.json |
| Extensions | ~/Library/Application Support/Claude/Claude Extensions | %APPDATA%\Claude\Claude Extensions |
| Extension on/off state | ~/Library/Application Support/Claude/Claude Extensions Settings | %APPDATA%\Claude\Claude Extensions Settings |
| Format and key | Plain JSON, servers under mcpServers | |
How to open the Claude Desktop MCP config
Use Settings → Developer → Edit Config in the desktop application. This opens the existing file or creates one if needed. Claude Code’s .mcp.json is a different file; see Claude Code MCP scopes if you are configuring the terminal client.
Once the file exists, you can also reveal it in Finder on macOS or open it from Windows Command Prompt:
# macOS Terminal
open -R "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
# Windows Command Prompt
notepad %APPDATA%\Claude\claude_desktop_config.json
Close Claude Desktop before you edit it. The app writes this file itself, and an editor holding an older copy will silently undo whatever the app saved in between.
Claude Desktop MCP JSON example: add a local server
Add an mcpServers object next to the keys that are already there, and keep those keys. Replacing the whole file with a snippet from a README throws away settings the app wrote.
This is a minimal macOS example for a local Node.js MCP server. Replace the executable and script paths with real files on your computer; it is a template, not a server to install:
{
"mcpServers": {
"my-server": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/server.js"]
}
}
}
On Windows the equivalent paths must escape backslashes inside JSON, for example "command": "C:\\Program Files\\nodejs\\node.exe" and "args": ["C:\\Users\\you\\mcp\\server.js"]. Use your actual installation paths. Only configure servers you trust: the application will start the command you provide.
- Strict JSON. No comments and no trailing commas. A single stray comma makes the whole file invalid, not just the new entry.
- Use the full path to the command. An app launched from the Dock does not inherit your terminal’s
PATH, so a barenpxthat works in your shell is often not found. Runwhich npx(macOS) orwhere npx(Windows) and paste the result. In JSON on Windows, write each backslash twice. - One object per server name. A repeated name is a duplicate key, and which one wins is not something to rely on.
Quit and reopen Claude Desktop afterwards.
Why can the config be empty while extensions work?
On current builds claude_desktop_config.json often has no mcpServers key at all. A file containing only coworkUserFilesPath and preferences is healthy: neither key is an MCP server, and nothing is missing.
That does not mean you have no servers. Servers installed as extensions do not live in this file. Each extension is a bundle in the Claude Extensions folder, its launch command is in the bundle’s manifest.json under server.mcp_config, and whether it is switched on is stored separately in Claude Extensions Settings under an isEnabled flag.
Two consequences are worth knowing. An extension’s arguments often contain ${__dirname}, a placeholder that means the extension’s own folder and is expanded by Claude Desktop at launch, so copying such an argument into another client’s config will not work. And a server you can see in Claude Desktop but cannot find in the JSON is most likely an extension.
Claude Desktop MCP server not showing up?
Work through these in order: the JSON is valid; the servers sit under mcpServers (not servers, which is VS Code’s key); the command is a full path; and you are looking for a config server rather than an extension. The causes behind a server that works in a terminal and fails in a client are catalogued in why your MCP server is not showing up.
Moving a server to another client
The same definition needs different wrapping elsewhere: VS Code keys servers under servers and allows comments, Codex uses TOML with mcp_servers tables, and Claude Code keeps servers at three scopes. The table of every client is on where every MCP client keeps its config file.