How to Set Up MCP in Claude Desktop (Complete 2026 Guide)
📖 TL;DR - Quick Setup
- Open Claude Desktop → Settings → Developer → Edit Config
- Add MCP servers to
claude_desktop_config.json - Restart Claude Desktop completely
- Look for 🔨 icon to verify tools are loaded
Claude Desktop supports the Model Context Protocol (MCP), allowing you to extend Claude's capabilities with external tools and data sources. This guide shows you exactly how to set up MCP servers in Claude Desktop, step by step.
Prerequisites
Step 1: Find the Config File Location
Claude Desktop stores MCP configuration in a JSON file. The location depends on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
💡 Pro Tip: The easiest way to open this file is through Claude Desktop itself. Go to Settings → Developer → Edit Config.
Step 2: Understand the Config Structure
The config file uses this JSON structure:
{
"mcpServers": {
"server-name": {
"command": "executable",
"args": ["arg1", "arg2"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
| Field | Description | Example |
|---|---|---|
command |
The executable to run | npx, uvx, node, python |
args |
Array of command-line arguments | ["-y", "@server/name"] |
env |
Environment variables | {"API_KEY": "xxx"} |
Step 3: Add Your First MCP Server
Let's start with a simple example - the filesystem MCP server that lets Claude read and write files:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/Documents"
]
}
}
}
✅ Result: This gives Claude access to read files in your Documents folder. You can now ask Claude to read, list, or search files!
Popular MCP Server Configurations
Copy and paste these ready-to-use configurations for popular MCP servers:
Step 4: Configure Multiple Servers
You can run multiple MCP servers simultaneously:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/folder"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx" }
},
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server"],
"env": { "SUPABASE_URL": "https://xxx.supabase.co", "SUPABASE_SERVICE_ROLE_KEY": "xxx" }
}
}
}
Step 5: Restart Claude Desktop
After saving your config changes:
- Completely quit Claude Desktop (not just close the window)
- On macOS: Right-click the dock icon → Quit
- On Windows: Right-click the system tray icon → Exit
- Reopen Claude Desktop
Step 6: Verify Your MCP Servers
To check if your MCP servers are connected:
- Open Claude Desktop
- Look for the hammer icon (🔨) in the input area
- Click it to see available tools
- Your MCP server tools should be listed
Troubleshooting Common Issues
❌ MCP server not showing up +
- Verify your JSON syntax is valid (use a JSON validator)
- Check that Node.js/Python is installed and in your PATH
- Make sure you completely restarted Claude Desktop (quit from dock/tray)
- Check Settings → Developer → Logs for error messages
❌ "Command not found" error +
Use the full path to the executable:
{
"mcpServers": {
"github": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx" }
}
}
}
Find your npx path: Run which npx (macOS) or where npx (Windows)
❌ Server connects but tools don't work +
- Check if API keys/tokens in
envare correct - Verify the API key has the required permissions/scopes
- Test the MCP server independently using MCP Playground
Security Best Practices
- Limit file access: Only give filesystem servers access to specific directories
- Use minimal permissions: Create API tokens with only the scopes you need
- Review server code: Before running any MCP server, review its source code
- Don't share your config: Your config contains sensitive API keys
Test Your MCP Servers Online
Before adding an MCP server to Claude Desktop, test it using MCP Playground. This browser-based tool lets you connect to remote MCP servers and test tool calls.
🚀 Ready to test your MCP servers?
Frequently Asked Questions
Where is the Claude Desktop config file located? +
~/Library/Application Support/Claude/claude_desktop_config.jsonOn Windows:
%APPDATA%\Claude\claude_desktop_config.jsonThe easiest way to open it is via Claude Desktop: Settings → Developer → Edit Config.
How many MCP servers can I run in Claude Desktop? +
mcpServers object. Claude will load all configured servers on startup and make their tools available.
Do I need to restart Claude Desktop after changing the config? +
How do I know if my MCP server is working? +
Can I use remote MCP servers with Claude Desktop? +
Nikhil Tiwari
15+ years of experience in product development, AI enthusiast, and passionate about building innovative solutions that bridge the gap between technology and real-world applications. Specializes in creating developer tools and platforms that make complex technologies accessible to everyone.