Claude Desktop Integration
Claude Desktop Integration
Claude Desktop is Anthropic’s desktop application for interacting with Claude models. It primarily uses Anthropic’s API directly but can be configured with environment variables.
Overview
Claude Desktop connects to Anthropic’s Claude models by default. It uses claude_desktop_config.json for configuration and supports environment variable-based API key management.
Configuration File
Claude Desktop reads from claude_desktop_config.json, typically located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Configuring Anthropic (Default)
Claude Desktop uses Anthropic’s API natively. Set your API key as an environment variable:
export ANTHROPIC_API_KEY="your-anthropic-api-key"claude_desktop_config.json
{ "mcpServers": {}, "model": "claude-sonnet-4-20250514"}Using Environment Variables
Claude Desktop inherits environment variables from your system. Set them before launching the app:
macOS/Linux:
export ANTHROPIC_API_KEY="sk-ant-..."open -a Claude # macOS# or launch Claude Desktop normallyWindows (PowerShell):
$env:ANTHROPIC_API_KEY="sk-ant-..."Start-Process "Claude"Persistent Environment Variables
macOS (~/.zshrc):
echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.zshrcsource ~/.zshrcLinux (~/.bashrc):
echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.bashrcsource ~/.bashrcWindows (System Environment Variables):
- Open System Properties > Advanced > Environment Variables
- Add
ANTHROPIC_API_KEYwith your key value - Restart Claude Desktop
Available Models
Claude Desktop supports these Anthropic models:
| Model | Use Case |
|---|---|
claude-sonnet-4-20250514 | Latest, most capable |
claude-3-5-sonnet-20241022 | Balanced performance |
claude-3-haiku-20240307 | Fast responses |
Verification
- Open Claude Desktop
- Click the model selector to confirm available models
- Send a test message to verify API connectivity
- Check for error messages indicating key or network issues
Troubleshooting
- “API key not found”: Ensure
ANTHROPIC_API_KEYis set in your environment and restart the app - “Invalid API key”: Regenerate your key at console.anthropic.com
- Model unavailable: Update Claude Desktop to the latest version
- Rate limit errors: Check your usage tier at console.anthropic.com