Claude Desktop MCP Setup Guide
Complete tutorial for configuring MCP servers with Anthropic's Claude Desktop application. From first install to running multiple servers.
1. Prerequisites
Before setting up MCP with Claude Desktop, make sure you have:
- macOS or Windows — Claude Desktop is available for both platforms
- A Claude account — Free or Pro, both work with MCP
- Node.js or Python — Depending on which MCP servers you want to use
- A text editor — VS Code, Sublime, or even Notepad works
Tip: Most MCP servers are distributed via npm (Node.js) or pip (Python). Install both runtimes for maximum flexibility.
2. Installing Claude Desktop
Download Claude Desktop from Anthropic's official website:
https://claude.ai/downloadAfter installation:
- 1. Open Claude Desktop
- 2. Sign in with your Anthropic account
- 3. Make sure the app is working (send a test message)
- 4. Close the app before editing the config file
Important: Always close Claude Desktop before editing the configuration. Changes are loaded when the app starts.
3. Finding the Config File
Claude Desktop stores its MCP configuration in a JSON file. The location depends on your operating system:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Open in terminal:
# Open in VS Code code ~/Library/Application\ Support/Claude/claude_desktop_config.json # Or create if it doesn't exist mkdir -p ~/Library/Application\ Support/Claude touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
Open in PowerShell:
# Open in VS Code code $env:APPDATA\Claude\claude_desktop_config.json # Or open the folder in Explorer explorer $env:APPDATA\Claude
4. Adding Your First MCP Server
Let's add the official filesystem server as your first MCP integration. This gives Claude access to read and write files in specified directories.
Step 1: Install the Server
# Install globally (no need to run npm every time) npm install -g @modelcontextprotocol/server-filesystem
Step 2: Configure Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/Documents",
"/Users/yourname/Projects"
]
}
}
}Replace the paths with directories you want Claude to access. Only give access to folders you're comfortable with Claude reading/writing.
Step 3: Restart Claude Desktop
Fully quit and reopen Claude Desktop. The MCP server will start automatically.
5. Running Multiple Servers
You can run multiple MCP servers simultaneously. Each gets its own entry in the config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/Projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost/mydb"
}
},
"custom-python": {
"command": "python",
"args": ["/path/to/my_custom_server.py"]
}
}
}Popular MCP Servers
@modelcontextprotocol/server-github
Manage repos, issues, PRs
@modelcontextprotocol/server-postgres
Query PostgreSQL databases
@modelcontextprotocol/server-brave-search
Web search capabilities
@anthropics/server-playwright
Browser automation
See our Best MCP Servers 2026 guide for a complete list with installation instructions.
6. Verifying Your Setup
After restarting Claude Desktop, verify your MCP servers are running:
Check the Hammer Icon
Look for a small hammer (🔨) icon in the bottom-left of the chat input. Click it to see available tools from your MCP servers.
Test with a Query
Ask Claude to use one of the tools:
"List the files in my Projects folder"
Claude should use the filesystem MCP server to list your files.
Check the Logs
If something isn't working, check the logs:
# macOS tail -f ~/Library/Logs/Claude/mcp*.log # Windows (PowerShell) Get-Content $env:APPDATA\Claude\logs\mcp*.log -Tail 50 -Wait
7. Common Issues & Fixes
Tools not showing up
- • Make sure you fully quit Claude Desktop (not just closed the window)
- • Verify your JSON syntax is valid (use a JSON validator)
- • Check that the command path is correct
- • Look for errors in the MCP logs
"spawn ENOENT" error
- • The command (npx, python, etc.) isn't in Claude Desktop's PATH
- • Use full paths:
/usr/local/bin/npxinstead ofnpx - • Find paths with:
which npxorwhich python
Environment variables not working
- • Use the
envkey in the server config - • Variables are per-server, not global
- • Don't include spaces around the = sign
Server crashes on startup
- • Test the command manually in terminal first
- • Check if dependencies are installed
- • Look for permission issues on accessed directories
For more detailed troubleshooting, see our MCP Troubleshooting Guide.
8. Best Practices
Limit file access
Only give servers access to directories they need. Avoid / or home directory.
Use environment variables for secrets
Never hardcode API keys in the config. Use the env key.
Use npx for official servers
npx -y always gets the latest version without manual updates.
Comment your config
JSON doesn't support comments, but you can add a _comment key for documentation.
Test new servers individually
Add one server at a time. Makes debugging easier.
Start Building
Now that Claude Desktop is configured, it's time to build your own MCP servers or explore what's available.