MCP Config Errors: Fixing claude_desktop_config.json Mistakes
Trailing commas, wrong paths, forgotten env blocks — the five config mistakes that break MCP servers, with the exact correct shape.
The MCP config is small but unforgiving. Here are the five mistakes that break it and the exact shape that works.
The correct shape
Every server is one entry under mcpServers, keyed by a name you choose:
command— the executable (usuallynpxoruvx).args— an array, e.g.["-y", "@scope/server"].env— optional object with secrets/config.
The five mistakes
- Trailing comma after the last key. JSON has no trailing commas — it invalidates the whole file.
- args as a string instead of an array. It must be
["-y", "pkg"], not"-y pkg". - Windows paths without escaping. Backslashes must be doubled:
C:\\Users\\me\\.... - Secrets in args instead of env. Tokens belong in
env, not the command line — otherwise they leak into logs. - Wrong file or location. Editing the wrong
claude_desktop_config.json(there is exactly one, per the paths above) means your change does nothing.
How to be sure it is valid
Paste the file into a JSON validator before restarting. If it parses, Claude will read it. If Claude still ignores the server, the JSON is fine but the command itself fails — run it in a terminal to see the error.
Skip the file entirely
Hand-editing is the root cause of every item above. On Unyly, Install writes the entry in the right file, in the right shape, for Cursor / VS Code / Claude Code / Claude Desktop — no JSON by hand.