Home/Config Files/claude_desktop_config.json
Config File Wiki

claude_desktop_config.json config guide

Claude Desktop MCP server configuration for local tools and environment variables.

Field explanations

  • command: executable started by the client
  • args: process arguments
  • env: variables passed to the server
  • transport: stdio, HTTP, or SSE depending on client support

Minimal template

{
  "mcpServers": {
    "example": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}

Common usage patterns

  • Keep claude_desktop_config.json small and reviewable
  • Use comments only when the format supports them
  • Commit example files with placeholder values
  • Validate locally before deploying

Common errors

  • Invalid MCP server schema
  • Command path not absolute
  • Secrets hardcoded
  • Server logs to stdout

Online validation

Validate syntax first, then compare behavior against your deploy target. For JSON-based configs, use the JSON formatter before debugging tool-specific behavior.

Related tools