Complete the Claude Desktop MCP server configuration fields
Claude Desktop reads claude_desktop_config.json; each server lives under mcpServers, with command plus args for a stdio launch, or a url field for a remote Streamable HTTP server.
Think of the config file as a contacts list for tools. Claude Desktop reads one JSON file at startup to learn which tool servers exist. Under a single mcpServers heading, each server gets a name and instructions for reaching it. A local server is like a program on your machine, so you give the command to run it plus the args, the arguments handed to that command, exactly as you would type them in a terminal. A remote server already runs somewhere on the network, so instead of launching anything you just hand over its url. Same address book, two ways to write a contact: dial a local number, or point at a web address.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: name the file and the mcpServers key, walk command plus args for the stdio launch, contrast url for remote Streamable HTTP, then cover env for secrets and the restart requirement.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"],
"env": { "LOG_LEVEL": "info" }
},
"remote-tools": {
"url": "https://tools.example.com/mcp"
}
}
}| Field | stdio (local) server | Streamable HTTP (remote) server |
|---|---|---|
| Top-level key | mcpServers | mcpServers |
| How it connects | command + args spawn a subprocess | url points at an HTTP endpoint |
| Wire transport | JSON-RPC over stdin/stdout | JSON-RPC over Streamable HTTP |
| Where secrets go | env object (process env vars) | OAuth bearer token on the transport |
Real products, models, and research that use this idea.
- A filesystem server entry sets command to npx and args to the @modelcontextprotocol/server-filesystem package plus an allowed directory.
- A GitHub server uses command npx with the GitHub MCP package and an env block holding a personal access token.
- A hosted remote server, such as a vendor's Streamable HTTP endpoint, is added with a url field and no command at all.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does a stdio server's command often need an absolute path or a launcher like npx?
QWhere should an API key for a stdio MCP server live, and why not in args?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Putting servers at the JSON top level instead of under mcpServers, or expecting command and args to work for a remote server that needs url.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.