Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
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.
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.
What an interviewer would ask next. Try answering before peeking at the approach.
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.