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:

  1. 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/mcp
  • claude mcp add -s user deepwiki -- /path/to/deepwiki serve

The second silently shadows the first — no warning that the name is already taken.

  1. claude mcp add wasn't usable in my setup, so I hand-edited ~/.claude.json directly. Editing by hand means the tooling can't catch a duplicate name for me.
  1. No validation on load. Claude Desktop accepts a config with two deepwiki entries — 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 which deepwiki was 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗