Skip to main content
Glama
Google Ads MCP Server

Google Ads MCP Server

by ThainaJardim

Google Ads MCP Server

An MCP (Model Context Protocol) server that connects AI assistants to the Google Ads API. Query campaigns, explore account structures, and discover resource fields — all through natural language via any MCP-compatible client.

Tools

Tool

Description

list_customers

List accessible customer accounts under your MCC

run_gaql_query

Execute any GAQL query

list_resource_fields

Discover available fields for a resource type (campaign, ad_group, etc.)

Related MCP server: Google Ads MCP

Prerequisites

  • Python 3.10+

  • uv (recommended) or pip

  • Google Ads API credentials (OAuth2)

Getting Google Ads credentials

  1. Follow the Google Ads API setup guide to create OAuth2 credentials

  2. Generate a refresh token using the OAuth2 flow

  3. Get your developer token

  4. Create a google-ads.yaml file (see google-ads.example.yaml):

developer_token: "YOUR_DEVELOPER_TOKEN"
client_id: "YOUR_CLIENT_ID.apps.googleusercontent.com"
client_secret: "YOUR_CLIENT_SECRET"
refresh_token: "YOUR_REFRESH_TOKEN"
login_customer_id: "YOUR_MCC_CUSTOMER_ID"
use_proto_plus: true

login_customer_id is required if you access accounts through an MCC (Manager account). Use digits only, no dashes.

Quick start

  1. Install uv (if you don't have it):

    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Create your google-ads.yaml with your credentials (see Getting Google Ads credentials)

  3. Add the MCP server config to your client (see below) — no git clone or pip install needed

Setup

Just point your MCP client directly to the GitHub URL. uvx handles the rest.

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "GoogleAds": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/ThainaJardim/google-ads-mcp.git",
        "google-ads-mcp"
      ],
      "env": {
        "GOOGLE_ADS_CREDENTIALS": "/path/to/google-ads.yaml"
      }
    }
  }
}

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "GoogleAds": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/ThainaJardim/google-ads-mcp.git",
        "google-ads-mcp"
      ],
      "env": {
        "GOOGLE_ADS_CREDENTIALS": "/path/to/google-ads.yaml"
      }
    }
  }
}

Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "GoogleAds": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/ThainaJardim/google-ads-mcp.git",
        "google-ads-mcp"
      ],
      "env": {
        "GOOGLE_ADS_CREDENTIALS": "/path/to/google-ads.yaml"
      }
    }
  }
}

Local (from cloned repo)

If you prefer to clone and run locally:

{
  "mcpServers": {
    "GoogleAds": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/google-ads-mcp",
        "google-ads-mcp"
      ],
      "env": {
        "GOOGLE_ADS_CREDENTIALS": "/path/to/google-ads.yaml"
      }
    }
  }
}

Usage examples

Once connected, you can ask your AI assistant things like:

  • "List all my Google Ads accounts"

  • "What campaigns are running on account 1234567890?"

  • "Show me the spend and conversions for the last 7 days"

  • "What fields are available on the campaign resource?"

Example GAQL queries

Campaign performance:

SELECT campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
ORDER BY metrics.impressions DESC

Ad group details:

SELECT ad_group.name, ad_group.status, campaign.name
FROM ad_group
WHERE campaign.status = ENABLED

Development

git clone https://github.com/YOUR_USERNAME/google-ads-mcp.git
cd google-ads-mcp
uv sync
GOOGLE_ADS_CREDENTIALS=/path/to/google-ads.yaml uv run google-ads-mcp

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents and LLMs to interact with Google Ads accounts, allowing search, retrieval of resource metadata, and listing accessible customers via the Google Ads API.
      Apache 2.0
    • A
      license
      A
      quality
      F
      maintenance
      Enables managing Google Ads campaigns through an AI assistant with read-only reporting, recommendations, and gated write operations for bids, budgets, and statuses, all backed by preview and audit logging.
      31
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables managing and analyzing ad accounts in plain language from AI assistants, including cross-account performance reports, keyword research, GAQL queries, and safe previewed changes.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLMs and AI agents to query the Google Ads API, inspect account data and resource metadata, and access reporting-related discovery resources through configurable MCP tools.
      Apache 2.0