Spot the error in this Claude Desktop MCP server configuration
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Click any words you think contain an error. Click again to unmark.
The `args` value is a single space-delimited string. It must be a JSON array of separate strings, because the host hands it straight to the process spawn as argv.
Think of ordering at a deli counter. If you hand the clerk one sticky note that says 'turkey swiss no mayo on rye', they treat it as one weird sandwich name and look confused. If you list each item separately, turkey, then swiss, then no mayo, then rye, they handle each one correctly. A process launcher works the same way. Each command-line flag, package name, and folder path is a separate instruction. When you cram them into one string, the launcher treats the whole thing as a single mystery argument and the server never starts. Splitting them into an array gives the launcher one clean instruction at a time, exactly the way it expects.
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.
3 min: name the type error, explain the spawn to argv mapping, show the corrected array, then mention the secrets in env and absolute-path adjacent traps.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/alice/projects"],
"env": { "LOG_LEVEL": "info" }
}
}
}| Field | Wrong shape | Correct shape |
|---|---|---|
| args type | Single string | Array of strings |
| How host uses it | One argv element | One element per token |
| npx result | Package not found | Server spawns |
| Secrets | Baked into args | Sibling env object |
| Paths | Relative, may not resolve | Absolute, resolves anywhere |
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.
Writing args as one space-joined string. The host feeds it to spawn as a single argv entry, so the server binary never sees its flags.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.