# Google Ads MCP Server (Read & Write) (`ankitsharma_29/google-ads-mcp`) Actor

MCP server exposing 60+ Google Ads tools: campaign creation, reporting, optimization, and deep analytics for agencies and technical advertisers. Bring your own Google Ads credentials

- **URL**: https://apify.com/ankitsharma\_29/google-ads-mcp.md
- **Developed by:** [Ankit Sharma](https://apify.com/ankitsharma_29) (community)
- **Categories:** Marketing, AI, Developer tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $80.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Google Ads MCP Server

A hosted MCP (Model Context Protocol) server that gives AI agents **full control** over your Google Ads account — create campaigns, edit ads, optimize bids, analyze performance, and auto-fix issues, all through natural language.

**68 tools** across 8 categories: Create, Read, Update, Extensions, Analysis, Optimization, Deep Analytics, and Auto-Actions.

---

### 🟢 How it works (hosted — no server needed)

This Actor runs the MCP server for you in **Standby mode**. Connect any MCP client to one URL — no Docker, no VPS, no setup.

**Endpoint (after you start the Actor):**

````

https://<your-run>.apify.actor/mcp

````

Add it to **Claude Desktop, Cursor, or Cline** as a **Streamable HTTP** MCP server, then just ask in plain English:

- *"List my campaigns."*
- *"Create a search campaign with a $20/day budget."*
- *"Which keywords are wasting spend?"*

---

### 🔑 What you provide — your own Google Ads credentials

This is a **bring-your-own-credentials** tool. Enter these in the Actor's **Input** (they stay private to your run):

| Field | Where to get it |
|-------|-----------------|
| **Client ID** | Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client |
| **Client Secret** | Same OAuth client as above |
| **Developer Token** | Google Ads → Tools → API Center (needs a **Manager / MCC** account) |
| **Refresh Token** | Generated once via OAuth (see below) |
| **Login Customer ID** *(optional)* | Your MCC customer ID, digits only, no dashes |

> ⚠️ You need a Google Ads **Manager (MCC) account** and an **approved developer token**. A plain Google Ads user without these cannot use this tool. It is built for **agencies and technical advertisers**.

#### Step-by-step credential setup

1. **Create a Google Cloud project** → enable the **Google Ads API**.
2. **OAuth consent screen** → **User type: External** → add your Google account as a Test user → then **PUBLISH the app ("In production")**.
   - 🔴 **Critical:** in *Testing* mode, your refresh token **expires after 7 days**. Setting the app to **In production** makes it permanent. You do **not** need Google to fully "verify" the app — just click through the unverified-app warning once.
3. **Create OAuth credentials** → *OAuth client ID* → **Web application** → redirect URI `http://localhost:8080/` → copy the **Client ID** + **Secret**.
4. **Get a developer token** in Google Ads → Tools → **API Center** (requires an MCC account; may take a day or two to approve).
5. **Generate a refresh token** — sign in with the Google account that has access to your ad account, approve, and copy the printed refresh token.
6. **Paste all values into the Actor Input** and start it.

---

### 💵 Pricing

Pay-per-usage: **$0.08 per tool call**, plus Apify platform usage for the running server. No monthly commitment — cancel anytime.

---

### 🧰 Tools (highlights)

#### CREATE
| Tool | Description |
|------|-------------|
| `create_campaign_budget` | Create a daily budget |
| `create_search_campaign` | Create a new search campaign linked to a budget |
| `create_ad_group` | Create an ad group inside a campaign with CPC bid |
| `add_keywords` | Add keywords with match types: EXACT, PHRASE, BROAD |
| `create_responsive_search_ad` | Create RSA with up to 15 headlines and 4 descriptions |

#### READ / DISCOVER
| Tool | Description |
|------|-------------|
| `list_accessible_customers` | List all Google Ads account IDs you can manage |
| `search_ads` | Execute any GAQL query for custom data retrieval |
| `get_campaign_performance` | Campaign metrics: impressions, clicks, cost, CTR, conversions |
| `get_ad_performance` | Ad-level metrics (includes policy status and disapprovals) |
| `get_search_terms` | See the actual search terms that triggered your ads |
| `generate_keyword_ideas` | Native Keyword Planner: search volumes, competitor keywords, CPCs |

#### UPDATE
| Tool | Description |
|------|-------------|
| `update_campaign_status` | Set campaign to ENABLED, PAUSED, or REMOVED |
| `update_campaign_budget_amount` | Change daily budget amount |
| `update_ad_group_bid` | Change Max CPC bid on an ad group |
| `update_responsive_search_ad` | Edit headlines/descriptions of an existing RSA |
| `update_keyword_bid` | Change CPC bid on a specific keyword |
| `remove_keyword` | Delete a keyword from an ad group |

#### EXTENSIONS
| Tool | Description |
|------|-------------|
| `add_negative_keywords` | Block irrelevant search terms at campaign level |
| `set_ad_schedule` | Only show ads during specific hours |
| `add_call_extension` | Add a phone number to ads for call leads |

#### ANALYSIS
| Tool | Description |
|------|-------------|
| `analyze_wasted_spend` | Find keywords burning money with zero conversions |
| `analyze_keyword_performance` | Categorize keywords: Top / Average / Underperformers |
| `analyze_search_terms` | Find negative keyword opportunities |
| `analyze_time_performance` | Find peak and dead hours for ad scheduling |
| `analyze_geo_performance` | See which locations convert vs. waste money |

#### OPTIMIZATION
| Tool | Description |
|------|-------------|
| `get_optimization_score` | Account health score (0–100) with an action plan |
| `analyze_budget_efficiency` | Evaluate ROI and recommend budget reallocation |
| `analyze_ad_copy_performance` | Compare ad variations and find winners/losers |
| `generate_account_report` | Full account health report in one call |
| `auto_create_campaign` | All-in-one: builds an entire campaign from scratch (PAUSED) |

#### DEEP ANALYTICS
| Tool | Description |
|------|-------------|
| `deep_campaign_analysis` | Z-tests, CPA trends, and statistical proof per campaign |
| `anomaly_detector` | Real-time disaster shield using rolling Z-scores |
| `quality_score_doctor` | Diagnoses root causes of high CPCs |
| `ad_fatigue_detector` | Linear regression to catch dying ads before CTR drops |
| `budget_efficiency_curve` | Finds the inflection point of diminishing returns |
| `keyword_profitability_matrix` | Scores keywords by profit potential |

#### AUTO-ACTIONS
| Tool | Description |
|------|-------------|
| `auto_pause_wasted_keywords` | Pause keywords exceeding a waste threshold |
| `auto_adjust_bids` | +15% on top performers, −30% on underperformers |
| `auto_add_negative_keywords` | Add negatives from wasted search terms |

---

### 💬 Example prompts

**Campaign management**
- "Create a new campaign named 'Product Launch' with a budget of $10/day."
- "Pause campaign 'Summer Sale' in account 1234567890."

**One-shot campaign builder**
- "Build a complete campaign for my plumbing business at mysite.com with a $25/day budget and a call extension at 555-1234."

**Discovery & Keyword Planner**
- "What keywords is www.competitor.com using?"
- "What is the search volume and CPC for 'emergency plumber'?"

**Optimization & analysis**
- "What's my account optimization score?"
- "Show me wasted spend in the last 30 days."
- "Which locations are wasting my money?"

**Deep analytics**
- "Run a deep campaign analysis."
- "Are any of my ads suffering from fatigue?"
- "Generate a keyword profitability matrix."

**Auto-actions**
- "Auto-pause all keywords that spent over $5 with zero conversions."
- "Auto-adjust bids based on performance."

# Actor input Schema

## `GOOGLE_ADS_CLIENT_ID` (type: `string`):

OAuth2 Client ID from your Google Cloud project.
## `GOOGLE_ADS_CLIENT_SECRET` (type: `string`):

OAuth2 Client Secret from your Google Cloud project.
## `GOOGLE_ADS_DEVELOPER_TOKEN` (type: `string`):

Developer token from your Google Ads Manager (MCC) account.
## `GOOGLE_ADS_REFRESH_TOKEN` (type: `string`):

Refresh token authorizing access to your Google Ads account. Generate once via the OAuth consent flow.
## `GOOGLE_ADS_LOGIN_CUSTOMER_ID` (type: `string`):

Your Manager account customer ID, digits only, no dashes. Optional.

## Actor input object example

```json
{}
````

# Actor output Schema

## `events` (type: `string`):

Every Google Ads MCP tool call: timestamp, tool, and status.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ankitsharma_29/google-ads-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ankitsharma_29/google-ads-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ankitsharma_29/google-ads-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ankitsharma_29/google-ads-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Ads MCP Server (Read & Write)",
        "description": "MCP server exposing 60+ Google Ads tools: campaign creation, reporting, optimization, and deep analytics for agencies and technical advertisers. Bring your own Google Ads credentials",
        "version": "0.1",
        "x-build-id": "zJmryiFiNW3tRejg2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ankitsharma_29~google-ads-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ankitsharma_29-google-ads-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ankitsharma_29~google-ads-mcp/runs": {
            "post": {
                "operationId": "runs-sync-ankitsharma_29-google-ads-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ankitsharma_29~google-ads-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-ankitsharma_29-google-ads-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "GOOGLE_ADS_CLIENT_ID": {
                        "title": "Google Ads OAuth Client ID",
                        "type": "string",
                        "description": "OAuth2 Client ID from your Google Cloud project."
                    },
                    "GOOGLE_ADS_CLIENT_SECRET": {
                        "title": "Google Ads OAuth Client Secret",
                        "type": "string",
                        "description": "OAuth2 Client Secret from your Google Cloud project."
                    },
                    "GOOGLE_ADS_DEVELOPER_TOKEN": {
                        "title": "Google Ads Developer Token",
                        "type": "string",
                        "description": "Developer token from your Google Ads Manager (MCC) account."
                    },
                    "GOOGLE_ADS_REFRESH_TOKEN": {
                        "title": "OAuth Refresh Token",
                        "type": "string",
                        "description": "Refresh token authorizing access to your Google Ads account. Generate once via the OAuth consent flow."
                    },
                    "GOOGLE_ADS_LOGIN_CUSTOMER_ID": {
                        "title": "Login Customer ID (MCC)",
                        "type": "string",
                        "description": "Your Manager account customer ID, digits only, no dashes. Optional."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
