Skip to content

Fix Claude Desktop config overwrite when using save panel - #150

Merged
mattt merged 1 commit into
mattt:mainfrom
sciencemanx:fix/claude-desktop-config-overwrite
May 7, 2026
Merged

mattt merged 1 commit into
mattt:mainfrom
sciencemanx:fix/claude-desktop-config-overwrite

Conversation

@sciencemanx

Copy link
Copy Markdown
Contributor

Summary

  • When the save panel fallback is used (first run, no security-scoped bookmark), the existing config file contents were lost because loadConfig() couldn't read the file due to sandbox restrictions
  • The save panel grants file access, so now re-reads and merges the existing config before writing instead of overwriting with the empty default
  • Preserves all existing preferences, other mcpServers entries, and any other top-level keys

Test plan

  • Delete any stored security-scoped bookmark (fresh install scenario)
  • Add custom entries to claude_desktop_config.json (e.g. preferences, other MCP servers)
  • Click "Configure Claude Desktop" — verify the save panel appears
  • Select the existing config file — verify existing entries are preserved and iMCP is added/updated

🤖 Generated with Claude Code

When the save panel fallback is used (first run, no security-scoped
bookmark), the existing config file contents were lost because
loadConfig() couldn't read the file due to sandbox restrictions.
The save panel grants file access, so re-read and merge the existing
config before writing instead of overwriting with the empty default.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
bratland added a commit to bratland/iMCP that referenced this pull request Apr 13, 2026
@mattt

mattt commented May 7, 2026

Copy link
Copy Markdown
Owner

Hi @sciencemanx. I'm sorry for not responding sooner. Thank you for contributing this fix! Merging this now as part of a patch release.

@mattt
mattt merged commit c4b3767 into mattt:main May 7, 2026
@mattt

mattt commented May 7, 2026

Copy link
Copy Markdown
Owner

Just released 1.4.1. Thanks again for your help and patience 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants