Tried to setup MCP server on antigravity and gemini cli both failed:
antigravity : error bad request. connection closed
gemini cli :
MCP tool ‘list_projects’ reported tool error for function call: {“name”:“list_projects”,“args”:{}} │
│ with response: [{“functionResponse”:{“name”:“list_projects”,“response”:{“error”:{“message”:"Streamable │
│ HTTP error: Error POSTing to endpoint: │
│ {“id”:2,“jsonrpc”:“2.0”,“result”:{“content”:[{“text”:"API keys are not supported by this │
│ API. Expected OAuth2 access token or other authentication credentials that assert a principal. See │
│ https://cloud.google.com/docs/authentication\“,\“type\”:\“text\”}],\“isError\”:true}}”,“isError”:true} │
│ }}}]
I’m facing the same problem. I’m using Cursor.
Facing the same problem, can’t use with antigravity.
I have just encountered this issue
Same issue, solution is using proxy with AUTH.
Please read: Stitch via MCP | Stitch
Fix for Antigravity + Stitch MCP (Windows)
If you follow the official Stitch MCP docs and Antigravity fails with errors like:
-
Bad Request -
client is closing -
invalid character 'd' looking for beginning of value
This is the correct working setup:
1) Install Google Cloud CLI
Install from Google Cloud SDK installer.
Then login:
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID
gcloud auth application-default set-quota-project YOUR_PROJECT_ID
Enable Stitch API:
gcloud services enable stitch.googleapis.com --project=YOUR_PROJECT_ID
2) Configure Antigravity MCP (STDIO proxy)
Do NOT use serverUrl: https://stitch.googleapis.com/mcp (API key / bearer token method is unstable).
Use local proxy instead:
"stitch": {
"command": "npx.cmd",
"args": ["-y", "@_davideast/stitch-mcp@latest", "proxy"],
"env": {
"STITCH_USE_SYSTEM_GCLOUD": "1",
"GOOGLE_CLOUD_PROJECT": "YOUR_PROJECT_ID",
"CI": "1",
"DOTENV_CONFIG_QUIET": "true",
"DOTENV_QUIET": "true",
"NO_COLOR": "1"
}
}
Restart Antigravity.
3) If you get invalid character 'd'
That means dotenv is printing logs like:
[dotenv@...] injecting env...
Fix: remove/rename .env file or keep DOTENV_QUIET=true in env.
Great !!! It works !!!