How to Setup MCP in Claude Desktop
Step-by-step setup guide for connecting Model Context Protocol (MCP) servers to Claude Desktop by Anthropic.
Configuration File: claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Example claude_desktop_config.json Template
Open in Config Generator{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..." }
}
}
}Installation Steps
Locate claude_desktop_config.json
Find the configuration file at %APPDATA%\Claude\claude_desktop_config.json.
Add MCP server entries
Open the file and add your server definitions inside the configuration schema.
Set environment variables
Provide any required API keys, database URLs, or access tokens in the environment section.
Save and reload
Save claude_desktop_config.json and restart Claude Desktop.
Verify in chat
Ask Claude Desktop to list tools or execute a task with the connected MCP server.
Claude Desktop Protocol Support
Native local process execution via command + args
Remote SSE streaming connections
Autonomous tool invocation with confirmation UI
Exposes static & dynamic URI resources
Direct prompt template selection in chat
Notifies servers of workspace folder boundaries
Requires full client restart to reload servers