
To set up an MCP server in Claude Desktop, you edit one JSON config file, add a server entry with a command and arguments, and restart the app. You need Node.js (for npx-based servers) or Python (for uvx-based servers) installed on your machine, plus the exact package name of the server you want. The whole job takes about ten minutes — and almost every failed first attempt is a JSON typo, not a real technical problem.
MCP — the Model Context Protocol — is the standard way to plug tools, files, and data sources into Claude Desktop. Each MCP server is a small adapter: one gives Claude read access to a folder, another fetches web pages, another queries a database. Setting up MCP servers in Claude Desktop is what turns the app from a chatbot into a working tool that can touch your own files. I set up my first one expecting an afternoon of fiddling; it took nine minutes, and four of those were finding the config file.
What do you need before you install your first MCP server?
Three things, and checking them first saves you from the most common dead end: everything installed except the runtime your server needs.
- Claude Desktop installed and signed in. MCP servers only work in the desktop app, not the web version. If you are on the free plan, you still get MCP support — the servers feature is not paywalled.
- Node.js (LTS) or Python 3.10+ installed. Most ready-made MCP servers are published as npm packages and launched with
npx; a growing number are Python packages launched withuvx. You need whichever runtime matches the server you choose. Check withnode --versionorpython3 --versionin a terminal. - The exact server package name. For this walkthrough we will use the official filesystem server,
@modelcontextprotocol/server-filesystem. It is maintained by the protocol team, small, and perfect for a first install because you can see exactly what it does.
A word of caution before we start: an MCP server is software running on your machine with the permissions you give it. The filesystem server, for example, gets whatever folder access you grant in the config. Keep that scope small at first — a dedicated test folder, not your whole documents library.
Where is the Claude Desktop config file — and how do you open it safely?
The config file is called claude_desktop_config.json, and its location depends on your operating system:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
You do not have to dig through folders by hand. The app hands you the file: open Claude Desktop, go to Settings → Developer, and click Edit Config. If the file does not exist yet — normal on a first install — create it with this exact skeleton:
{
"mcpServers": {}
}That is the entire file for now. Claude Desktop reads this file once, at startup, which is the single most important thing to know about the whole process: every change you make requires a full restart of the app to take effect. Editing the file with Claude Desktop open and asking Claude a question without restarting is how people convince themselves the setup is broken when it is actually fine.
How do you add your first MCP server to the config?
Here is the end-to-end sequence. I used a folder on my desktop called mcp-test containing three small text files — nothing precious, nothing private. You should do the same: a disposable test folder is the safest way to learn.
Step 1 — Write the server entry. Open claude_desktop_config.json and add the filesystem server between the braces:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/Desktop/mcp-test"
]
}
}
}Replace the path with the real path to your test folder. On Windows, use forward slashes or double backslashes in the path (C:/Users/you/Desktop/mcp-test or C:\\Users\\you\\Desktop\\mcp-test) — single backslashes break JSON, and this is mistake number one on Windows machines.
Step 2 — Quit Claude Desktop completely. Not just close the window — actually quit. On macOS the app can keep running in the dock; right-click and choose Quit. On Windows, check the system tray. Remember: the config is read once at startup.
Step 3 — Reopen and check the connection. After restart, look at the chat input area. When MCP servers are configured, Claude Desktop shows a tools indicator (the connectors/puzzle icon) near the message box. Click it — you should see your filesystem server listed with its tools (things like read_file, list_directory, write_file).
Step 4 — Run the mini-test. This is the part that proves the setup works. Ask Claude: “Use the filesystem tools to list the files in my mcp-test folder, then read the first one and tell me what’s in it.” If it lists your three files and reads one correctly, the server is genuinely connected — not just launched.
The -y flag in the args is deliberate: it lets npx install the package without asking for confirmation on first run. Without it, the server process hangs waiting for a prompt that never appears in the background, and the connection silently fails.
Three ways to add a server — pick the one that fits
If you are new to the protocol, start with what the Model Context Protocol is, and if you are deciding which assistant should run it, see choosing the right AI model for the task.
| Way | Best for | What you touch |
|---|---|---|
| Desktop extension (.mcpb file) | Easiest first install | Double-click the file; follow the permission prompts |
| Local server in claude_desktop_config.json | Files, scripts, private local tools | One JSON entry: command, args, env |
| Remote connector (URL) | Cloud tools, cross-device access | Settings → Connectors → Add custom connector; sign in with OAuth |
A URL never goes in the local config file, and a local command never goes in the connectors screen — mixing the two up is the most common first mistake. Start with a Desktop extension or a trusted remote connector if one exists; use manual JSON when you need a custom command, a private server, or precise control over paths and environment variables. Freshness note: MCP is now developed under the Agentic AI Foundation (it moved from Anthropic in December 2025), and the newest spec revision is dated 2026-07-28 — a beginner setup does not need the spec details, but the three paths above are the current ones.
What are the four config mistakes that break almost every first attempt?
I have now walked several people through this, and the failures cluster into exactly four buckets. Check them in order before you do anything else:
- Invalid JSON. A trailing comma after the last entry, a missing quote, a curly brace that does not close. JSON is unforgiving, and a single syntax error makes Claude Desktop ignore the entire file. Paste your file into any online JSON validator before restarting.
- Windows path backslashes. In JSON,
\Dmeans something (an escape sequence), soC:\Users\Documentscorrupts the string. Use forward slashes everywhere:C:/Users/Documents. This one fails more Windows installs than anything else. - Missing runtime. The config points at
npx, but Node.js is not installed — or installed for a different user. Runnpx --versionin a terminal; if it errors, install Node.js LTS and restart before touching the config again. - No full restart. The app was still running in the tray or dock, so the edited config never loaded. Quit fully, start fresh, then check the connectors icon.
If the server still does not appear, simplify: reduce the file to the exact skeleton plus this one server entry, restart, and build back up. Nine times out of ten the problem is one of these four, not something exotic.
Config anatomy: what each field does
| Field | Required | What it does |
|---|---|---|
| command | Yes | The program Claude Desktop launches (npx, node, python, docker, uvx) |
| args | Yes | Arguments passed to that program — package name, flags, script path |
| env | No | Environment variables only this server sees — API keys, tokens |
Claude Desktop launches each server as its own subprocess and talks to it over stdio — the server reads JSON-RPC from standard input and writes it back to standard output. Each server only sees the environment variables you pass in its env block, never your full shell environment. Paths are absolute — the app does not expand ~ or ./ — and on Windows every backslash is doubled inside JSON. No trailing commas and no comments: JSON allows neither.
How do you know the server actually connected?
There are three levels of “working.” First, the server appears in the connectors list — the process launched. Second, Claude can enumerate its tools — the handshake succeeded. Third, and only this one counts, Claude successfully uses a tool and returns a real result — the mini-test above. A green badge is a launch report, not a capability report; always run a real task through a server before you trust it.
Watch permissions while you are at it. The filesystem server will ask, by default, for confirmation on write operations — keep that behavior on. MCP servers inherit whatever file access you grant them, so a read-only test folder is the right training ground while you are learning.
When it does not work: read the error, then check this table
| What you see | Most likely cause | Fix |
|---|---|---|
| Server disappears after editing the config | Invalid JSON — trailing comma or comment | Validate the file; JSON allows neither |
| No Developer section in Settings | Claude Desktop is out of date | Update the app first |
| Server listed but tools never appear | App was not fully quit after the edit | Quit completely (Cmd+Q, or tray Quit on Windows), then reopen |
| “Command not found” on launch | Runtime missing — Node.js for npx, uv for uvx | Install the runtime, then restart Claude Desktop |
| Server connects but cannot read your folder | Path is relative, or the folder was not passed as an argument | Use the absolute path; double backslashes on Windows |
Test with the official filesystem server first — it takes the folders it may touch as arguments and refuses everything else. Start with read-only servers before adding any with write access, and let Claude ask for approval before each file operation: read the request, then approve or deny it. The server runs with your user permissions, so a server you do not trust should never get a folder you care about.
Which MCP servers are worth adding after the first one?
Once the filesystem server works, you understand the pattern — every other server is the same three lines with a different command and args. Good second servers, depending on your work:
- Fetch (
@modelcontextprotocol/server-fetch): fetches a web page and returns its content as markdown. The fastest way to let Claude read an article or documentation page for you. - Brave Search (
@modelcontextprotocol/server-brave-search): gives Claude web search. Needs a free API key set as an environment variable in the config — your first encounter with theenvblock, the standard way servers receive keys. - SQLite (
@modelcontextprotocol/server-sqlite): query a local database file from chat. Great if your workflow data lives in a database rather than spreadsheets.
Add them one at a time, restart after each, and run a real task through each before adding the next. If something breaks, you will know exactly which server broke it. The config file scales fine to a dozen servers — the debugging gets hard only when you add five at once. A server that reads your support docs can power building a no-code AI customer support chatbot.
Frequently asked questions
Do MCP servers work on the free Claude plan?
Yes. MCP support in Claude Desktop is available on free and paid plans. The servers run on your own machine, so there is nothing for Anthropic to bill you for — your costs, if any, are the API keys some servers need.
Is it safe to give an MCP server access to my files?
As safe as the scope you grant and the server you choose. Restrict the filesystem server to specific folders, use official or well-known servers first, and remember that a server can only do what the config’s path arguments allow it to reach.
Why does my server disappear after I edit the config?
Because Claude Desktop reads the config file once at startup. A full quit and restart loads your changes. If it still does not appear after a restart, check the four mistakes above — invalid JSON is the usual culprit.
Can I use MCP servers with the Claude web app or mobile app?
No. MCP servers run as local processes on your computer, so they only work in Claude Desktop. The web and mobile apps cannot launch local server processes.
What is the difference between a local MCP server and a remote connector?
A local server is a program on your own computer: Claude Desktop launches it, talks to it over stdio, and it goes in the config file. A remote connector is a URL on the internet: you add it in Settings → Connectors, usually sign in with OAuth, and it never sees your disk. Claude Desktop takes both; the browser and mobile apps take remote only.
How many MCP servers can I add?
As many as you want — each one is a separate subprocess. Three to five is fine; twenty or more can slow down startup and use more memory. Install only what you actively use.
Why does Claude ask for approval before file operations?
Because the server runs with your user permissions. Claude asks before each file operation so you can read the request and approve or deny it — that approval step is the safety net for everything a server is allowed to touch.
Was this guide helpful?
Tell us what needs improving →
Your selection stays on this page. To send feedback to the publication, use our contact form.
About this publication
From OptimaFlow AI
Practical guides to AI, automation, and better everyday workflows. We use illustrative examples and original diagrams, with AI-assisted writing and illustrations.
Read our editorial approach →About OptimaFlow AI