Skip to main content

MCP server for Google Ads API

Project description

Google Ads MCP Server

A Model Context Protocol (MCP) server for Google Ads, built on the official Python SDK (v23+) with FastMCP.

Overview

32 focused tools for LLM interaction with Google Ads accounts. Uses GAQL (Google Ads Query Language) as the universal read mechanism, dedicated tools for write operations, and 7 workflow analysis tools for campaign intelligence.

Architecture

Server Tools Purpose
Read 8 GAQL execution, account discovery, keyword ideas, geo targets, field metadata, recommendations
Write 16 Campaign/budget/ad group/ad/keyword CRUD, targeting, recommendations
Workflow 7 Campaign audit, underspend diagnosis, budget reallocation, creative analysis, fatigue detection, audience analysis, test monitoring
Utility 1 Connection status check

Tools

Read Tools (8)

Tool Description
execute_query Run any GAQL query with pagination
execute_query_stream Stream large GAQL result sets
list_accessible_customers Discover accounts (no customer ID needed)
generate_keyword_ideas Search volume, competition, bid estimates
suggest_geo_targets Location name to geo target ID resolution
get_field_metadata Field schema for building GAQL queries
validate_query_fields Check field compatibility before querying
get_recommendations Google's optimization suggestions

Write Tools (16)

Tool Description
create_campaign / update_campaign Campaign CRUD
create_campaign_budget / update_campaign_budget Budget management
create_ad_group / update_ad_group Ad group CRUD
create_ad / update_ad_status Ad creation and status changes
add_keywords / remove_keyword Keyword management
add_negative_keywords Campaign-level negative keywords
add_location_targeting / add_language_targeting Geo and language targeting
remove_campaign_criterion Remove targeting criteria
apply_recommendation / dismiss_recommendation Act on Google's suggestions

Workflow Tools (7)

Tool Description
audit_campaign_structure Campaign scoring (0-110) across 6 dimensions
diagnose_underspend 5-layer underspend diagnostic
analyze_budget_reallocation Efficiency scoring + constraint checks
analyze_creatives Creative scoring (efficiency, quality, engagement)
detect_creative_fatigue Week-over-week trigger comparison
analyze_audiences Audience efficiency scoring and classification
monitor_incrementality_test Test integrity monitoring with alert tiers

Installation

# Install dependencies
uv sync

# Set up credentials (see .env.example)
cp .env.example .env
# Edit .env with your Google Ads API credentials

Usage

# Run the server
uv run main.py

# Or use the convenience script
./run.sh

MCP Client Configuration

{
  "mcpServers": {
    "google-ads": {
      "command": "uv",
      "args": ["run", "main.py"],
      "cwd": "/path/to/servers/google-ads"
    }
  }
}

Development

# Format
uv run ruff format .

# Lint + type check
uv run ruff check --fix .
uv run pyright

# Run tests
uv run pytest tests/ -v

Credentials

Required environment variables (see .env.example):

Variable Required Description
GOOGLE_ADS_DEVELOPER_TOKEN Yes API developer token
GOOGLE_ADS_CLIENT_ID Yes OAuth client ID
GOOGLE_ADS_CLIENT_SECRET Yes OAuth client secret
GOOGLE_ADS_REFRESH_TOKEN Yes OAuth refresh token
GOOGLE_ADS_LOGIN_CUSTOMER_ID No MCC account ID (for managing multiple accounts)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluealpha_google_ads_mcp-0.1.1.tar.gz (195.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bluealpha_google_ads_mcp-0.1.1-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

Details for the file bluealpha_google_ads_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: bluealpha_google_ads_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 195.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for bluealpha_google_ads_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8fd09e00e90b0a05df42235886f8b6d209d8a13fc7e5d2fbf8cdbfaec6470150
MD5 986d94bd0aa2a48a1b2a56a8b7f8810b
BLAKE2b-256 f879350e78f51b7348c985689456147ef08444c5d5e6d1ddbfed92e6166c9e02

See more details on using hashes here.

File details

Details for the file bluealpha_google_ads_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bluealpha_google_ads_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 587e91fa7780945585e4471a5c713101601637dde47750534b43e23cdd92cd97
MD5 ef9213f37dc1f22a5b769f5fbb3b4d2b
BLAKE2b-256 90a9e991015fdf56996cbf74f57db996f7becbefcc8e2716f3f1c248e5c03b63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page