Skip to content

fix(clients): point Antigravity at ~/.gemini/config/ after the 2.x migration#1151

Merged
Scriptwonder merged 2 commits into
CoplayDev:betafrom
Scriptwonder:fix/antigravity-config-path-migrated
May 24, 2026
Merged

fix(clients): point Antigravity at ~/.gemini/config/ after the 2.x migration#1151
Scriptwonder merged 2 commits into
CoplayDev:betafrom
Scriptwonder:fix/antigravity-config-path-migrated

Conversation

@Scriptwonder
Copy link
Copy Markdown
Collaborator

@Scriptwonder Scriptwonder commented May 24, 2026

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:

~/.gemini/
├── config/                    ← new home (Antigravity reads from here)
│   ├── .migrated              ← migration marker dropped by Antigravity 2.x
│   ├── config.json
│   └── mcp_config.json        ← "mcpServers": {}  (empty after migration)
├── antigravity/               ← still used for runtime state only
│   ├── conversations/
│   ├── scratch/
│   ├── brain/
│   └── mcp_config.json        ← THE PATH WE'VE BEEN WRITING TO. Antigravity no longer reads this.
└── antigravity-backup/        ← pre-migration backup Antigravity made
    └── mcp_config.json

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:

  1. Point all three platform paths at ~/.gemini/config/mcp_config.json (Antigravity 2.x is consistent across macOS / Windows / Linux on this layout).

  2. Override IsInstalled so a fresh install — Antigravity installed but never launched — is still detected. The inherited ParentDirectoryExists(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, ConfigureAllDetectedClients skips Antigravity entirely on a brand-new machine.

Summary by CodeRabbit

  • New Features

    • Added support for the Antigravity IDE client.
    • Renamed user-facing client to "Antigravity 2.0" and updated related onboarding steps.
  • Bug Fixes

    • Improved installation detection for Antigravity to reduce false negatives across platforms.
    • Unified MCP configuration handling so Antigravity 2.0 uses the migrated config location.
  • Documentation

    • Clarified quick-start and manual configuration guidance for Cursor, Antigravity 2.0, Antigravity IDE, OpenClaw, and Claude Desktop.

Review Change Stack

… 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.
Copilot AI review requested due to automatic review settings May 24, 2026 02:57
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 66df1503-8575-4bb3-828d-9dfb383f78b5

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea327e and 4036c3d.

📒 Files selected for processing (6)
  • MCPForUnity/Editor/Clients/Configurators/AntigravityConfigurator.cs
  • MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs
  • MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs.meta
  • README.md
  • docs/guides/MCP_CLIENT_CONFIGURATORS.md
  • docs/i18n/README-zh.md
✅ Files skipped from review due to trivial changes (3)
  • MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs.meta
  • docs/i18n/README-zh.md
  • docs/guides/MCP_CLIENT_CONFIGURATORS.md

📝 Walkthrough

Walkthrough

Unify 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.

Changes

Antigravity Configuration Migration

Layer / File(s) Summary
Config path migration & installation detection
MCPForUnity/Editor/Clients/Configurators/AntigravityConfigurator.cs
Points AntigravityConfigurator at ~/.gemini/config/mcp_config.json, renames client to Antigravity 2.0, adds System.Runtime.InteropServices import, expands IsInstalled to check multiple markers and /Applications/Antigravity.app on macOS, and updates initial install step text.
Antigravity IDE configurator and .meta
MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs, MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs.meta
Adds AntigravityIdeConfigurator that reads ~/.gemini/antigravity-ide/mcp_config.json, maps serverUrl, sets Unity defaults (disabled = false), strips env vars when appropriate, implements IsInstalled, and includes Unity .meta metadata.
Docs and README updates
README.md, docs/guides/MCP_CLIENT_CONFIGURATORS.md, docs/i18n/README-zh.md
Refines Quick Start and Manual Configuration client guidance to mention Cursor, Antigravity 2.0, Antigravity IDE, OpenClaw, and Claude Desktop behavior; updates guide examples and wording to reference both Antigravity variants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • msanatan

Poem

🐰 I hopped through gems and config lands,
Two clients now in careful hands,
IDE and 2.0 split the way,
Docs updated for what they say —
Happy hops on migration day! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating AntigravityConfigurator to use the migrated config path ~/.gemini/config/ after the 2.x migration.
Description check ✅ Passed The description is comprehensive and follows the template structure with Type of Change (Bug fix), detailed explanation of the problem, and specific changes made.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json on all platforms (instead of the legacy ~/.gemini/antigravity/ runtime-state folder).
  • Override IsInstalled to detect Antigravity based on installer-created markers (e.g., ~/.antigravity/, gemini dirs, and /Applications/Antigravity.app on 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.
@Scriptwonder Scriptwonder merged commit 2479c61 into CoplayDev:beta May 24, 2026
2 of 3 checks passed
@Scriptwonder Scriptwonder deleted the fix/antigravity-config-path-migrated branch May 24, 2026 03:13
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