How to Connect an MCP Server to Claude Desktop in 10 Minutes
MCP (Model Context Protocol) is an open standard, published by Anthropic in late 2024, that lets a chat client call external tools through a small JSON config file. To connect a server to Claude Desktop you edit claude_desktop_config.json, add a command and args entry, restart the app, and the tools appear in the input box.
That’s the whole loop. The friction is entirely in the paths and the JSON.
What is MCP and why should you care?
MCP is a protocol that defines how an AI client asks a server what it can do, then calls those capabilities. Think of it as a USB port for AI: one server for your filesystem, one for Postgres, one for GitHub, and any MCP-speaking client can use all of them without custom code per app.
Claude Desktop, Cursor, and a growing list of editors speak MCP natively. Servers exist in Node and Python, and the reference ones live under modelcontextprotocol/servers on GitHub.
You need this if you keep copying data into chat windows by hand. You don’t need it if a plain API key plus a script already solves your problem.
Step 1: Find the config file (the part people get wrong)
The file is not inside the app bundle. It lives in your user profile:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
If the file doesn’t exist, create it. Claude Desktop will not generate it for you, and it silently ignores a file saved with a .txt extension — a surprisingly common cause of “nothing happened”.
Step 2: Install Node 18 or newer first
Most reference servers are npm packages run through npx. Check with node -v. Anything below 18 fails on modern syntax, and on Windows you’ll want the plain node install rather than a version manager shim, because Claude Desktop launches the process without your shell’s PATH.
That PATH detail explains half of all broken setups: the app can find node interactively but not when it spawns the server. If npx isn’t on the system path, use an absolute path like /usr/local/bin/npx or C:\\Program Files\\nodejs\\npx.cmd.
Step 3: Add your first server
Open the config and paste this, adjusting the folder to one you actually want readable:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/Projects"
]
}
}
}
Three rules: the top key must be mcpServers, every entry needs command, and on Windows command must be npx.cmd not npx. Save as UTF-8 with no BOM.
Step 4: Restart completely, not just the window
Quit Claude Desktop from the menu — on macOS Cmd+Q, not the red close button. The app only reads the config file at process start. After relaunch, look for a small plug icon or a tools badge in the message input; hovering shows which server it is and how many tools it exposes. The filesystem server typically reports 11 tools.
If the icon is missing entirely, the config didn’t parse. Validate it with python3 -m json.tool claude_desktop_config.json before doing anything else.
Step 5: Test with a request that proves file access
Ask: “List the files in my Projects folder and summarise any README.” Claude will request permission the first time — approval is per-client, not per-session. Deny it and the tool stays unavailable until you flip it back in settings.
Good first tests are cheap and verifiable. “What’s in package.json?” beats “organise my whole drive”, which burns context and usually disappoints.
How do you debug a server that won’t start?
Enable the log file and read it. On macOS, tail ~/Library/Logs/Claude/ and open the file named for your server (logs are written per server). On Windows it’s under %APPDATA%\Claude\logs. You want the last error, not the whole file.
The two failures I see most:
spawn npx ENOENT— the PATH problem above. Use an absolute command path.Server disconnectedafter a few seconds — usually a crashed package. Run the exactcommand+argsin your terminal and watch the error appear immediately.
Is running MCP servers risky?
Yes, in a specific way: the filesystem server can read whatever path you give it, and some community servers accept arbitrary shell commands. Scope directories narrowly. Give the filesystem server your Projects folder, never your home directory. Review any third-party server’s source before pointing it at credentials — you’re handing a model the keys.
Quick Summary
- MCP connects Claude Desktop to local tools through
claude_desktop_config.json. - The file lives in the user profile, not the app folder, and must be UTF-8 JSON.
- Node 18+ is required; use absolute paths to
npxto avoid the PATH error. - Fully quit and relaunch the app — the config is read at startup only.
- Scope filesystem servers to specific folders, not your whole home directory.
