Skip to main content
Glama
Google Ads MCP

Google Ads MCP

README.md
# Google Ads MCP — full management

An [MCP](https://modelcontextprotocol.io) server for Google Ads that gives an AI
agent (Claude Code, Claude Desktop, etc.) **complete** access to the Google Ads
API — reporting **and** full campaign management — while keeping a mandatory
confirm-before-write safety step on every change.

It runs the official [`googleads/google-ads-mcp`](https://github.com/googleads/google-ads-mcp)
server (GAQL reporting, assets, labels, API reference resources) and adds a
`manage` namespace that exposes the rest of the API:

| Tool | What it does |
| :--- | :--- |
| `manage_mutate` | Create / update / remove **any** mutable resource via `GoogleAdsService.Mutate` — campaigns, budgets, bidding strategies, ad groups, ads, keywords, negative lists, targeting (location/language/schedule/device), assets & Performance Max, conversion actions, account settings… (~65 operation types, atomic, with temporary IDs for multi-entity builds). |
| `manage_call_service` | Call **any method of any service** (112 services): keyword ideas, recommendations, offline conversion & Customer Match uploads, experiments, user access, MCC links, billing, reach planning, creating accounts, and more. |
| `manage_describe` | Inspect the schema of any request/resource type and list services/methods, so calls are built correctly. |
| `search_search`, `metadata_*`, `customers_*`, `assets_*`, `labels_*` | The official server's tools. |

### Safety: Propose & Confirm

Every write is two steps. A `validate_only=True` call runs a **server-side dry
run** on Google and returns a human-readable list of changes plus a `checksum`.
Nothing is committed until the identical call is repeated with
`validate_only=False` and that checksum. The server **cannot** apply a change
without a prior dry run. The MCP never grants more than the signed-in Google
account already has in Google Ads.

---

## Setup (local, per user)

Each person signs in with **their own** Google account and only ever sees the
Google Ads accounts they already have access to.

### 1. Prerequisites
- [`uv`](https://docs.astral.sh/uv/getting-started/installation/)
- [`gcloud` CLI](https://cloud.google.com/sdk/docs/install)
- A **GCP project with the Google Ads API enabled**
  ([enable it](https://console.cloud.google.com/apis/library/googleads.googleapis.com)).
- An **OAuth client** (Desktop type) JSON file from that project
  (APIs & Services → Credentials → Create credentials → OAuth client ID).

### 2. Get the code
```bash
git clone https://github.com/anshuman-wisemonk/google-ads-mcp.git
cd google-ads-mcp
```

### 3. Sign in (creates credentials inside the repo, not your global gcloud)

PowerShell (Windows):
```powershell
$env:CLOUDSDK_CONFIG = "$PWD\.gcloud"
gcloud auth application-default login `
  "--scopes=https://www.googleapis.com/auth/adwords,https://www.googleapis.com/auth/cloud-platform" `
  "--client-id-file=C:\path\to\oauth_client.json"
```

macOS / Linux:
```bash
CLOUDSDK_CONFIG="$PWD/.gcloud" gcloud auth application-default login \
  --scopes=https://www.googleapis.com/auth/adwords,https://www.googleapis.com/auth/cloud-platform \
  --client-id-file=/path/to/oauth_client.json
```
Pick the Google account that can see your Google Ads accounts and approve.

### 4. Configure your MCP client

**Claude Code** — copy `.mcp.json.example` to `.mcp.json` in the project root
and fill in the absolute paths and your `GOOGLE_CLOUD_PROJECT`. It's picked up
automatically.

**Claude Desktop** — edit `claude_desktop_config.json`
(Windows: `%APPDATA%\Claude\claude_desktop_config.json`,
macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`) and add
the block below. Use **absolute paths** — Claude Desktop does not inherit your
shell's `PATH`, so point `command` at the full path to `uv` (find it with
`which uv` / `where.exe uv`). Fully quit and reopen Claude Desktop afterward.

```json
{
  "mcpServers": {
    "google-ads-mcp": {
      "command": "/absolute/path/to/uv",
      "args": [
        "run",
        "--frozen",
        "--directory",
        "/absolute/path/to/google-ads-mcp",
        "server.py"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/google-ads-mcp/.gcloud/application_default_credentials.json",
        "GOOGLE_CLOUD_PROJECT": "YOUR_GCP_PROJECT_ID"
      }
    }
  }
}
```

On Windows, write paths with escaped backslashes, e.g.
`"C:\\Users\\you\\.local\\bin\\uv.exe"`. If the config already has an
`mcpServers` section, add just the `"google-ads-mcp"` entry inside it.

### 5. Verify
Ask your agent: **"What customers do I have access to?"** — you should get your
Google Ads account IDs. If you use a Manager (MCC) account, add
`"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "1234567890"` to the `env` block, or name the
manager ID in your prompt.

---

## Remote / team deployment

For a shared hosted deployment (one URL, each teammate signs in with their own
Google account via OAuth), the upstream project documents a Cloud Run setup
using FastMCP's OAuth proxy — see the
[official README](https://github.com/googleads/google-ads-mcp#google-cloud-run-deployment).
`server.py` here is a drop-in replacement for the server entrypoint in that
setup and keeps the `manage` tools.

## Security notes
- `.gcloud/` holds OAuth refresh tokens — it is gitignored. Never commit or share it.
- `.mcp.json` is gitignored (machine-specific paths); commit only `.mcp.json.example`.
- Connecting an agent exposes your accessible Google Ads data to that client.

## License & credit
Apache-2.0. Built on and depends on
[`googleads/google-ads-mcp`](https://github.com/googleads/google-ads-mcp)
(Apache-2.0). This repository is not an official Google product.