Skip to content

[Bug]: setup.sh option 3 overwrites ~/.claude/settings.json, destroying existing Claude Code configuration #13

Description

@jwerre

Describe the Bug

When a user selects option 3 ("Claude Code") during the interactive setup, setup.sh performs a full overwrite of ~/.claude/settings.json rather than merging the new MCP server entry into the existing file. Any previously configured MCP servers, permissions, or other settings are permanently lost.

To Reproduce

  1. Have an existing ~/.claude/settings.json with MCP servers or other configuration.
  2. Run ./setup.sh and select option 3 (Claude Code integration).
  3. Observe that ~/.claude/settings.json now contains only the OpenBrain MCP entry — all prior configuration is gone.

setup.sh lines 340–357 use a heredoc redirect (cat > "$CONFIG" << EOJSON) which unconditionally overwrites the target file. The PowerShell version (setup.ps1) attempts a merge, but the bash version does not.

Expected Behavior

If ~/.claude/settings.json already exists, the script should read the existing content and merge the new mcpServers entry rather than replacing the file.

Actual Behavior

Any user who already uses Claude Code with existing MCP servers or custom settings will silently lose that configuration with no warning and no backup.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions