Your Claude Desktop config is one JSON file, claude_desktop_config.json. Open it from Claude Desktop with Settings, then Developer, then Edit Config, add your local MCP servers under mcpServers, save, then quit Claude Desktop completely and open it again. Remote servers that you reach by a URL are added as connectors in Settings instead. Our free MCP config generator writes the file for you and checks an existing one, with the line and column of every problem. It runs in your browser, so nothing you type is sent anywhere.
Where the file is
| System | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
After any change, save the file, then quit Claude Desktop completely and open it again.
What goes in the file
Each local server has a name, the command that starts it, and its args as a list. Here is the filesystem server from the official example. The generator writes the same thing, with a version number pinned on the package name:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop"
]
}
}
}
Three rules cover most mistakes. The command is one program name, such as npx, and nothing else. Everything after it goes into args, one item per argument. And env, when a server needs a key, is an object of names and text values, such as "env": {"API_KEY": "..."}. The official guide to connecting local servers walks through the same format.
Add an MCP server to Claude Desktop, step by step
- Open the MCP config generator and choose Claude Desktop under Your MCP client.
- Use a Quick add button, such as + Filesystem (official example, local) or + Empty local server, or press + Add another server.
- Fill in Name, set Type to Local (runs a command), then type the Command, the Arguments (one per line) and any Environment variables (one per line, as NAME=value).
- Already have servers? Open Add to my existing file (optional) and paste your current file. The new servers are added and the old ones kept. If a name is already taken, you see "Your existing file already has a server called" with the name, and the new one replaces it.
- Press Copy, or Download claude_desktop_config.json, and save it to the path the tool shows for your system.
- Quit Claude Desktop completely and open it again.
The output box is checked again every time you change a field, so a missing command or a name used twice shows up before you save anything.
Remote servers: the example of DealMahal's free MCP server
DealMahal runs a free MCP server at https://dealmahal.com/mcp. It needs no key, and its tools are find_hiring_lists, get_hiring_list, get_company_hiring, get_salary_benchmark and get_hiring_index. Setup notes are on our API page.
Because it is reached by a URL, Claude Desktop does not take it in the config file. Add it with + DealMahal hiring data, free, no key (remote), which fills in the name dealmahal and the URL for you. For Claude Desktop the generator leaves it out of the file and shows a box instead: open Settings, then Connectors, then Add, then Add custom connector, and paste the URL. That follows the official guide to connecting remote servers. If you paste a config that has a url in it, the checker warns that Claude Desktop's docs describe only local command servers in this file.
Switch the client and the same two servers come out in each tool's own shape. For Claude Code, a remote server gets "type": "http":
{
"mcpServers": {
"dealmahal": {
"type": "http",
"url": "https://dealmahal.com/mcp"
},
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop"]
}
}
}
The generator also has quick-add buttons for our hiring data and PDF tables servers on Apify. The hiring data server has tools for live jobs, companies hiring and salary benchmarks. Apify asks you to sign in on first use and runs are paid per result; the MCP section of the API page explains them, and our job search MCP server guide shows what to ask once it is connected.
The errors that stop a config loading
When Claude Desktop cannot read the file, the servers simply do not appear. Paste the file into the Check a config tab and you get every problem with its line and column, the line itself, and a caret under the exact spot. Take this file, which has three mistakes:
{
"mcpServers": {
"filesystem": {
"command": "npx -y @modelcontextprotocol/server-filesystem",
"args": "/Users/username/Desktop"
},
"notes": {
"args": ["-y", "notes-server"]
}
}
}
The checker reports:
- Error (line 4, column 18): the command contains the arguments too. Clients run command as one program name. The fix it suggests:
"command": "npx", with the rest moved into args. - Error (line 5, column 15): "args" must be a list of texts, not one text.
- Error (line 7, column 14): server "notes" has no "command" (local server) or "url" (remote server).
JSON syntax errors stop the reading at the first one, so they come one at a time. These are the ones we see most, with the message the checker shows:
| Mistake | Message | Fix |
|---|---|---|
| Comma after the last item | Trailing comma before }. | Delete the last comma |
| Missing comma between two servers | Missing comma between two items. | Add a comma at the end of the previous line |
| Quotes changed by a word processor or chat | Curly quotes are not valid in JSON. | Retype them as straight double quotes |
| A note left in the file | Comment found. Plain JSON does not allow comments. | Delete the comment |
| Windows path with single backslashes | Invalid escape \U inside text. | Double the backslashes, or use forward slashes |
| Same name used twice | Duplicate server name "filesystem". The first one (line 3) is silently replaced by this one. | Give each server its own name |
| VS Code file pasted into Claude | Claude Desktop expects the key "mcpServers", but this file uses "servers". | Rename the key, or rebuild the servers in the builder |
The duplicate name is the sneakiest one. The file is valid JSON, so nothing complains, but only the second server with that name loads.
Keys and secrets
You never have to type a real key into the generator. Leave a placeholder such as YOUR_API_KEY and replace it in your own copy of the file, on your own computer. The checker warns when a value still looks like a placeholder, and when a value looks like a real API key or token, so you notice before you share a screenshot.
One more catch: Claude Desktop's docs do not describe variables like ${API_KEY} in this file, so the checker warns that such text may be passed on as it is. Other clients do expand variables, each with its own syntax, and the checker knows each one.
The same servers in Claude Code, Cursor and VS Code
| Client | File | Top-level key | Variables |
|---|---|---|---|
| Claude Desktop | claude_desktop_config.json | mcpServers | Not described in the docs |
| Claude Code | .mcp.json in the project root | mcpServers | ${VAR} or ${VAR:-default} |
| Cursor | .cursor/mcp.json, or ~/.cursor/mcp.json for every project | mcpServers | ${env:NAME} |
| VS Code | .vscode/mcp.json | servers | ${env:NAME}, and ${input:id} to ask for a key at start-up |
Claude Code's .mcp.json is usually committed to git, so keep keys out of it; the checker warns when it sees one there. The Claude Code MCP docs cover the claude mcp add command for servers that only you use. For VS Code, the generator can ask for keys when the server starts instead of writing them into the file.
What the generator does not do
It cannot start your server or call it, because a web page cannot run programs on your computer and most servers block calls from web pages. It checks structure and values against the formats in each client's official docs, checked on 5 December 2026. If a server still does not appear after a clean check and a full restart, the problem is likely in the server itself, for example a wrong package name, or Node.js not being installed for an npx command.
If you are also building the tools inside a server, our JSON Schema generator turns sample JSON into an MCP tool inputSchema, and our token counter guide shows how to check how much of a model's context your files take.
Frequently asked questions
Where is claude_desktop_config.json on a Mac?
In ~/Library/Application Support/Claude/claude_desktop_config.json. The easiest way to open it is from Claude Desktop itself: Settings, then Developer, then Edit Config.
Do I need to restart Claude Desktop after editing the config?
Yes. Save the file, then quit Claude Desktop completely and open it again, so it reads the new file.
How do I add a remote MCP server to Claude Desktop?
Remote servers, the ones you reach by a URL, are added in Settings, Connectors, Add custom connector, not in the config file. The generator shows the URL to paste when you add a remote server for Claude Desktop.
Can the generator test whether my server actually runs?
No. Browsers cannot start local programs, and most servers block calls from web pages. It checks the file's structure and values against the documented formats.
Is it safe to paste a config that contains API keys?
The check runs in your browser and nothing is sent or stored. Still, never paste real keys into chats, tickets, screenshots or shared repositories.
Spotted an error? Write to dealmahal.official@gmail.com.
Questions or corrections: dealmahal.official@gmail.com.