MCP on macOS
Where MCP config files live on macOS: Claude Desktop, Claude Code, Cursor, Codex, VS Code
The exact MCP config file paths on a Mac for Claude Desktop, Claude Code, Cursor, OpenAI Codex and VS Code, the key each uses, and what not to put in them.
Updated 8 October 2026 3 min read
The short answer
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json. Claude Code: ~/.claude.json for your servers and .mcp.json in a project. Cursor: ~/.cursor/mcp.json and .cursor/mcp.json. Codex: ~/.codex/config.toml. VS Code: .vscode/mcp.json in a workspace. All are plain text, so keep API keys out of them.
The paths
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json, keymcpServers. Restart the app after editing. - Claude Code: user and local servers in
~/.claude.json; shared project servers in.mcp.jsonat the project root. Useclaude mcp addrather than editing by hand. - Cursor:
~/.cursor/mcp.json(global) and.cursor/mcp.json(project), keymcpServers. - OpenAI Codex CLI:
~/.codex/config.toml, tables[mcp_servers.<name>]. - VS Code:
.vscode/mcp.jsonin a workspace, keyservers; user-level servers via the MCP: Open User Configuration command.
Apps change these between versions; if a path doesn’t exist, check the app’s documentation.
A typical entry
{
"mcpServers": {
"business": {
"command": "/usr/local/bin/my-mcp-server",
"args": ["--read-only"]
}
}
}Use absolute paths. Apps launched from the Dock don’t load your shell’s PATH, so npx or node may not be found even though they work in Terminal.
What not to put in them
Use servers that fetch their own credentials, a wrapper script that reads the Keychain (pattern), or one local server that holds the keys for all your tools.
The safe way to do this
MoltenRock Connect
One local MCP server for 30 business platforms
MoltenRock Connect is one entry in every app’s MCP config, with no keys in any of them.
Get MoltenRock ConnectQuestions developers ask
Where is claude_desktop_config.json on Mac?
In ~/Library/Application Support/Claude/. Open it from Claude Desktop → Settings → Developer → Edit Config.
Why does my MCP server work in Terminal but not in Claude Desktop?
Usually PATH: GUI apps don’t load your shell profile. Use the absolute path to node, npx or the server binary.
Can I share one MCP config between apps?
Not directly; each app has its own file and format. Keep the server the same and point each app at it.