AdCopilot

Tutorials

Gemini CLI + Google Ads: Setup and First Prompts

Connect Gemini CLI to Google Ads with one JSON block — httpUrl, not url — then verify with /mcp, run first prompts, and handle the quirks.

The short answer

Gemini CLI connects to Google Ads through one settings.json entry: {"mcpServers":{"adcopilot":{"httpUrl":"https://mcp.adcopilot.cloud/mcp"}}} — the field must be httpUrl, since url means SSE and will not connect to a streamable-HTTP connector. Restart Gemini CLI, sign in with Google on first connect, run /mcp to see the tools, and ask for last week's spend. Writes prompt for confirmation before executing.

Gemini CLI takes your Google Ads connector as one JSON block in settings.json — wire it up and your agent reads and runs the account from plain-language prompts, at the speed of a sentence. There's a single trap: the field is httpUrl, not url. Get that right and the rest is two minutes — restart, /mcp, first prompt. This page covers the Gemini-specific details; how the connector itself works across every MCP client is the pillar.

The config block

Edit ~/.gemini/settings.json (create it if missing) and add:

{
  "mcpServers": {
    "adcopilot": {
      "httpUrl": "https://mcp.adcopilot.cloud/mcp"
    }
  }
}

If the file already has content, merge the mcpServers object into it rather than pasting a second JSON document — a syntax error here makes Gemini CLI silently ignore the whole file.

Two placement rules:

  • httpUrl, not url. Gemini CLI uses url for SSE servers and httpUrl for streamable HTTP. The connector is streamable HTTP; the wrong field gives you a server entry that never lists tools.
  • Global file, not project file. A .gemini/settings.json inside a repo works too, but keep the server in your home directory. The URL holds no secret — access is your Google sign-in, not the URL — so this is about each teammate connecting as themselves, not about hiding a credential.

Restart Gemini CLI after editing; the config is read at startup.

The first time the connector is called, Gemini CLI opens Google's own sign-in in your browser. Approve the Google account that already has your Google Ads access, and pick which accounts the connector may reach. That consent is what authorises you — the URL itself is public and identical for everyone, so there is no per-user key or token anywhere in the config above. AdCopilot never sees your password, and you can withdraw the grant from your Google account's third-party access page at any time without touching this file.

Verify, then ask

Inside Gemini CLI, run:

/mcp

You should see adcopilot with its tool list — reads like the GAQL query and the account list, writes like campaign creation and adding negative keywords. If the server shows but tools do not, it is the httpUrl trap above; if nothing shows at all, work through the troubleshooting page.

Then three first prompts, in order:

List the Google Ads accounts you can see.
In account <account>, what did we spend in the last 7 days, by campaign,
with conversions and cost per conversion?
Which search terms cost money in the last 14 days without converting?
Top 20 by cost — just show me, don't change anything.

All three are reads: no confirmations, no risk, immediate answers. They are also a calibration test — you know this account, so check the numbers against the UI once, and you have established the accuracy that every later approval leans on.

How approvals look here

The first time the agent calls a write tool — say, adding negative keywords — Gemini CLI stops and asks for confirmation, naming the tool, with options to allow once or always allow. That pause is the approval loop, and the sane policy is the same one as in every other client: graduate read tools and harmless writes to always-allow as they prove boring, keep budgets and statuses on manual confirmation forever.

Resist the shortcut of "trust": true on the server entry. It switches off confirmations wholesale — reads and budget changes alike — which trades the entire safety mechanism for a saved keypress.

Two quirks worth using deliberately

  • includeTools makes a read-only session. Add an "includeTools" array to the server entry naming only the read tools — the names /mcp lists that query rather than create, update or set — and Gemini CLI exposes only those tools — an ads analyst config with no write path at all. Client-side filtering, not a server guarantee, but a tidy default for a first week or a reporting-only teammate.
  • Config edits need a restart. Gemini CLI reads settings.json at launch. If you edit the block mid-session and wonder why nothing changed — that is why.

Five minutes from here

Paste the block, restart, run /mcp, and ask the three first prompts — that is the whole setup, and the third prompt usually surfaces the first wasted spend worth killing. The same connector URL works unchanged in Claude Code and Cursor, so trying another client costs nothing but the paste.

No connector yet? Start free — the URL above goes in the httpUrl field, and you sign in with your own Google account the first time it connects. Seven days on the full Pro plan for a new workspace, no card, then it drops automatically to the Free plan (one account) rather than cutting you off.

Questions

Start free