New PolicyLayer is now the system of record for AI agent authority. Never answer your agent twice
Home / Integrations / Claude Desktop

Claude Desktop MCP setup: the complete config reference

Where Claude Desktop’s MCP config lives, what goes in it, the three ways to add a server, and how to fix the common failures — plus how to put a policy gate in front of every tool call.

QUICK ANSWERQuick answer: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows. Top-level key is mcpServers.

Where Claude Desktop keeps its MCP config.

ScopePathNotes
macOS ~/Library/Application Support/Claude/claude_desktop_config.json Created by Settings → Developer → Edit Config if it doesn’t exist yet.
Windows %APPDATA%\Claude\claude_desktop_config.json Use escaped backslashes in any Windows paths inside the file, e.g. C:\\Users\\you\\Desktop.

One global file — Claude Desktop has no per-project scope. Open it via the menu-bar Claude menu → Settings → Developer → Edit Config.

The config format, key by key.

A top-level mcpServers object, one entry per server. The JSON file configures local stdio servers; remote servers are added as custom connectors through the UI instead.

KeyWhat it does
command Executable to launch the server. GUI apps don’t inherit your shell PATH — a full path is the safe choice.
args Array of arguments passed to the command. All file paths must be absolute.
env Environment variables for the server process, e.g. API keys.
claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    }
  }
}

Remote MCP servers (streamable HTTP, OAuth) are added as custom connectors: Settings → Connectors → Add custom connector. They don’t go in the JSON file.

What Claude Desktop speaks.

TransportStatusHow to declare it
stdio Supported Declare command + args in claude_desktop_config.json. Runs as a local child process.
Streamable HTTP Supported Via custom connectors in the UI (Settings → Connectors), including OAuth-protected servers.
SSE Deprecated Legacy remote connectors; prefer streamable HTTP.

Adding a server, three ways.

01 Edit the config file

Settings → Developer → Edit Config opens claude_desktop_config.json. Add an entry under mcpServers, save, then fully quit and relaunch Claude Desktop — servers load at startup only.

02 Desktop extensions

One-click local server install via .mcpb desktop extension bundles (formerly .dxt) — no JSON editing. Managed under Settings → Extensions.

03 Custom connectors

Remote MCP servers are added under Settings → Connectors → Add custom connector, with OAuth handled in the UI.

Check it's actually connected.

  1. Fully quit and relaunch Claude Desktop after editing the config.
  2. Look for the MCP tools indicator (slider icon) in the bottom-right of the message input box — click it to see each server’s tools.
  3. Ask Claude to use one of the tools; the first call shows a per-tool approval prompt.

When it doesn't work.

Tools icon never appears

Restart the app fully (quit, not just close the window), validate the JSON syntax, and make sure every file path in args is absolute, not relative.

Server fails with “command not found”

Claude Desktop launches as a GUI app and doesn’t inherit your shell PATH. Use the full path to npx or nodewhich npx in a terminal gives it to you.

Server starts but tool calls fail silently

Check the logs: ~/Library/Logs/Claude/ on macOS, %APPDATA%\Claude\logs\ on Windows. mcp.log covers connections; mcp-server-NAME.log captures that server’s stderr. Tail with tail -f ~/Library/Logs/Claude/mcp*.log.

Windows: ENOENT errors referencing ${APPDATA}

Add an expanded APPDATA value to the server’s env block, and make sure npm is installed globally.

Config edits not taking effect

Claude Desktop reads the config at startup only. Every edit needs a full quit and relaunch.

Put a policy gate in front of it.

A standard filesystem MCP in Claude Desktop. Every read and write hits the upstream directly, with no audit trail and no path restrictions.

claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop"
      ]
    }
  }
}

Register the filesystem MCP in PolicyLayer, mint a grant, point Claude Desktop at the proxy URL via mcp-remote. PolicyLayer evaluates every call against the grant’s policy before it reaches the upstream.

claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://proxy.policylayer.com/mcp/<server-uuid>/",
        "--header", "Authorization: Bearer <grant-token>"
      ]
    }
  }
}

The <server-uuid> appears on each server's detail page. The <grant-token> shows once at mint time. See the Quick start for the full setup walk-through — and if you operate under SOC 2, HIPAA, GDPR or similar, the compliance hub maps how gateway-mediated MCP traffic evidences each framework.

What the gateway adds.

Rate limits
Cap tool calls per minute, hour, or day, per grant or shared across the team.
Access controls
Allow, deny, or conditionally gate any tool against the call's arguments.
Spend caps
Increment a counter by the call's amount; deny when the daily total exceeds your budget.
Audit logs
Every call records the grant, tool, argument keys, and the rule that decided.

A policy in practice.

Allow reads and directory listings. Allow writes, but deny any write into common credential paths.

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "read_file": {},
    "list_directory": {},
    "write_file": {
      "deny_if": [
        {
          "conditions": [
            { "path": "args.path", "op": "regex", "value": "^/Users/[^/]+/(\\.ssh|\\.aws|secrets)" }
          ]
        }
      ]
    }
  }
}

See Writing policies for the policy format, operators, and quota shapes.

Claude Desktop MCP questions.

Where is the Claude Desktop MCP config file?+

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows: %APPDATA%\Claude\claude_desktop_config.json. Settings → Developer → Edit Config opens it, creating the file if needed.

Do I need to restart Claude Desktop after editing the config?+

Yes — fully quit and relaunch. Claude Desktop only loads MCP servers at startup, so closing the window is not enough.

Can Claude Desktop connect to remote MCP servers?+

Yes, as custom connectors: Settings → Connectors → Add custom connector, with OAuth handled in the UI. The JSON config file is for local stdio servers; a remote server can also be bridged into it with the mcp-remote package.

Why does my MCP server work in the terminal but not in Claude Desktop?+

Almost always PATH: GUI apps don’t inherit your shell environment, so npx or node may not resolve. Use absolute paths for the command and any file arguments, then check ~/Library/Logs/Claude/mcp*.log for the actual error.

What are Claude Desktop extensions (.mcpb files)?+

Desktop extensions bundle a local MCP server into a one-click install — no JSON editing or Node setup. They are managed under Settings → Extensions, and enterprises can deploy them centrally.

Take your agents live. Without losing control.

Route your MCP traffic through PolicyLayer. Every tool call is checked against your policy before it runs: allow, deny, or require approval. Per-identity grants. Full audit log. Live in minutes.

Instant setup, no code required.

46,500+ MCP servers and 515,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.