ClaudeCodeMod

All shelves / MCP servers

Google Ads

cohnen/mcp-google-ads · 609 stars · Python · MIT

MCP server An MCP tool that connects Google Ads with Claude AI/Cursor and others, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all through simple chat with Claude, Cursor or Windsurf.

Install

The repo has no one-line install. Follow its README.

Open the repo

Files

README.md

Google Ads MCP

A tool that connects Google Ads with Claude AI, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all through simple chat with Claude.

What Can This Tool Do For Advertising Professionals?

  1. Account Management
  • See all your Google Ads accounts in one place
  • Get account details and basic campaign information
  1. Campaign Analytics & Reporting
  • Discover which campaigns are performing best
  • Track impressions, clicks, conversions, and cost metrics
  • Analyze performance trends over time
  • Compare different time periods to spot changes
  • Visualize your data with charts and graphs created by Claude
  1. Keyword & Ad Performance
  • Identify top and underperforming keywords
  • Analyze ad copy effectiveness
  • Check quality scores and competitive metrics
  • Get actionable insights on how to improve your campaigns
  1. Budget & Bid Management
  • Monitor campaign budgets and spending
  • Analyze bid strategies and performance
  • Identify opportunities for optimization
  • Get recommendations for budget allocation

Google Ads MCP Architecture Flow

flowchart TB
    User(User) -->|Interacts with| Claude
    Claude(Claude AI Assistant) -->|Makes requests to| MCP[Google Ads MCP Server]
    User -->|Can also use| Cursor[Cursor AI Code Editor]
    Cursor -->|Makes requests to| MCP
    
    subgraph "MCP Server"
        FastMCP[FastMCP Server] 
        Tools[Available Tools]
        Auth[Authentication]
        
        FastMCP -->|Exposes| Tools
        FastMCP -->|Uses| Auth
    end
    
    subgraph "Google Ads Tools"
        ListAccounts[list_accounts]
        ExecuteGAQL[execute_gaql_query]
        CampaignPerf[get_campaign_performance]
        AdPerf[get_ad_performance]
        RunGAQL[run_gaql]
    end
    
    Tools -->|Includes| ListAccounts
    Tools -->|Includes| ExecuteGAQL
    Tools -->|Includes| CampaignPerf
    Tools -->|Includes| AdPerf
    Tools -->|Includes| RunGAQL
    
    subgraph "Authentication"
        OAuth[OAuth 2.0 Client ID]
        ServiceAccount[Service Account]
        Credentials[Google Ads API Credentials]
        
        OAuth -->|Provides| Credentials
        ServiceAccount -->|Provides| Credentials
    end
    
    MCP -->|Communicates with| GoogleAdsAPI[Google Ads API]
    GoogleAdsAPI -->|Returns| AdData[Advertising Data]
    AdData -->|Analyzed by| Claude
    AdData -->|Visualized by| Claude
    AdData -->|Can be used by| Cursor
    
    Credentials -->|Authorizes| GoogleAdsAPI
    
    subgraph "Configuration"
        EnvVars[Environment Variables]
        ConfigFiles[Configuration Files]
        
        EnvVars -->|Configures| MCP
        ConfigFiles -->|Configures| Claude
        ConfigFiles -->|Configures| Cursor
    end

Available Tools

Here's what you can ask Claude to do once you've set up this integration:

Using the Advanced Query Tools

The run_gaql tool is especially powerful as it allows you to run any custom Google Ads Query Language (GAQL) query. Here are some example queries you can use:

Example 1: Basic campaign metrics

SELECT 
    campaign.name, 
    metrics.clicks, 
    metrics.impressions 
FROM campaign 
WHERE segments.date DURING LAST_7DAYS

Example 2: Ad group performance

SELECT 
    ad_group.name, 
    metrics.conversions, 
    metrics.cost_micros 
FROM ad_group 
WHERE metrics.clicks > 100

Example 3: Keyword analysis

SELECT 
    keyword.text, 
    metrics.average_position, 
    metrics.ctr 
FROM keyword_view 
ORDER BY metrics.impressions DESC

For a complete list of all available tools and their detailed descriptions, ask Claude to "list tools" after setup.

Getting Started (No Coding Experience Required!)

1. Set Up Google Ads API Access

Before using this tool, you'll need to create API credentials that allow Claude to access your Google Ads data. You can choose between two authentication methods:

#### Option A: OAuth 2.0 Client ID (User Authentication)

Best for individual users or desktop applications:

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Ads API
  4. Go to "Credentials" → "Create Credentials" → "OAuth Client ID"
  5. Choose "Desktop Application" as the application type
  6. Download the OAuth client configuration file (client_secret.json)
  7. Create a Google Ads API Developer token (see below)

#### Option B: Service Account (Server-to-Server Authentication)

Better for automated systems or managing multiple accounts:

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Ads API
  4. Go to "Credentials" → "Create Credentials" → "Service Account"
  5. Download the service account key file (JSON)
  6. Grant the service account access to your Google Ads accounts
  7. Create a Google Ads API Developer token (see below)

#### Authentication Token Refreshing

The application now includes robust token refresh handling:

  • OAuth 2.0 Tokens: The tool will automatically refresh expired OAuth tokens when possible, or prompt for re-authentication if the refresh token is invalid.
  • Service Account Tokens: Service account tokens are automatically generated and refreshed as needed without user intervention.

#### Authentication Method Comparison

Choose OAuth 2.0 Client ID if:

  • You're building a desktop application
  • Users need to explicitly grant access
  • You're managing a single account or a few personal accounts
  • You want users to have control over access permissions

Choose Service Account if:

  • You're building an automated system
  • You need server-to-server authentication
  • You're managing multiple accounts programmatically
  • You don't want/need user interaction for authentication
  • You need automatic token refreshing without user intervention

#### Getting a Developer Token

  1. Sign in to your Google Ads account at https://ads.google.com
  2. Click on Tools & Settings (wrench icon) in the top navigation
  3. Under "Setup", click "API Center"
  4. If you haven't already, accept the Terms of Service
  5. Click "Apply for token"
  6. Fill out the application form with details about how you plan to use the API
  7. Submit the application and wait for approval (usually 1-3 business days)

Note: Initially, you'll get a test Developer Token that has some limitations. Once you've tested your implementation, you can apply for a production token that removes these restrictions.

Understanding the Login Customer ID

The GOOGLE_ADS_LOGIN_CUSTOMER_ID is optional and is primarily used when:

  • You're working with a Google Ads Manager Account (MCC)
  • You need to access multiple client accounts under that manager account

The Login Customer ID should be your Manager Account ID (format: XXX-XXX-XXXX) if:

  • You're accessing multiple accounts under a manager account
  • You want to use manager account credentials to access client accounts

You can skip this setting if:

  • You're only accessing a single Google Ads account
  • You're using credentials directly from the account you want to access

To find your Manager Account ID:

  1. Sign in to your Google Ads Manager Account
  2. Click on the settings icon (gear)
  3. Your Manager Account ID will be displayed in the format XXX-XXX-XXXX
  4. Download the credentials file (a JSON file)

🎬 Watch this beginner-friendly tutorial on Youtube: COMING SOON

2. Install Required Software

Facts

Kind
MCP server
Repo
cohnen/mcp-google-ads
Group
Uncategorized
Stars
609
License
MIT
Language
Python
Last push
2025-10-16
Forks
161
Homepage
ixigo.tech
Topics
ai, claude, google-ads, mcp, mcp-server

More on this shelf

  1. 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  2. 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
  3. 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
  4. 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
  5. 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
  6. 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k