まえがき
- AntiGravityVer2になってからWSL2のMCPが認識されなくて、超絶頭を抱えている。
- AntiGravity-IDEとagy(CLI)からは認識できるが…
- 前回、地獄を見ている。
- 前々回の記事でWSL2+AntigravityVer2(AGv2)で泥沼にハマった。
Antigravity IDE v2.x でMCPが突然死んだ話【バグ報告】
TL;DR
- Antigravity IDE(スタンドアロン版)を v1.x → v2.0.x にアップデートしたら、MCPサーバーが一切認識されなくなった
-
mcp_config.jsonは正常。設定ファイルの問題ではない - バイナリ解析の結果、MCPはサーバーサイドのフィーチャーフラグ(
CASCADE_ENABLE_MCP_TOOLS)で制御されており、v2.x ではそのフラグが有効化されていないアカウントが存在することが判明 - VSCode の WSL Remote 拡張版では問題なく動く(= スタンドアロン版固有のバグ)
- Googleに報告済み
環境
| 項目 | 内容 |
|---|---|
| OS | Windows 11 |
| AG2 | Antigravity IDE v2.0.10(スタンドアロン) |
| WSL | Ubuntu-24.04 (WSL2) |
| MCPサーバー | my-custom-mcp(pipenv管理)、my-docs-mcp(SSE) |
何が起きたか
Antigravity IDE を v2.0.10 にアップデートした後、エージェントが MCP ツールを一切呼び出せなくなった。
設定画面(Settings → Customizations → MCP Tools)を開くと:
No MCP Servers
You currently don't have any MCP Servers installed.
AntiGravityVer2-IDEで、Remoteを選択すれば、認識される。
WSL2上のagy(CLI)でも同様。
**実際のチャットログ:**
> **User:** 今見えているMCPツールは?
>
> **Antigravity:**
> 現在、利用可能なMCPサーバーとツールは以下の通りです。
>
> **1. my-docs-mcp (社内Wiki検索用)**
> 社内ドキュメントやAPIリファレンスを検索するためのツール群です。
> - `list_pages`, `search_wiki`, `get_article` など計10個
>
> **2. my-custom-mcp (社内DB操作用)**
> 社内データベースのクエリや分析を行うツール群です。
> - 検索系: `search_users`, `get_user_profile`, `find_active_sessions` など
> - 分析系: `analyze_access_logs`, `generate_monthly_report` など
> - バッチ処理系: `run_daily_job`, `check_job_status` など
> 計29個のツールが利用可能です。
と表示される。mcp_config.json は以前から存在し、内容も変えていない。
おそらく
- AntiGravityVer1と違いリモート接続が無いからだろう。
- AGY(CLI)や、IDEだと問題なし。
- これは直接WSL2環境を覗けるからだと思われる。
切り分け
① mcp_config.json の内容は正しいか?
手動でMCPサーバーに JSON-RPC リクエストを送って確認:
cat test_init.json | ~/.local/bin/pipenv run `my-mcp` stdio
{"jsonrpc":"2.0","id":1,"result":{
"serverInfo":{"name":"my-mcp","version":"1.27.1"},
...
}}
→ サーバー自体は正常に動作している。設定ファイルの問題ではない。
② AG2 は mcp_config.json を読んでいるか?
起動後の language_server.log を確認:
I0601 06:39:43.333511 server.go:1898] initialized server successfully in 3.57s
MCP に関するログが一切出ていない。読み込みを試みた形跡すらない。
→ AG2 がそもそも mcp_config.json を読もうとしていない。
③ どのファイルを読んでいるか?
AG2 は複数の設定ファイルが存在する:
| ファイル | 用途 |
|---|---|
C:\Users\[user]\.gemini\antigravity\mcp_config.json |
v1系の設定(スタンドアロン) |
C:\Users\[user]\.gemini\antigravity\mcp_config.v2.json |
v2系と思われる設定 |
しかし、どちらを正しく書いても UI に反映されず、ログにも記録されない。
④ VSCode WSL Remote 拡張版では動くか?
WSL Remote 接続した VSCode の Antigravity 拡張では MCP が正常に動作した:
Installed MCP Servers [Remote]
├── pinescript-docs ● 10 tools enabled
└── tradingview ● 29 tools enabled
→ スタンドアロン版(Windowsアプリ)固有の問題。
⑤ バイナリを解析する
strings コマンドで language_server.exe を解析:
strings language_server.exe | grep -iE 'mcp|turbo'
CASCADE_ENABLE_MCP_TOOLS ← MCPはフィーチャーフラグで制御
TURBO ← Turboモード
TurboModeSetting ← Turboモードのprotobuf構造体
mcp_enabled ← MCPの有効フラグ
mcpConfigJson ← フラグが有効な時だけ読まれる設定
failed to parse mcp_config_json ← フラグ有効時のエラーメッセージ
さらに起動引数を確認:
language_server.exe
--standalone
--app_data_dir antigravity
--api_server_url https://generativelanguage.googleapis.com
--cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com
--enable_sidecars
# ↑ MCPを有効化するようなフラグが存在しない
結論:バグの根拠
┌─────────────────────────────────────────────┐
│ AG2 v2.x の MCP は │
│ サーバーサイドのフィーチャーフラグ │
│ 「CASCADE_ENABLE_MCP_TOOLS」で制御されている │
│ │
│ loadCodeAssist API のレスポンスで │
│ フラグが OFF のアカウントは │
│ mcp_config.json を一切読まない │
└─────────────────────────────────────────────┘
これはファイルを編集しても解決しない。Google 側のアカウント設定の問題。
回避策
-
1.VSCode + Antigravity 拡張(WSL Remote)を使う
- WSL Remote モードで接続した場合は MCP が正常に動作する。
- スタンドアロンの Antigravity IDE が修正されるまでの暫定対処として有効。
-
2.agy(CLI)を使う
- 大変不本意である。スクショ貼れないのが辛い。
-
- AntiGravityVer1へ戻す。
- いつまで使えることやら…マジで直してください。
- マジでそろそろ、この雑な感じやめて。
Googleへの報告
以下の内容で AG2 の「Report Issue」から報告済み:
-
Subject:
MCP broken since AG2 v2.0.x – CASCADE_ENABLE_MCP_TOOLS not enabled for my account - 証拠として
strings language_server.exeの出力とlanguage_server.logの無活動を添付
まとめ
| 確認項目 | 結果 |
|---|---|
| MCPサーバー自体の動作 | ✅ 正常 |
| mcp_config.json の内容 | ✅ 正常 |
| AG2 v2.x がファイルを読む | ❌ 読まない |
| バイナリにMCP有効化フラグの存在 | ✅ CASCADE_ENABLE_MCP_TOOLS
|
| VSCode WSL Remote 拡張での動作 | ✅ 正常 |
| スタンドアロン版での動作 | ❌ 動かない |
→ AG2 スタンドアロン v2.0.x のバグ(サーバーサイドのフラグ制御)
同じ問題に当たっている方は、ぜひ AG2 の「Report Issue」から報告してください。
報告が増えるほど修正が早まる可能性があります。
English Translation
Foreword
- Since updating to AntiGravity Ver2, the MCP in WSL2 is completely unrecognizable, and I am tearing my hair out.
- It can be recognized from the AntiGravity-IDE (Remote) and agy (CLI), but...
- Last time, I went through hell.
- In the time before that, I got stuck in a quagmire with WSL2 + Antigravity Ver2 (AGv2).
The Story of MCP Suddenly Dying in Antigravity IDE v2.x [Bug Report]
TL;DR
- After updating Antigravity IDE (Standalone version) from v1.x to v2.0.x, MCP servers are completely unrecognized.
-
mcp_config.jsonis perfectly fine. It's not a configuration file issue. - Binary analysis revealed that MCP is now controlled by a server-side feature flag (
CASCADE_ENABLE_MCP_TOOLS), and in v2.x, there are accounts where this flag is not enabled. - It works perfectly fine in the VSCode WSL Remote extension (= A bug specific to the Standalone version).
- Already reported to Google.
Environment
| Item | Details |
|---|---|
| OS | Windows 11 |
| AG2 | Antigravity IDE v2.0.10 (Standalone) |
| WSL | Ubuntu-24.04 (WSL2) |
| MCP Servers | my-custom-mcp (managed via pipenv), my-docs-mcp (SSE) |
What Happened
After updating Antigravity IDE to v2.0.10, the agent could no longer call any MCP tools.
When opening the settings screen (Settings → Customizations → MCP Tools):
No MCP Servers
You currently don't have any MCP Servers installed.
If you select "Remote" in AntiGravity Ver2-IDE, it is recognized.
The same goes for agy (CLI) on WSL2.
**Actual Chat Log:**
> **User:** What MCP tools can you see right now?
>
> **Antigravity:**
> Currently, the available MCP servers and tools are as follows.
>
> **1. my-docs-mcp (For Internal Wiki Search)**
> A set of tools for searching internal documents and API references.
> - 10 tools in total, including `list_pages`, `search_wiki`, `get_article`, etc.
>
> **2. my-custom-mcp (For Internal DB Operations)**
> A set of tools for querying and analyzing the internal database.
> - Search tools: `search_users`, `get_user_profile`, `find_active_sessions`, etc.
> - Analysis tools: `analyze_access_logs`, `generate_monthly_report`, etc.
> - Batch processing tools: `run_daily_job`, `check_job_status`, etc.
> A total of 29 tools are available.
It is displayed like this. mcp_config.json has existed before, and its contents have not changed.
Most Likely
- Unlike AntiGravity Ver1, it's probably because there is no native remote connection.
- There are no issues with AGY (CLI) or the VSCode IDE extension.
- This seems to be because they can look directly into the WSL2 environment.
Troubleshooting
1. Is the content of mcp_config.json correct?
Confirmed by manually sending a JSON-RPC request to the MCP server:
cat test_init.json | ~/.local/bin/pipenv run `my-mcp` stdio
{"jsonrpc":"2.0","id":1,"result":{
"serverInfo":{"name":"my-mcp","version":"1.27.1"},
...
}}
→ The server itself is running normally. It is not a config file issue.
2. Is AG2 reading mcp_config.json?
Checked language_server.log after startup:
I0601 06:39:43.333511 server.go:1898] initialized server successfully in 3.57s
There are absolutely no logs related to MCP. There isn't even a trace of an attempt to read it.
→ AG2 isn't even trying to read mcp_config.json in the first place.
3. Which file is it reading?
AG2 has multiple configuration files:
| File | Purpose |
|---|---|
C:\Users\[user]\.gemini\antigravity\mcp_config.json |
Settings for v1 (Standalone) |
C:\Users\[user]\.gemini\antigravity\mcp_config.v2.json |
Expected settings for v2 |
However, even if both are written correctly, they are not reflected in the UI, nor are they recorded in the logs.
4. Does it work in the VSCode WSL Remote extension?
When checking with the Antigravity extension in VSCode connected via WSL Remote, MCP operated normally:
Installed MCP Servers [Remote]
├── pinescript-docs ● 10 tools enabled
└── tradingview ● 29 tools enabled
→ This is a bug specific to the Standalone version (Windows app).
5. Analyzing the binary
Analyzed language_server.exe using the strings command:
strings language_server.exe | grep -iE 'mcp|turbo'
CASCADE_ENABLE_MCP_TOOLS ← MCP is controlled by a feature flag
TURBO ← Turbo Mode
TurboModeSetting ← protobuf structure for Turbo Mode
mcp_enabled ← MCP enable flag
mcpConfigJson ← Config read only when the flag is enabled
failed to parse mcp_config_json ← Error message when the flag is enabled
Furthermore, checking the startup arguments:
language_server.exe
--standalone
--app_data_dir antigravity
--api_server_url https://generativelanguage.googleapis.com
--cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com
--enable_sidecars
# ↑ There are no flags present to enable MCP
Conclusion: Evidence of the Bug
┌─────────────────────────────────────────────┐
│ MCP in AG2 v2.x is controlled by the │
│ server-side feature flag │
│ "CASCADE_ENABLE_MCP_TOOLS". │
│ │
│ Accounts where this flag is turned OFF │
│ in the loadCodeAssist API response │
│ will not read mcp_config.json at all. │
└─────────────────────────────────────────────┘
Editing files will not solve this. It is an account configuration issue on Google's end.
Workarounds
-
1. Use VSCode + Antigravity Extension (WSL Remote)
- When connected in WSL Remote mode, MCP operates normally.
- This is an effective temporary measure until the Standalone Antigravity IDE is fixed.
-
2. Use agy (CLI)
- I am very reluctant to do this. It's painful not being able to paste screenshots.
-
3. Roll back to AntiGravity Ver1
- Who knows how long it will remain usable... Please fix this immediately.
- Seriously, please stop with this sloppy release quality.
Report to Google
I have already submitted a report via "Report Issue" in AG2 with the following content:
-
Subject:
MCP broken since AG2 v2.0.x – CASCADE_ENABLE_MCP_TOOLS not enabled for my account - Attached the output of
strings language_server.exeand the lack of activity inlanguage_server.logas evidence.
Summary
| Checklist Item | Result |
|---|---|
| MCP server operation | ✅ Normal |
| Content of mcp_config.json | ✅ Normal |
| AG2 v2.x reading the file | ❌ Does not read |
| Presence of MCP flag in binary | ✅ CASCADE_ENABLE_MCP_TOOLS
|
| Operation in VSCode WSL Remote | ✅ Normal |
| Operation in Standalone version | ❌ Does not work |
→ Bug in AG2 Standalone v2.0.x (Server-side flag control)
If you are facing the same issue, please report it via "Report Issue" in AG2. The more reports they receive, the faster it might get fixed.
