The short answer
Run gemini mcp add --transport http duckdive https://api.duckdive.ai/mcp, then type /mcp auth duckdive in Gemini CLI and continue with Google. After that Gemini CLI can read GA4, Search Console, Google Ads, Local Services Ads, Yext and Local Falcon data for the websites your DuckDive account can see.
- Two steps: the add command, then
/mcp auth duckdiveinside Gemini CLI. - The transport is HTTP and the server name is
duckdive. - No API key; sign-in is OAuth with Google.
Set up DuckDive in Gemini CLI
You do not need a DuckDive account first. Connecting opens a DuckDive page, and Continue with Google creates your account. DuckDive is free for 2 sites.
-
Add the server
Run this command in your terminal.
gemini mcp add --transport http duckdive https://api.duckdive.ai/mcp
-
Authorize it
Start Gemini CLI and type
/mcp auth duckdive. A DuckDive page opens in your browser. -
Continue with Google
New users get a DuckDive account from that one click. Returning users review the request and allow it.
-
Ask a first question
In Gemini CLI, ask which DuckDive websites it can see. If it lists your sites, you are connected.
Already have DuckDive and want your agent to do the rest? Paste the setup prompt into it and it adds your site and links your Google data. The walkthrough of agent self-setup shows each step.
Paste into your agentSet up DuckDive for my website. Follow https://analytics.duckdive.ai/agents.md
Ask your agent: four first questions
Each prompt below names the DuckDive tools Gemini CLI should call, so you can check it is reading your data and not guessing. Data tools use fixed windows of 7, 14, 30 and 90 days, 6 months and 12 months.
Ask your agentWhich websites can you see in DuckDive? For each one, tell me whether Google Analytics 4 and Search Console have finished importing.
Tools it calls list_websites get_sync_status
Ask your agentHow did organic traffic to my site change over the last 30 days compared with the 30 days before? Break it down by channel.
Tools it calls list_websites get_ga4_channels
Ask your agentWhat are my top Google search queries over the last 90 days, and which pages earn the most clicks?
Tools it calls get_search_console_keywords get_search_console_pages
Ask your agentShow my top 20 Search Console queries for the last 90 days and write them to queries.csv.
Tools it calls get_search_console_keywords
Permissions: read-only or allow actions
DuckDive shows a permission page when you connect. The choice is yours.
- Read-only. Leave actions off. The agent can list your websites, check import status and read GA4, Search Console, Google Ads, Local Services Ads, Yext and Local Falcon summaries. Anyone who is not an admin gets this by default.
- Allow actions. Admin accounts can also let the agent add a website, connect its sources, queue a data refresh (at most once per website every 15 minutes) and create a scheduled report. Reports are always emailed to your own account address.
- What it can never do. Delete data, connect or disconnect your Google account, or send email to anyone but you.
The agent sees only the websites your DuckDive account can already see, with your role's permissions. Sign-in uses OAuth, so Gemini CLI receives a DuckDive access token and never your password. Disconnect any time in DuckDive under AI Connectors.
Troubleshooting
- The tools do not appear: run
/mcp auth duckdiveagain and finish the Google sign-in. - Sign-in loops or fails: sign in to DuckDive in the same browser first, then authorize again.
- No websites found: ask Gemini CLI to help you set up DuckDive, or add a website after signing in to DuckDive.
- "Not allowed" for an action: actions need an admin account. If you unticked them when connecting, disconnect in AI Connectors and authorize again.
Still stuck? See the connector docs for every app's steps.
What to expect: limits
- History. DuckDive holds the last 12 months of data at most.
- Fixed ranges. 7, 14, 30 and 90 days, 6 months and 12 months. No custom dates.
- Imported data. Answers come from data DuckDive has imported. Ask for the data sync status if numbers look old or empty.
- Row limits. Landing page results top out at 100 pages ranked by sessions, so a missing page had fewer sessions than the last one listed.
- Read, not edit. DuckDive does not change GA4 settings, add tracking or edit your ads.
Questions about Gemini CLI and DuckDive
What is the exact command?
gemini mcp add --transport http duckdive https://api.duckdive.ai/mcp, followed by /mcp auth duckdive inside Gemini CLI.
Do I need a DuckDive account first?
No. When you authorize, a DuckDive page opens. Select Continue with Google and your account is created for you.
Can Gemini CLI change anything in my accounts?
Reading is always available. Actions need an admin account and your approval at connect time. It cannot delete data or email anyone but you.
What does it cost?
DuckDive is free for 2 sites.
How do I disconnect it?
Disconnect it in DuckDive under AI Connectors, or remove the server from Gemini CLI. Access stops immediately.
Query your analytics from the terminal
Sign in with Google once, then run one command in Gemini CLI.
Free for 2 sites · No credit card
Last reviewed . Gemini CLI and Google are named to describe compatibility only; this page is not endorsed by Google.
