MCP Config JSON Invalid / Not Loading
Quick fix: validate your config with cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python3 -m json.tool (macOS/Linux) or Get-Content "$env:APPDATA\Claude\claude_desktop_config.json" | ConvertFrom-Json (Windows). If the command errors, fix the JSON problem it reports — a single syntax error silently disables all MCP servers.
In this guide
Why JSON errors are silent
Claude Desktop parses claude_desktop_config.json at startup as a single JSON document. If parsing fails, the entire file is rejected — Claude Desktop cannot fall back to individual servers because it never got past reading the file. All servers are disabled and no error appears in the Claude UI. The only indicator is the missing tools icon.
How to validate your config
# macOS / Linux cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python3 -m json.tool # Windows (PowerShell) Get-Content "$env:APPDATA\Claude\claude_desktop_config.json" | ConvertFrom-Json # Any platform - using node node -e "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8'))" ~/Library/Application\ Support/Claude/claude_desktop_config.json
If the command throws an error, you will see the line number and character position of the problem. Fix it, then rerun the command to confirm the file is now valid before restarting Claude Desktop.
Common JSON errors and fixes
1. Trailing comma (most common)
JSON does not allow a comma after the last item in an object or array. This is valid JavaScript but not valid JSON.
// WRONG - trailing comma after the last server { "mcpServers": { "filesystem": { "command": "/usr/local/bin/npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"], ← remove this }, ← and this } } // CORRECT { "mcpServers": { "filesystem": { "command": "/usr/local/bin/npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] } } }
2. Unescaped backslash in Windows path
In JSON strings, a backslash must be doubled. A single backslash is an escape character and will cause a parse error unless followed by a valid escape sequence (\n, \t, \\, \", etc.).
// WRONG - single backslashes "command": "C:\Users\you\AppData\Roaming\npm\npx.cmd" // CORRECT option 1 - forward slashes (recommended) "command": "C:/Users/you/AppData/Roaming/npm/npx.cmd" // CORRECT option 2 - escaped backslashes "command": "C:\\Users\\you\\AppData\\Roaming\\npm\\npx.cmd"
3. Comments in JSON
JSON does not support comments. The // syntax is JavaScript, not JSON.
// WRONG - JSON does not allow comments
{
"mcpServers": {
// "old-server": { ... }, ← will cause parse error
"filesystem": { ... }
}
}
To "comment out" a server, delete the entry entirely or rename the key to something like "_disabled_filesystem".
4. Single quotes instead of double quotes
// WRONG - single quotes { 'mcpServers': { 'filesystem': { 'command': '/usr/local/bin/npx' } } } // CORRECT - always double quotes { "mcpServers": { "filesystem": { "command": "/usr/local/bin/npx" } } }
5. Missing closing brace or bracket
When you add a new server, it is easy to forget to close all braces. Each { needs a matching } and each [ needs a matching ]. Use an editor with bracket matching (VS Code highlights unmatched braces in red) or a JSON validator.
// WRONG - missing closing brace for github server
{
"mcpServers": {
"filesystem": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"github": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
← missing closing } for github, } for mcpServers, } for root
}
Correct config structure
For reference, this is the minimal valid config structure:
{
"mcpServers": {
"server-name": {
"command": "/absolute/path/to/npx",
"args": ["-y", "package-name"]
}
}
}
With multiple servers and env vars:
{
"mcpServers": {
"filesystem": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
},
"github": {
"command": "/usr/local/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_yourtoken"
}
}
}
}
Config at wrong file path
If the JSON is valid but servers still do not appear, confirm you are editing the right file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json(typicallyC:\Users\NAME\AppData\Roaming\Claude\claude_desktop_config.json) - Linux:
~/.config/Claude/claude_desktop_config.json
Open the file directly to confirm you are editing the right one:
# macOS open ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows notepad "$env:APPDATA\Claude\claude_desktop_config.json" # Linux nano ~/.config/Claude/claude_desktop_config.json
Automated check: paste your config into the MCP Config Auditor — validates JSON, flags bare commands, placeholder tokens, and relative paths in one pass. 100% client-side, nothing leaves your browser.
CLI: pip install mcp-config-lint && mcp-config-lint for a terminal report. Run it before every commit to keep shared configs valid.
FAQ
macOS/Linux: cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python3 -m json.tool. Windows: Get-Content "$env:APPDATA\Claude\claude_desktop_config.json" | ConvertFrom-Json. If either command errors, the JSON is invalid. Fix the error it reports and rerun to confirm.
Claude Desktop parses the entire config file as a single JSON document. A parse failure means the file cannot be read at all. There is no per-server fallback. One bad comma disables everything silently.
In order of frequency: trailing comma after the last item in an object or array, unescaped Windows path backslash (use forward slashes instead), comments (JSON does not support //), single quotes instead of double quotes, missing closing brace when adding a new server.
Check: correct file path for your OS, fully quit Claude Desktop (Cmd+Q, not just close window), absolute paths in command fields, no placeholder env var values. See the MCP server not connecting guide for the full checklist.