Connect guide · Gemini CLI
Connect Google Search Console and GA4 to Gemini CLI
Direct answer
Gemini CLI connects to Search Console and GA4 with gemini mcp add --transport http rankgaroo https://mcp.rankgaroo.com/mcp, followed by /mcp auth rankgaroo inside the CLI. It then signs you in through your browser. Note that Google replaced Gemini CLI with Antigravity CLI on June 18, 2026 for unpaid-tier and Google One users, so check which one you have. All five Rankgaroo tools are read-only.
Steps from Gemini CLI's docs, checked . Rankgaroo is in private beta: join the list to get access.
https://mcp.rankgaroo.com/mcpSteps
Gemini CLI: run gemini mcp add --transport http rankgaroo https://mcp.rankgaroo.com/mcp. Scope is project by default. Use -s to change it.
Or add this to settings.json:
{ "mcpServers": { "rankgaroo": { "httpUrl": "https://mcp.rankgaroo.com/mcp" } } }Inside the CLI, run /mcp auth to list servers that need sign-in, then run /mcp auth rankgaroo. Finish in the browser.
Run /mcp list to check the connection. It shows connection errors that are otherwise hidden.
Antigravity CLI: edit ~/.gemini/config/mcp_config.json (global) or <workspace>/.agents/mcp_config.json and add: {"mcpServers":{"rankgaroo":{"serverUrl":"https://mcp.rankgaroo.com/mcp"}}}. Type /mcp in the prompt panel to open the MCP Manager Overlay.
Antigravity IDE: open Agent settings (Cmd or Ctrl + comma), go to the Customizations tab, click Authenticate next to rankgaroo, sign in, copy the authorization code, paste it in the panel and click Submit.
Signing in with Google
In Gemini CLI, /mcp auth rankgaroo opens your browser on the Rankgaroo consent page, which names the app. Click Continue to Google, then review Google's read-only Search Console and Analytics request. You can untick either. In the Antigravity IDE you copy an authorization code from the browser and paste it back into the panel.
What you need
- Gemini CLI is still served for Gemini Code Assist Standard or Enterprise licenses, and for paid Gemini API keys or Gemini Enterprise Agent Platform keys.
- Unpaid-tier and Google One users moved to Antigravity CLI on June 18, 2026. Use the Antigravity steps below if that is you.
- A browser on the same machine. Sign-in fails over headless or SSH sessions.
Good to know
- The Gemini CLI callback is http://localhost:<random-port>/oauth/callback. You can fix the port with redirectUri.
- Avoid underscores in the server name. Use rankgaroo, not a name with underscores.
- Gemini CLI needs a local browser for sign-in, so it fails over headless or SSH sessions.
- Antigravity accepts serverUrl or url in its config, but not httpUrl, and it does not accept SSE. Its docs name no add command.
- How sign-in starts in the Antigravity CLI, as opposed to the IDE, is not documented.
- Gemini CLI's docs do not mention Client ID Metadata Documents. It uses Dynamic Client Registration, which Rankgaroo supports.
First questions to try
List my Search Console properties and GA4 properties.
Which pages lost the most clicks in Search Console over the last 28 days?
Which channels drove the most GA4 sessions last month, and how did organic search compare?
Questions
Is Gemini CLI replaced by Antigravity CLI?
Gemini CLI was replaced by Antigravity CLI on June 18, 2026 for unpaid-tier and Google One users. It is still served for Gemini Code Assist Standard and Enterprise licenses, and for paid API keys. Pick the steps on this page that match your client.
Is the Rankgaroo connection in Gemini CLI read-only?
Yes, the Rankgaroo connection in Gemini CLI is read-only. Google's screen asks only for read-only Search Console and Analytics access, and you can untick either one. The five tools are whoami, gsc_list_properties, gsc_search_analytics, ga4_list_properties and ga4_run_report. None of them can change your data.
Why doesn't Gemini CLI show the Rankgaroo tools?
Gemini CLI shows the Rankgaroo tools only after sign-in succeeds. Run /mcp list to see hidden connection errors, then /mcp auth rankgaroo. Sign-in needs a local browser, so it fails over SSH, and underscores in the server name can also cause trouble.
Does Gemini CLI support remote MCP servers with OAuth?
Gemini CLI supports remote MCP servers over streamable HTTP with OAuth. It detects a 401, finds the OAuth settings from the server's metadata, and registers a client dynamically when the server supports it.
How do I get access to Rankgaroo while it is in beta?
Rankgaroo is in a private beta, so access is by invite from the beta list. Join the list on the Rankgaroo site and we will send an invite when a spot opens.
Sources: Gemini CLI: MCP servers, Gemini CLI docs home, Google Developers Blog: Gemini CLI to Antigravity CLI, Antigravity: MCP