Google Ads MCP: Run Google Ads by just talking to AI

2025-08-13

Google Ads MCP or 'I coded a way to create, manage, and analyze Google Ads campaigns by just talking to AI (and how you can too)'

Running Google Ads feels like cleaning the bathroom floor with a toothbrush. So I built a better way: managing Google Ads through natural conversation with an AI. Note: instructions written by Claude.

The Problem We're Solving

A typical campaign launch involves:

  • Navigating through dozens of screens
  • Setting up location targeting (and hoping you didn't miss anything)
  • Configuring keywords, match types, and bids
  • Creating ads with the right extensions
  • Adding negative keywords
  • Double-checking everything because one mistake can be expensive

Now multiply this by managing multiple accounts and campaigns, and you see the issue.

The Solution: Claude + MCP

MCP (Model Context Protocol) lets Claude actually interact with external services. I built an MCP server that connects Claude to the Google Ads API. Instead of clicking through interfaces, you just chat:

You: "Show me how my campaigns performed last month" Claude: Generates performance report with graphs

You: "Pause the underperforming display campaign and increase the search budget by 20%" Claude: Shows preview, then executes

You: "Create a new campaign for my SaaS product, $50/day, targeting tech hubs" Claude: Builds entire campaign structure in one go

Tutorial: Set It Up Yourself

Prerequisites

  • Google Ads account with Manager Account (MCC)
  • Node.js installed
  • Claude desktop app
  • About 15 minutes for initial setup

Step 1: Google Ads Configuration

Create a Manager Account:

  1. Go to ads.google.com/home/tools/manager-accounts/
  2. Click "Create a manager account"
  3. Fill in your business name and select how you'll use the account
  4. Create the MCC account (required for API access, even with just one ad account)

Get Your Developer Token:

  1. Log into your Manager Account at ads.google.com or just use this form
  2. In the left sidebar, click: Admin → API Center
  3. Click "Apply for access" and fill out:
    • Contact email: Your email
    • Developer token name: "MCP Integration" (or any name)
    • Use case: "Managing my own accounts"
    • OAuth2 client type: Desktop
  4. Submit and wait for approval (usually 1-3 business days)
  5. Once approved (you will get an email), copy your developer token from the API Center

Step 2: Google Cloud Setup

  1. Visit console.cloud.google.com
  2. Create a new project
  3. Enable the Google Ads API
  4. Create OAuth 2.0 credentials:
    • Type: Desktop application
    • Download the credentials JSON

Step 3: Install Prerequisites

Install Node.js:

  • Download from nodejs.org (use LTS version)
  • Run the installer - just click through with defaults

Install Bun (optional but faster - speeds up every command!):

  • In your terminal, paste this:
curl -fsSL https://bun.sh/install | bash

Step 4: Generate Refresh Token

Option A: Download ZIP (easier for non-devs)

  1. Download the ZIP from github.com/lkalajzic/google-ads-mcp
  2. Extract it to a folder you'll remember (e.g., Desktop)
  3. Open Terminal (Mac) or Command Prompt (Windows):
    • Mac: Press Cmd+Space, type "Terminal"
    • Windows: Press Win+R, type "cmd"
  4. Navigate to the folder - in your terminal, paste:
    cd ~/Desktop/google-ads-mcp  # Mac
    cd C:\Users\YourName\Desktop\google-ads-mcp  # Windows
    

Option B: Git Clone (for devs)

  • In your terminal, paste:
git clone https://github.com/lkalajzic/google-ads-mcp
cd google-ads-mcp

Then for both options:

  • In your terminal, paste:
# Install dependencies
bun install  # or: npm install

# Generate your refresh token
bun run generate-token  # or: npm run generate-token

Follow the browser prompts to authorize. Save the refresh token it generates.

Step 5: Configure Environment

Copy the example file - in your terminal, paste:

cp .env.example .env  # Mac/Linux
copy .env.example .env  # Windows

Edit .env with your credentials:

GOOGLE_ADS_DEVELOPER_TOKEN=your-token-here
GOOGLE_ADS_CLIENT_ID=from-oauth-json
GOOGLE_ADS_CLIENT_SECRET=from-oauth-json
GOOGLE_ADS_REFRESH_TOKEN=from-the-script
GOOGLE_ADS_MCC_ID=your-manager-account-id

Step 6: Build the Project

In your terminal, paste:

bun run build  # or: npm run build

This creates the build/index.js file Claude will use to run any command.

Step 7: Connect to Claude

Find your config file:

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

Or go to Claude -> Settings -> Developer -> Edit config

{
  "google-ads-mcp": {
    "command": "/Users/YOUR_USER_NAME_AND_PATH/.bun/bin/bun",
    "args": ["run", "/absolute-path-to-your-folder/google-ads-mcp/src/index.ts"]
  }
}

Note: Use "command": "node" instead of "bun" if you didn't install Bun.

Finding your absolute path:

  • In your terminal (while in the google-ads-mcp folder), paste: pwd (Mac/Linux) or cd (Windows)
  • Copy that path and add /build/index.js

Restart Claude and test with: "Claude, list my Google Ads accounts"

The Context System (Your Secret Weapon)

The real power comes from giving Claude context about your business. Create three (ideally) markdown files:

1. general-instructions.md

This file is in the codebase!

2. business-context.md

# Business Context

## What We Sell

SaaS product for project management

## Target Metrics

- CPA: <$50
- CTR: >2%

## What Works [note copy and angles that work, target avatar, etc]

- "project management software" - high converter
- Mobile traffic performs 40% better
- US tech hubs: SF, NYC, Austin, Seattle

3. changelog.md

# Change Log

[Claude will update this automatically with each change]

At the start of every chat you can say something like "initialize your memory from "FOLDER_PATH" and claude will read all three files if you have the filesystem MCP server enabled.

Safety Features

Because we're not cowboys (sad emoji times three):

  1. Dry Run Mode - Preview any change before it happens
  2. Default PAUSED - New campaigns never start automatically
  3. Budget Limits - Built-in caps to prevent accidents
  4. Change History - Our changelog tracks every change, but you can double-check in Google's Change history (go to your ad account → "Campaigns" (in left sidebar) → "Change History")

The end result

Before: ~30 minutes to launch a proper campaign After: 3-5 minutes with natural language

But it's not just about speed. If you provide enough context you can be ~100% sure you didn't miss any minutia with regards to campaign settings, negative keywords, etc.

Common Commands to Try

"Make a report of the campaign performance in the last 30 days"
"Analyze my search terms and suggest keywords to add and exclude"
"Pause all poor performing ad groups"
"Create a brand search protection campaign"
"Add competitor brand names as negative keywords"
"Analyze campaign performance in-depth - per device, location, time of day"

Troubleshooting

"Claude can't see my accounts"

  • Check your MCC ID is correct
  • Run test command: bun run test-connection or npm run test-connection
  • Ensure the refresh token has proper scopes

"Changes aren't appearing"

  • Check the change history in Google Ads UI

"Getting permission errors"

  • Your developer token needs to be approved (check email for approval)
  • Verify API access level: Manager Account → Admin (left sidebar) → API Center

What's Next?

The roadmap includes:

  • Anything is possible. Submit any feature requests via GitHub, email, or DM!

Get Started

Repository: github.com/lkalajzic/google-ads-mcp

Quick Test: After setup, try these commands:

  1. "List my accounts"
  2. "Show ad campaign performance in the last 7 days"
  3. "Create a test campaign in preview mode (dry_run)"

Repository: google-ads-mcp

Demo video: Watch on Twitter

Questions? Issues? Open a GitHub issue or reach out on Twitter: @lukakalajzic

Built by Luka Kalajžić

Remember: Always verify changes in Google Ads. This is beta software - use dry_run mode liberally.