
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.
Get account details and basic campaign information
Campaign Analytics & Reporting
Visualize your data with charts and graphs created by Claude
Keyword & Ad Performance
Get actionable insights on how to improve your campaigns
Budget & Bid Management
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
Here's what you can ask Claude to do once you've set up this integration:
| What You Can Ask For | What It Does | What You'll Need to Provide |
|---|---|---|
list_accounts |
Shows all your Google Ads accounts | Nothing - just ask! |
execute_gaql_query |
Runs a Google Ads Query Language query | Your account ID and a GAQL query |
get_campaign_performance |
Shows campaign metrics with performance data | Your account ID and time period |
get_ad_performance |
Detailed analysis of your ad creative performance | Your account ID and time period |
run_gaql |
Runs any arbitrary GAQL query with formatting options | Your account ID, query, and format (table, JSON, or CSV) |
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:
SELECT
campaign.name,
metrics.clicks,
metrics.impressions
FROM campaign
WHERE segments.date DURING LAST_7DAYS
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
For a complete list of all available tools and their detailed descriptions, ask Claude to "list tools" after setup.
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:
Best for individual users or desktop applications:
Better for automated systems or managing multiple accounts:
The application now includes robust token refresh handling:
Choose OAuth 2.0 Client ID if:
Choose Service Account if:
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.
The GOOGLE_ADS_LOGIN_CUSTOMER_ID is optional and is primarily used when:
The Login Customer ID should be your Manager Account ID (format: XXX-XXX-XXXX) if:
You can skip this setting if:
To find your Manager Account ID:
🎬 Watch this beginner-friendly tutorial on Youtube: COMING SOON
You'll need to install these tools on your computer:
Make sure both Python and Node.js are properly installed and available in your system path before proceeding.
You need to download this tool to your computer. The easiest way is:
Alternatively, if you're familiar with Git:
git clone https://github.com/ixigo/mcp-google-ads.git
Open your computer's Terminal (Mac) or Command Prompt (Windows):
bash
# Example (replace with your actual path):
cd ~/Documents/mcp-google-ads-main
```bash # Using uv (recommended): uv venv .venv
# If uv is not installed, install it first: pip install uv # Then create the virtual environment: uv venv .venv
# OR using standard Python: python -m venv .venv ```
Note: If you get a "pip not found" error when trying to install uv, see the "If you get 'pip not found' error" section below.
```bash # On Mac/Linux: source .venv/bin/activate
# On Windows: .venv\Scripts\activate ```
```bash # Using uv: uv pip install -r requirements.txt
# OR using standard pip: pip install -r requirements.txt
# If you encounter any issues with the MCP package, install it separately: pip install mcp ```
If you get "pip not found" error:
```bash # First ensure pip is installed and updated: python3 -m ensurepip --upgrade python3 -m pip install --upgrade pip
# Then try installing the requirements again: python3 -m pip install -r requirements.txt
# Or to install uv: python3 -m pip install uv ```
When you see (.venv) at the beginning of your command prompt, it means the virtual environment is active and the dependencies will be installed there without affecting your system Python installation.
The Google Ads MCP now supports environment file configuration for easier setup.
.env.example file to .env in your project directory:bash
cp .env.example .env
.env file with your actual configuration values:```bash # Edit the .env file with your favorite text editor # For Mac: nano .env
# For Windows: notepad .env ```
.env file:``` # Authentication Type: "oauth" or "service_account" GOOGLE_ADS_AUTH_TYPE=oauth
# Path to your credentials file (OAuth client secret or service account key) 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 ```
The application will automatically load these values from the .env file when it starts.
You can also set environment variables directly in your system or in the configuration files for Claude or Cursor:
{
"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"
}
}
}
}
{
"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"
}
}
}
}
$ claude mcp add mcp-google-ads \
-- python -m otcore.mcp_server <graph>