by cohnen
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.
# Add to your Claude Code skills
git clone https://github.com/cohnen/mcp-google-ads
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.
Account Management
Campaign Analytics & Reporting
Keyword & Ad Performance
Budget & Bid Management
No comments yet. Be the first to share your thoughts!
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