Skip to main content
Glama
MCP Google Ads Server

MCP Google Ads Server

by rusik-denver

MCP Google Ads Server

License: MIT Python 3.11+ MCP

An MCP (Model Context Protocol) server that lets AI models query Google Ads data, manage keywords, adjust budgets, and audit accounts — directly from Claude, GPT, or any MCP-compatible client.

Ships with a demo mode that returns realistic mock data, so you can explore the full API without any Google Ads credentials.

Architecture

graph LR
    A[AI Client<br>Claude / GPT] -->|MCP Protocol| B[MCP Server]
    B --> C{Mode?}
    C -->|Demo| D[Mock Data<br>Realistic fixtures]
    C -->|Live| E[Google Ads API<br>GAQL queries]
    B --> F[Resources<br>accounts, doctrines, health]
    B --> G[Tools<br>8 operations]

Related MCP server: Google Ads MCP Server

Tools

Tool

Description

get_campaign_metrics

Campaign performance: impressions, clicks, cost, conversions, CPA, ROAS

get_search_terms

Search term report with wasted spend detection

get_keyword_metrics

Keyword-level data with quality scores and bid info

get_geo_performance

Geographic breakdown by city/region

add_negative_keyword

Add negatives to campaigns or shared lists

set_campaign_budget

Adjust daily budgets

adjust_keyword_bid

Change CPC bids on individual keywords

run_account_audit

Comprehensive audit: wasted spend, low QS, high CPA, doctrine compliance

Resources

URI

Description

ads://accounts

List of managed accounts with IDs and labels

ads://doctrines

Operational rules engine (10 doctrines)

ads://accounts/{id}/health

Health score, alerts, and recommendations

ads://status

Server mode and connection info

Quick Start

1. Install

pip install -e .

2. Run in Demo Mode

mcp-google-ads

No configuration needed — demo mode is the default. The server returns realistic mock data modeled on home-service advertising (TV mounting, handyman services).

3. Connect to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "google-ads": {
      "command": "mcp-google-ads"
    }
  }
}

4. Connect to Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "google-ads": {
      "type": "stdio",
      "command": "mcp-google-ads"
    }
  }
}

Live Mode

Note: Live mode requires a Google Ads API developer token and OAuth2 credentials. Out of the box the server runs in demo mode — no credentials needed.

To query real Google Ads data, set credentials in .env:

cp .env.example .env
# Fill in your Google Ads API credentials

Then start with demo mode disabled:

MCP_DEMO_MODE=0 mcp-google-ads

Required credentials:

  • GOOGLE_ADS_DEVELOPER_TOKEN — from your Google Ads API Center

  • GOOGLE_ADS_CLIENT_ID / CLIENT_SECRET — OAuth2 app credentials

  • GOOGLE_ADS_REFRESH_TOKEN — generated via OAuth2 flow

  • GOOGLE_ADS_LOGIN_CUSTOMER_ID — your MCC account ID

  • GOOGLE_ADS_CUSTOMER_IDS — comma-separated managed account IDs

Example Session

You: What are my top campaigns by ROAS?

Claude: I'll check your campaign metrics.

> get_campaign_metrics(date_range="LAST_30_DAYS")

Here are your campaigns ranked by ROAS:

1. Brand - Exact Match — 11.5x ROAS, $1,247 spend, 48 conversions
2. Emergency - Phrase Match — 5.4x ROAS, $892 spend, 12 conversions
3. Local - City Targeting — 3.1x ROAS, $2,100 spend, 22 conversions
4. Services - Broad Modified — 2.7x ROAS, $3,456 spend, 31 conversions
5. Competitor Conquest — 0.3x ROAS, $1,890 spend, 2 conversions ⚠️

The Competitor Conquest campaign is bleeding money at $945/conversion.
I'd recommend pausing it or adding tighter negative keywords.

Tests

pip install -e ".[dev]"
pytest -v

23 tests cover all 8 tools and 4 resources in demo mode, plus data integrity checks.

Project Structure

src/mcp_google_ads/
├── __init__.py         # Package metadata
├── server.py           # MCP server — tools, resources, entry point
└── demo_data.py        # Realistic mock data fixtures
tests/
└── test_demo_mode.py   # 23 tests — tools, resources, data integrity

Author

Ruslan Danelian — ruslandanelian.com/premium/

I build MCP servers, Google Ads API automation, and AI agent systems for production use. This project is a sanitized example of the tooling I operate daily across 8 live ad accounts.

License

MIT — see LICENSE.

Available Tools

8 tools
add_negative_keywordB

Add a negative keyword to a campaign or account-level negative list.

Args: keyword: The search term to negate. match_type: EXACT, PHRASE, or BROAD. campaign_name: Target campaign. None = shared negative list. account_id: Google Ads customer ID. Defaults to first account.

Inputs: keyword (required), account_id, match_type, campaign_name. Returns: result

adjust_keyword_bidB

Change the CPC bid for a specific keyword.

Args: keyword_id: Keyword resource ID (e.g. "K001"). new_bid_dollars: New max CPC bid in dollars. account_id: Google Ads customer ID. Defaults to first account.

Inputs: keyword_id (required), new_bid_dollars (required), account_id. Returns: result

get_campaign_metricsB

Pull campaign performance metrics via GAQL.

Args: account_id: Google Ads customer ID (e.g. "123-456-7890"). Defaults to first account. date_range: LAST_7_DAYS, LAST_30_DAYS, LAST_90_DAYS, or THIS_MONTH. status_filter: ALL, ENABLED, or PAUSED.

Inputs: account_id, date_range, status_filter. Returns: result

get_geo_performanceC

Geographic performance breakdown.

Args: account_id: Google Ads customer ID. Defaults to first account. min_clicks: Minimum clicks to include a location.

Inputs: account_id, min_clicks. Returns: result

get_keyword_metricsB

Keyword-level metrics with quality scores and bid info.

Args: account_id: Google Ads customer ID. Defaults to first account. campaign_name: Filter to a specific campaign. min_quality_score: Only return keywords at or above this QS.

Inputs: account_id, campaign_name, min_quality_score. Returns: result

get_search_termsB

Retrieve search term report with quality signals.

Args: account_id: Google Ads customer ID. Defaults to first account. campaign_name: Filter to a specific campaign. None = all campaigns. min_clicks: Minimum click threshold for inclusion. limit: Maximum rows to return.

Inputs: limit, account_id, min_clicks, campaign_name. Returns: result

run_account_auditA

Run a comprehensive account audit across all dimensions.

Checks: wasted spend, keyword health, geo performance, ad copy coverage, bid strategy alignment, and doctrine compliance.

Args: account_id: Google Ads customer ID. Defaults to first account.

Inputs: account_id. Returns: result

set_campaign_budgetB

Adjust the daily budget for a campaign.

Args: campaign_name: Name of the campaign to modify. daily_budget_dollars: New daily budget in dollars (e.g. 50.00). account_id: Google Ads customer ID. Defaults to first account.

Inputs: campaign_name (required), daily_budget_dollars (required), account_id. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation4/5

    Each tool targets a distinct resource or dimension: campaign-level metrics, keyword-level metrics, search terms, and geo performance are clearly separated by resource granularity. The only mild overlap is run_account_audit, which is a superset of the individual reads, but its 'comprehensive audit' framing distinguishes it from the targeted get_* tools.

    Naming Consistency5/5

    All eight tools follow a consistent snake_case verb_noun pattern (get_campaign_metrics, add_negative_keyword, set_campaign_budget, etc.). Verb choices (run/get/add/set/adjust) map sensibly to action types without breaking the pattern.

    Tool Count5/5

    Eight tools is well-scoped for a Google Ads audit-and-optimize server, covering reads plus targeted writes without redundancy. Each tool earns its place with a distinct analytical or mutation role.

    Completeness4/5

    The core loop of audit → inspect metrics/search terms/geo → negate keywords, adjust budgets and bids is fully covered. Gaps exist for ad copy edits and campaign/ad group creation or pause/enable, which the audit references but cannot act on, though agents can work around these for the stated optimization purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for Google Ads. Audit spend, find wasted budget, create campaigns, monitor performance, and optimize ads directly from ChatGPT, Claude, or any MCP-compatible client.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude, ChatGPT, Copilot, and Cursor to read Google Ads data—campaigns, ad groups, ads, keywords, search terms, budgets, conversion actions, change history, and custom GAQL queries—through 17 read-only MCP tools. It supports OAuth-authenticated access to real accounts without requiring a developer token, keeping all operations read-only and auditable.
      58 npm
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to query and manage Google Ads accounts, covering reporting metrics like ROAS, CTR and CPC, custom GAQL queries, keyword research, and campaign management such as creating campaigns, ad groups, ads and targeting. It connects Claude, ChatGPT, Cursor and other MCP clients to Google Ads data through a hosted remote server with OAuth.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage Google Ads accounts through the Google Ads API v23 with 92 tools for account audits, campaign creation, budget pacing, competitive insights, Enhanced Conversions, and cloud deployment. It supports autonomous operations such as PMax/Search setup, policy diagnostics, and offline conversion uploads.
      MIT