fix(clients): point Antigravity at ~/.gemini/config/ after the 2.x migration#1151
Conversation
… migration)
Antigravity 2.x moved its MCP config from ~/.gemini/antigravity/mcp_config.json
to a dedicated ~/.gemini/config/mcp_config.json. The migration drops a
`.migrated` marker in the new location and renames the prior folder to
`antigravity-backup`; the old path keeps Antigravity's runtime state
(conversations/, scratch/, brain/, etc.) but is no longer read for MCP.
Confirmed empirically on a real machine: ~/.gemini/config/mcp_config.json
shows `mcpServers: {}` (Antigravity reads from here) while our writes have
been landing in the legacy ~/.gemini/antigravity/mcp_config.json that
Antigravity now ignores. Community report matches this exactly: "in
.gemini there are two folders, antigravity and config; antigravity is not
where mcp.json is supposed to be, there is another config folder."
Also override IsInstalled. The inherited ParentDirectoryExists check
points at ~/.gemini/config/, which is only created on Antigravity's first
launch — on a fresh machine that has the app installed but never opened,
detection false-negatives and ConfigureAllDetectedClients skips
Antigravity entirely. Check ~/.antigravity/ (installer-created), the new
config dir, the legacy config dir, or /Applications/Antigravity.app on
macOS; any one of those is conclusive.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughUnify Antigravity MCP config to ~/.gemini/config/mcp_config.json and rename the client to “Antigravity 2.0”; expand installation detection. Add a separate Antigravity IDE JsonFileMcpConfigurator (with .meta). Update README and docs to document both Antigravity variants and per-client notes. ChangesAntigravity Configuration Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the Antigravity client configurator to match Antigravity 2.x’s post-migration MCP config location and to improve “installed” detection so auto-configure/auto-rewrite doesn’t skip fresh installs.
Changes:
- Write Antigravity MCP config to
~/.gemini/config/mcp_config.jsonon all platforms (instead of the legacy~/.gemini/antigravity/runtime-state folder). - Override
IsInstalledto detect Antigravity based on installer-created markers (e.g.,~/.antigravity/, gemini dirs, and/Applications/Antigravity.appon macOS).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… IDE" The two Antigravity apps coexist on the same machine and use different MCP config paths, so they need to be separate configurators in the client list. - AntigravityConfigurator: renamed display label to "Antigravity 2.0" (path now ~/.gemini/config/mcp_config.json, already changed in the parent commit) and updated the installation-steps copy to match. - AntigravityIdeConfigurator (new): same JsonFile shape with serverUrl HTTP property, points at ~/.gemini/antigravity-ide/mcp_config.json where the IDE build keeps both its runtime state and its mcp_config. IsInstalled checks for that dedicated dir. Manual configuration guidance updated in README, README-zh, and MCP_CLIENT_CONFIGURATORS.md to reflect both clients side by side and spell out which path each one writes to.
Community report: "in .gemini there are two folders, antigravity and config; antigravity is not where mcp.json is supposed to be — there is another config folder where mcp.json should be placed."
Verified on a real machine. Antigravity 2.x migrates its MCP config out of the runtime-state folder and into a dedicated one:
The path mismatch combined with the recent startup auto-rewrite means we were silently overwriting a file Antigravity ignores on every Editor launch, so the user sees their carefully-configured UnityMCP entry never showing up in Antigravity's MCP servers UI.
Two changes:
Point all three platform paths at
~/.gemini/config/mcp_config.json(Antigravity 2.x is consistent across macOS / Windows / Linux on this layout).Override
IsInstalledso a fresh install — Antigravity installed but never launched — is still detected. The inheritedParentDirectoryExists(GetConfigPath())would false-negative because~/.gemini/config/is only created on first launch of Antigravity. Check~/.antigravity/(installer-created, VS-Code-style support dir), either of the gemini config dirs, or the macOS app bundle. Without this,ConfigureAllDetectedClientsskips Antigravity entirely on a brand-new machine.Summary by CodeRabbit
New Features
Bug Fixes
Documentation