[Bug] Antigravity v2 (agy CLI / Desktop) ignores SSE `endpoint` event → POST to /sse returns 405. Gemini CLI works fine with the same server

Antigravity v2 (agy CLI v1.0.8 and V2 Desktop) cannot connect to remote SSE MCP servers.

Symptom:
The client opens GET /sse correctly, the server emits the standard endpoint event,
but agy ignores it and POSTs initialize directly to the base /sse URL — which only
accepts GET — resulting in 405 Method Not Allowed.

Proof it’s a client-side bug (server is innocent):
The exact same MCP server works perfectly with Gemini CLI (v0.46.0) and Antigravity IDE.
Gemini CLI correctly parses the endpoint event and routes POST to the provided URL.
A manual curl handshake (GET /sse → POST /messages/?session_id=…) also returns 202 Accepted.
So the server is fully MCP-compliant; only agy/V2 Desktop’s SSE transport routing is broken.

I’ve filed a detailed bug report with full logs and repro steps here:

Anyone else hitting the same 405 on remote MCP? Would appreciate a +1 on the issue
so it gets prioritized.

Env: Windows + WSL2 (Ubuntu 24.04), agy v1.0.8 / Antigravity V2 Desktop


参考(日本語)

Antigravity v2(agy CLI v1.0.8 および V2 Desktop)が、リモートSSE MCPサーバーに接続できません。

症状:
GET /sse は正常に開くものの、サーバーが返す endpoint イベントを agy が無視し、
initialize を ベースの /sse URL に直接 POST してしまう。/sse は GET 専用のため
405 Method Not Allowed になります。

クライアント側のバグである証拠(サーバーは無罪):
同じMCPサーバーが Gemini CLI(v0.46.0)や Antigravity IDE では正常に動作します。
これらは endpoint イベントを正しく解釈し、払い出されたURLへPOSTをルーティングしています。
curlで手動ハンドシェイク(GET /sse → POST /messages/?session_id=…)しても 202 Accepted が返ります。
よってサーバーはMCP準拠で、agy/V2 Desktop の SSE トランスポート実装だけが壊れています。

詳細なログと再現手順はこちらのIssueにまとめました:

同じ405でハマっている方がいれば、Issueに +1 いただけると優先度が上がって助かります。

環境: Windows + WSL2(Ubuntu 24.04)、agy v1.0.8 / Antigravity V2 Desktop

Hi @sand_bash, Welcome to the Forum!

We tried reproducing this issue using a local SSE MCP server, but on our end the client successfully processed the “endpoint” event and routed requests to “/messages” as expected (without triggering any “POST /sse” requests or “405 Method Not Allowed” errors).
Please update to the latest version of the Antigravity CLI and verify if the issue persists. If you are still encountering the issue after update, please provide the following details:

  • The version of the Antigravity CLI currently in use

  • The server implementation or framework utilized for the MCP server

  • Confirmation regarding whether the MCP server URL is successfully established and showing as “connected” within the Antigravity

  • Relevant client and server logs

  • Screenshots or a detailed sequence of steps to reproduce the issue

@Ambati_Rajendra
Thanks for your reply! I updated the Antigravity CLI to the latest version (1.0.10), but the issue still persists.

Here are the requested details to help your team reproduce it:

  • Antigravity CLI Version: 1.0.10

  • Server URL Config:

    "pinescript-docs": {
      "serverUrl": "[https://pinescript-mcp.fly.dev/sse](https://pinescript-mcp.fly.dev/sse)",
      "type": "sse"
    }
    
  • Connection Status: Not Connected (Fails immediately during initialization)

  • Server Implementation: A public remote MCP server hosted on Fly.io (emits standard MCP SSE endpoint event).

:magnifying_glass_tilted_left: Crucial Point for Reproduction

The reason it might have “worked” on your local test server is likely because your local server accepts both GET and POST requests on the same base URL path, masking the client’s routing bug.

However, on this production-grade remote server, the endpoints are strictly separated:

  1. GET /sse — Opens the long-lived event stream and advertises the POST endpoint (e.g., /messages/?session_id=...).

  2. POST /sse — NOT ALLOWED (Returns 405). Subsequent JSON-RPC calls must go to the advertised endpoint path.

Currently, agy (1.0.10) ignores the endpoint event data and blindly sends POST /sse, triggering the 405 error.

:bookmark_tabs: Consolidated Detailed Evidence & References

To avoid splitting the conversation, I have consolidated all the detailed logs, manual curl reproduction evidence, and the technical workaround analysis inside the official GitHub Issue and my blog post.

Please refer to the references below for the full context:

  • GitHub Issue:
    ttps://github.com/google-antigravity/antigravity-cli/issues/392

  • Detailed Verification Blog (Qiita / Japanese): ttps://qiita.com/sand_bash/items/bc37fc8e961551559695

(Please manually restore the “https://” for the links above due to forum restrictions for new accounts.)

Could you please test connecting specifically to the remote URL above (https://pinescript-mcp.fly.dev/sse) instead of a local one? You will see the 405 error immediately.