MCP config JSON syntax errors (trailing commas, comments, quotes)
Claude DesktopCursorWindsurf
The error
Unexpected token } in JSON at position … • "Failed to parse MCP config" • servers silently missing
Why it happens
MCP config files are strict JSON: no trailing commas, no comments, double quotes only, and backslashes must be escaped. One error disables every server in the file.
How to fix it
- Validate the file
Run it through a JSON parser.python3 -m json.tool ~/.cursor/mcp.json # or node -e "JSON.parse(require('fs').readFileSync(process.argv[1]))" ~/.cursor/mcp.json - Remove trailing commas and comments
The last item in an object or array must not end with a comma; delete any//comments. - Claude Code points to the exact spot
Since Claude Code 2.1.326 (November 16, 2026), a settings or.mcp.jsonfile with broken JSON gets an error that names the line and column, so go straight there. - Merge into a single mcpServers object
When adding a second server, put it inside the samemcpServersobject. Don't paste a second top-level block.{ "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] }, "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] } } }
Related servers
Memory & Reasoning● Maintained
Memory (Knowledge Graph)
Official reference server that gives the model persistent memory as a local knowledge graph (entities, relations and observations stored in a file). V
★ 92.4k · updated 2026-11-27
Web & Search● Maintained
Fetch
Official reference server that fetches web pages and converts them to Markdown for the model. Version 2026.11.27 (Nov 27, 2026, reference servers v2.6
★ 92.4k · updated 2026-11-27
Utilities● Maintained
Time
Official reference server that gives the model the current time and converts times between time zones. Version 2026.11.27 (Nov 27, 2026, reference ser
★ 92.4k · updated 2026-11-27