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. - 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)
A basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.
★ 91.3k · updated 2026-10-10
Web & Search● Maintained
Fetch
A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pag
★ 91.3k · updated 2026-10-10
Utilities● Maintained
Time
A Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and
★ 91.3k · updated 2026-10-10