MCP config accepts duplicate server names and corrupt entries silently (no validation)
Status Fixed / completed
Maintainer reply None cached
Activity 2 comments · opened Jul 16, 2026 · closed Aug 25, 2026
Three compounding gaps around ~/.claude.json / claude mcp add:
- Duplicate server names are accepted silently. The official DeepWiki server and my own local one both naturally register as
deepwiki:
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcpclaude mcp add -s user deepwiki -- /path/to/deepwiki serve
The second silently shadows the first — no warning that the name is already taken.
claude mcp addwasn't usable in my setup, so I hand-edited~/.claude.jsondirectly. Editing by hand means the tooling can't catch a duplicate name for me.
- No validation on load. Claude Desktop accepts a config with two
deepwikientries — or literally duplicate JSON keys, or malformed JSON — silently: no warning, no "which one won," no refusal to load. It just does something undocumented (last-wins? merge? drop one?), so an ambiguous or corrupt config runs as if it were fine and is impossible to debug — I couldn't even tell whichdeepwikiwas live.
Ask: warn on duplicate server names at mcp add time; and validate ~/.claude.json on load — reject or loudly warn on duplicate keys, duplicate server names, and malformed JSON, and state explicitly which entry wins when there's a conflict.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗