Skip to content

Commit 4036c3d

Browse files
committed
fix(clients): split Antigravity into "Antigravity 2.0" + "Antigravity 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.
1 parent 3ea327e commit 4036c3d

6 files changed

Lines changed: 72 additions & 9 deletions

File tree

MCPForUnity/Editor/Clients/Configurators/AntigravityConfigurator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class AntigravityConfigurator : JsonFileMcpConfigurator
1818
// fails to register UnityMCP on every modern install.
1919
public AntigravityConfigurator() : base(new McpClient
2020
{
21-
name = "Antigravity",
21+
name = "Antigravity 2.0",
2222
windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "config", "mcp_config.json"),
2323
macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "config", "mcp_config.json"),
2424
linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "config", "mcp_config.json"),
@@ -50,7 +50,7 @@ public override bool IsInstalled
5050

5151
public override IList<string> GetInstallationSteps() => new List<string>
5252
{
53-
"Open Antigravity",
53+
"Open Antigravity 2.0",
5454
"Click the more_horiz menu in the Agent pane > MCP Servers",
5555
"Select 'Install' for Unity MCP or use the Configure button above",
5656
"Restart Antigravity if necessary"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using MCPForUnity.Editor.Constants;
5+
using MCPForUnity.Editor.Models;
6+
using UnityEditor;
7+
8+
namespace MCPForUnity.Editor.Clients.Configurators
9+
{
10+
/// <summary>
11+
/// Antigravity IDE — the separate IDE build that ships its own ~/.gemini/antigravity-ide/
12+
/// runtime dir and reads its MCP config from that same folder. It did NOT migrate to
13+
/// ~/.gemini/config/ the way Antigravity 2.0 did, so it still uses the legacy in-folder
14+
/// mcp_config.json layout. The two apps coexist on the same machine, so we expose them
15+
/// as separate clients rather than trying to autodetect which one to write to.
16+
/// </summary>
17+
public class AntigravityIdeConfigurator : JsonFileMcpConfigurator
18+
{
19+
public AntigravityIdeConfigurator() : base(new McpClient
20+
{
21+
name = "Antigravity IDE",
22+
windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity-ide", "mcp_config.json"),
23+
macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity-ide", "mcp_config.json"),
24+
linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity-ide", "mcp_config.json"),
25+
HttpUrlProperty = "serverUrl",
26+
DefaultUnityFields = { { "disabled", false } },
27+
StripEnvWhenNotRequired = true
28+
})
29+
{ }
30+
31+
// ~/.gemini/antigravity-ide/ is created by the IDE on first launch and holds both
32+
// its runtime state (annotations/, brain/, conversations/, ...) and its mcp_config.json
33+
// — presence of the dir is the canonical "Antigravity IDE has been installed and
34+
// launched at least once" signal.
35+
public override bool IsInstalled
36+
{
37+
get
38+
{
39+
string home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
40+
return Directory.Exists(Path.Combine(home, ".gemini", "antigravity-ide"));
41+
}
42+
}
43+
44+
public override IList<string> GetInstallationSteps() => new List<string>
45+
{
46+
"Open Antigravity IDE",
47+
"Click the more_horiz menu in the Agent pane > MCP Servers",
48+
"Select 'Install' for Unity MCP or use the Configure button above",
49+
"Restart Antigravity IDE if necessary"
50+
};
51+
}
52+
}

MCPForUnity/Editor/Clients/Configurators/AntigravityIdeConfigurator.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ openupm add com.coplaydev.unity-mcp
8787
- In the **Clients** tab, click **Configure All Detected Clients** to set up every client found on your machine in one shot, or pick a single client from the dropdown and click **Configure**.
8888
- Look for 🟢 "Connected ✓".
8989

90-
**Per-client gotchas:** Some clients (Cursor, Antigravity, OpenClaw) still require enabling an MCP toggle or plugin in their own settings. OpenClaw also needs the `openclaw-mcp-bridge` plugin enabled and follows the currently selected MCP for Unity transport (`HTTP` or `stdio`). Claude Desktop only supports stdio — MCP for Unity will silently configure it that way even if you've selected HTTP elsewhere. Claude Code, VS Code, Windsurf, Cline, and the various CLI clients auto-connect after configuration.
90+
**Per-client gotchas:** Some clients (Cursor, Antigravity 2.0, Antigravity IDE, OpenClaw) still require enabling an MCP toggle or plugin in their own settings. The two Antigravity clients are listed separately because Antigravity 2.0 migrated its MCP config into `~/.gemini/config/` while Antigravity IDE still uses `~/.gemini/antigravity-ide/`; if you run both, configure each one. OpenClaw also needs the `openclaw-mcp-bridge` plugin enabled and follows the currently selected MCP for Unity transport (`HTTP` or `stdio`). Claude Desktop only supports stdio — MCP for Unity will silently configure it that way even if you've selected HTTP elsewhere. Claude Code, VS Code, Windsurf, Cline, and the various CLI clients auto-connect after configuration.
9191

9292
**Updates handle themselves.** When you update the package, MCP for Unity rewrites the configs of every detected client on the next Editor open — no need to repeat the Configure step.
9393

@@ -118,7 +118,7 @@ openupm add com.coplaydev.unity-mcp
118118

119119
If auto-setup doesn't work, add this to your MCP client's config file:
120120

121-
**HTTP (default — works with Cursor, Windsurf, Antigravity, VS Code, Cline; Claude Desktop is stdio-only, see below):**
121+
**HTTP (default — works with Cursor, Windsurf, Antigravity 2.0, Antigravity IDE, VS Code, Cline; Claude Desktop is stdio-only, see below):**
122122
```json
123123
{
124124
"mcpServers": {

docs/guides/MCP_CLIENT_CONFIGURATORS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This guide explains how MCP client configurators work in this repo and how to ad
44

55
It covers:
66

7-
- **Typical JSON-file clients** (Cursor, VSCode GitHub Copilot, VSCode Insiders, GitHub Copilot CLI, Windsurf, Kiro, Trae, Antigravity, etc.).
7+
- **Typical JSON-file clients** (Cursor, VSCode GitHub Copilot, VSCode Insiders, GitHub Copilot CLI, Windsurf, Kiro, Trae, Antigravity 2.0, Antigravity IDE, etc.).
88
- **Special clients** like **Claude CLI**, **Codex**, and **OpenClaw** that require custom logic.
99
- **How to add a new configurator class** so it shows up automatically in the MCP for Unity window.
1010

@@ -93,7 +93,7 @@ Most MCP clients use a JSON config file that defines one or more MCP servers. Ex
9393
- **VSCode Insiders GitHub Copilot**`JsonFileMcpConfigurator` with `IsVsCodeLayout = true` and Insider-specific `Code - Insiders/User/mcp.json` paths.
9494
- **GitHub Copilot CLI**`JsonFileMcpConfigurator` with standard HTTP transport.
9595
- **Windsurf**`JsonFileMcpConfigurator` with Windsurf-specific flags (`HttpUrlProperty = "serverUrl"`, `DefaultUnityFields["disabled"] = false`, etc.).
96-
- **Kiro**, **Trae**, **Antigravity (Gemini)** – JSON configs with project-specific paths and flags.
96+
- **Kiro**, **Trae**, **Antigravity 2.0** (`~/.gemini/config/mcp_config.json` after the 2.x migration), **Antigravity IDE** (separate `~/.gemini/antigravity-ide/mcp_config.json` — the IDE build did not migrate) – JSON configs with project-specific paths and flags.
9797

9898
All of these follow the same pattern:
9999

@@ -118,7 +118,7 @@ All of these follow the same pattern:
118118
- `command` + `args` (stdio with `uvx`).
119119
- **URL property name**
120120
- `HttpUrlProperty` (default `"url"`) selects which JSON property to use for HTTP urls.
121-
- Example: Windsurf and Antigravity use `"serverUrl"`.
121+
- Example: Windsurf and the two Antigravity clients use `"serverUrl"`.
122122
- **VS Code layout**
123123
- `IsVsCodeLayout = true` switches config structure to a VS Code compatible layout.
124124
- **Env object and default fields**
@@ -228,7 +228,7 @@ Override `GetInstallationSteps` to tell users how to configure the client:
228228
- Which menu path opens the MCP settings.
229229
- Whether they should rely on the **Configure** button or copy-paste the manual JSON.
230230

231-
Look at `CursorConfigurator`, `VSCodeConfigurator`, `VSCodeInsidersConfigurator`, `KiroConfigurator`, `TraeConfigurator`, or `AntigravityConfigurator` for phrasing.
231+
Look at `CursorConfigurator`, `VSCodeConfigurator`, `VSCodeInsidersConfigurator`, `KiroConfigurator`, `TraeConfigurator`, `AntigravityConfigurator`, or `AntigravityIdeConfigurator` for phrasing.
232232

233233
### 4. Rely on the base JSON logic
234234

docs/i18n/README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ openupm add com.coplaydev.unity-mcp
8181
2. 点击 **Start Server**(会在 `localhost:8080` 启动 HTTP 服务器)
8282
3. 从下拉菜单选择你的 MCP Client,然后点击 **Configure**
8383
4. 查找 🟢 "Connected ✓"
84-
5. **连接你的客户端:** 一些客户端(Cursor、AntigravityOpenClaw)需要在设置里启用 MCP 开关或插件。OpenClaw 还需要启用 `openclaw-mcp-bridge` 插件,并会跟随 MCP for Unity 当前选择的传输方式(HTTP 或 stdio);另一些(Claude Desktop、Claude Code)在配置后会自动连接。
84+
5. **连接你的客户端:** 一些客户端(Cursor、Antigravity 2.0、Antigravity IDE、OpenClaw)需要在设置里启用 MCP 开关或插件。Antigravity 2.0 与 Antigravity IDE 是分开列出的:Antigravity 2.0 已迁移到 `~/.gemini/config/`,而 Antigravity IDE 仍使用 `~/.gemini/antigravity-ide/`;如果两者都在使用,请分别配置。OpenClaw 还需要启用 `openclaw-mcp-bridge` 插件,并会跟随 MCP for Unity 当前选择的传输方式(HTTP 或 stdio);另一些(Claude Desktop、Claude Code)在配置后会自动连接。
8585

8686
**就这些!** 试试这样的提示词:*"Create a red, blue and yellow cube"**"Build a simple player controller"*
8787

0 commit comments

Comments
 (0)