# 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.

Tutorials · Published 2026-08-10, updated 2026-10-03.

> 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. Gemini CLI asks before each write while you leave its tool confirmations on (don't set trust: true).

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](https://adcopilot.cloud/mcp-clients) is the pillar.

## The config block

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

```text
{
  "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:

```text
/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](https://adcopilot.cloud/tutorials/troubleshooting-your-ads-connector).

Then three first prompts, in order:

```text
List the Google Ads accounts you can see.
```

```text
In account <account>, what did we spend in the last 7 days, by campaign,
with conversions and cost per conversion?
```

```text
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](https://adcopilot.cloud/tutorials/approval-workflows-for-ai-ads-changes):
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](https://adcopilot.cloud/tutorials/claude-code-google-ads-workflow) and
[Cursor](https://adcopilot.cloud/tutorials/cursor-google-ads-setup), so trying another client
costs nothing but the paste.

No connector yet?
[Start free](https://app.adcopilot.cloud/signup) — the URL above goes in
the `httpUrl` field, and you sign in with your own Google account the first
time it connects. Five days on the full Pro plan for your first workspace, no card to start (one is needed after 1,000 operations), then, without a card, it drops automatically to the Free plan (one account) rather than cutting you off.

## Questions

### Why does Gemini CLI show the server but no tools?

Nearly always the wrong field name: url instead of httpUrl. Gemini CLI treats url as an SSE endpoint and httpUrl as streamable HTTP; the connector speaks streamable HTTP, so the url variant fails to complete the handshake. Fix the field, restart Gemini CLI, and run /mcp again — the tool list should populate.

### Should I set trust: true to skip the confirmation prompts?

Not for a server with write tools. trust: true suppresses the per-call confirmation, which is the only thing standing between a misread instruction and an executed account change. If the prompts feel heavy, use the always-allow option on individual read tools as they come up, and keep confirmations on every tool that mutates the account.

### Can I make Gemini CLI read-only for my ads account?

Yes, at the client level: Gemini CLI's per-server includeTools setting lets you list only the tools you want exposed — list the read tools and the session simply has no write capability. It is a client-side filter rather than a server guarantee, but for day-one exploration or a teammate's config it is a clean way to run reads with zero risk.

---

This is the markdown copy of https://adcopilot.cloud/tutorials/gemini-cli-google-ads-setup. The index of the site's pages is https://adcopilot.cloud/llms.txt.
