---
title: "Claude Desktop MCP config: file path, key, example · DotsAgent"
description: "Add MCP servers to Claude Desktop from Anthropic: where the config file lives, the top-level key and format, remote OAuth support and a sample config."
url: https://dotsagent.io/mcp/clients/claude-desktop
---

Anthropic

# Add MCP servers to Claude Desktop

Claude Desktop reads local servers from claude_desktop_config.json; remote servers are added as custom connectors in the app.

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Top-level key**: `mcpServers`
- **Format**: json
- **OAuth for remote servers**: 

## Example config

This example adds GitHub's hosted server and Playwright as a local server, in the shape this client expects.

`~/Library/Application Support/Claude/claude_desktop_config.json`

```
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

Remote servers can't go in the file. Add them under Settings > Connectors > Add custom connector, paste the URL and sign in.

## Notes and quirks

- Quit and reopen the app after editing the file.
- Logs are in ~/Library/Logs/Claude on macOS and %APPDATA%\Claude\logs on Windows.
- On Windows, run npx through cmd: command cmd, with /c, npx and the package as arguments. The generator does this for you.
- There is no official Linux build.

[Build a Claude Desktop config →](https://dotsagent.io/mcp/config#client=claude-desktop)

## Other clients

[Claude Code](https://dotsagent.io/mcp/clients/claude-code)

[Cursor](https://dotsagent.io/mcp/clients/cursor)

[VS Code (GitHub Copilot)](https://dotsagent.io/mcp/clients/vscode-copilot)

[Windsurf / Devin Desktop](https://dotsagent.io/mcp/clients/windsurf)

[Zed](https://dotsagent.io/mcp/clients/zed)

[OpenAI Codex CLI](https://dotsagent.io/mcp/clients/codex-cli)

[Gemini CLI](https://dotsagent.io/mcp/clients/gemini-cli)

[ChatGPT](https://dotsagent.io/mcp/clients/chatgpt)

[OpenClaw](https://dotsagent.io/mcp/clients/openclaw)

[Cline](https://dotsagent.io/mcp/clients/cline)

[Continue](https://dotsagent.io/mcp/clients/continue)

[JetBrains AI Assistant](https://dotsagent.io/mcp/clients/jetbrains-ai)

## Sources

1. [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/develop/connect-local-servers)/docs/develop/connect-local-servers
2. [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/develop/connect-remote-servers)/docs/develop/connect-remote-servers
3. [github.com](https://github.com/modelcontextprotocol/servers)/modelcontextprotocol/servers

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
