Skip to content
Technical Architecture Documentation

Claude Desktop MCP Configuration & Troubleshooting Guide

In-depth guide to configuring Claude Desktop for Model Context Protocol, handling environment variables, debugging developer tools consoles, and fixing STDIO pipe startup crashes.

1. Locating & Editing claude_desktop_config.json

Claude Desktop loads its MCP config file once upon application initialization. Editing this file while Claude Desktop is running requires restarting the application for changes to take effect.

On macOS, use Terminal: `code ~/Library/Application\ Support/Claude/claude_desktop_config.json`

On Windows, open PowerShell: `code $env:APPDATA\Claude\claude_desktop_config.json`

2. Setting Environment Variables & Auth Keys

Environment keys must be specified as explicit key-value strings inside the `env` dictionary of each server definition. System environment variables are not automatically inherited by child stdio processes spawned by Claude Desktop unless specified.

{
  "mcpServers": {
    "slack-mcp": {
      "command": "npx",
      "args": ["-y", "@mcp/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here",
        "SLACK_TEAM_ID": "T123456"
      }
    }
  }
}

3. Diagnostic Inspection & Developer Tools Console

If an MCP server icon shows a red error badge in Claude Desktop, enable developer logs to inspect startup stderr traces.

On macOS, inspect log files at `~/Library/Logs/Claude/mcp*.log`. On Windows, check `%APPDATA%\Claude\logs\mcp*.log`.

4. Troubleshooting Common Startup Errors

• Error: `command not found: npx` -> Verify Node.js is installed and included in your system PATH.

• Error: `ECONNREFUSED` -> Check that the target database or local API daemon is actively listening on localhost.

• Error: `JSON-RPC -32601` -> The client called a tool method that is missing or misspelled in the server spec.