The Google Ads MCP server is a powerful integration tool that connects Google Ads with Claude AI, allowing you to analyze advertising data through natural language conversations. It gives you access to campaign information, performance metrics, keyword analytics, and ad management capabilities through simple chat interactions.
Before using this tool, you need to create API credentials to allow Claude to access your Google Ads data. Choose between:
Download the tool:
Open Terminal/Command Prompt and install dependencies:
# Navigate to the folder
cd path/to/mcp-google-ads-main
# Create a virtual environment
python -m venv .venv
# Activate the virtual environment
# On Mac/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
.env.example to .env.env file with your credentials:# Authentication Type: "oauth" or "service_account"
GOOGLE_ADS_AUTH_TYPE=oauth
# Path to your credentials file
GOOGLE_ADS_CREDENTIALS_PATH=/path/to/your/credentials.json
# Your Google Ads Developer Token
GOOGLE_ADS_DEVELOPER_TOKEN=your_developer_token_here
# Optional: Manager Account ID (if applicable)
GOOGLE_ADS_LOGIN_CUSTOMER_ID=your_manager_account_id
# For Mac users:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
# For Windows users:
notepad %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "googleAdsServer": {
      "command": "/FULL/PATH/TO/mcp-google-ads-main/.venv/bin/python",
      "args": ["/FULL/PATH/TO/mcp-google-ads-main/google_ads_server.py"],
      "env": {
        "GOOGLE_ADS_AUTH_TYPE": "oauth",
        "GOOGLE_ADS_CREDENTIALS_PATH": "/FULL/PATH/TO/mcp-google-ads-main/credentials.json",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN_HERE",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "YOUR_MANAGER_ACCOUNT_ID_HERE"
      }
    }
  }
}
Once connected, you can ask Claude to analyze your advertising data. Available tools include:
| Tool | Description | Required Parameters | 
|---|---|---|
list_accounts | 
Shows all your Google Ads accounts | None | 
execute_gaql_query | 
Runs a Google Ads Query Language query | Account ID, GAQL query | 
get_campaign_performance | 
Shows campaign metrics with performance data | Account ID, time period | 
get_ad_performance | 
Detailed analysis of ad creative performance | Account ID, time period | 
run_gaql | 
Runs any GAQL query with formatting options | Account ID, query, format | 
You can run powerful GAQL queries with the run_gaql tool. Here are some examples:
SELECT 
    campaign.name, 
    metrics.clicks, 
    metrics.impressions 
FROM campaign 
WHERE segments.date DURING LAST_7_DAYS
SELECT 
    ad_group.name, 
    metrics.conversions, 
    metrics.cost_micros 
FROM ad_group 
WHERE metrics.clicks > 100
SELECT 
    keyword.text, 
    metrics.average_position, 
    metrics.ctr 
FROM keyword_view 
ORDER BY metrics.impressions DESC
Here are some effective prompts to use with Claude:
Claude can also create visualizations of your data when asked, helping you better understand performance trends, campaign comparisons, and optimization opportunities.
If you encounter issues:
On macOS, create an alias:
sudo ln -s $(which python3) /usr/local/bin/python
Run the included test scripts to verify your connection:
python test_google_ads_mcp.py
python test_token_refresh.py
If all tests complete successfully, your setup is working correctly and ready to use with Claude.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "googleAdsServer" '{"command":"/FULL/PATH/TO/mcp-google-ads-main/.venv/bin/python","args":["/FULL/PATH/TO/mcp-google-ads-main/google_ads_server.py"],"env":{"GOOGLE_ADS_CREDENTIALS_PATH":"/FULL/PATH/TO/mcp-google-ads-main/service_account_credentials.json","GOOGLE_ADS_DEVELOPER_TOKEN":"YOUR_DEVELOPER_TOKEN_HERE","GOOGLE_ADS_LOGIN_CUSTOMER_ID":"YOUR_MANAGER_ACCOUNT_ID_HERE"}}'
                        See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
    "mcpServers": {
        "googleAdsServer": {
            "command": "/FULL/PATH/TO/mcp-google-ads-main/.venv/bin/python",
            "args": [
                "/FULL/PATH/TO/mcp-google-ads-main/google_ads_server.py"
            ],
            "env": {
                "GOOGLE_ADS_CREDENTIALS_PATH": "/FULL/PATH/TO/mcp-google-ads-main/service_account_credentials.json",
                "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN_HERE",
                "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "YOUR_MANAGER_ACCOUNT_ID_HERE"
            }
        }
    }
}
                        To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
    "mcpServers": {
        "googleAdsServer": {
            "command": "/FULL/PATH/TO/mcp-google-ads-main/.venv/bin/python",
            "args": [
                "/FULL/PATH/TO/mcp-google-ads-main/google_ads_server.py"
            ],
            "env": {
                "GOOGLE_ADS_CREDENTIALS_PATH": "/FULL/PATH/TO/mcp-google-ads-main/service_account_credentials.json",
                "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN_HERE",
                "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "YOUR_MANAGER_ACCOUNT_ID_HERE"
            }
        }
    }
}
                        3. Restart Claude Desktop for the changes to take effect