Google Ads MCP
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Allows analyzing Google Ads data through natural language conversations, including account management, campaign analytics, keyword performance analysis, ad effectiveness tracking, budget monitoring, and visualization of advertising metrics.
Enables creation of architecture diagrams and flowcharts to visualize data relationships and system architecture.
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?
- Account Management
- See all your Google Ads accounts in one place
- Get account details and basic campaign information
- 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
- 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
- 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
Available Tools
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) |
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
Example 2: Ad group performance
Example 3: Keyword analysis
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:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Ads API
- Go to "Credentials" → "Create Credentials" → "OAuth Client ID"
- Choose "Desktop Application" as the application type
- Download the OAuth client configuration file (client_secret.json)
- 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:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Ads API
- Go to "Credentials" → "Create Credentials" → "Service Account"
- Download the service account key file (JSON)
- Grant the service account access to your Google Ads accounts
- Create a Google Ads API Developer token (see below)
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
- Sign in to your Google Ads account at https://ads.google.com
- Click on Tools & Settings (wrench icon) in the top navigation
- Under "Setup", click "API Center"
- If you haven't already, accept the Terms of Service
- Click "Apply for token"
- Fill out the application form with details about how you plan to use the API
- 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:
- Sign in to your Google Ads Manager Account
- Click on the settings icon (gear)
- Your Manager Account ID will be displayed in the format XXX-XXX-XXXX
- Download the credentials file (a JSON file)
🎬 Watch this beginner-friendly tutorial on Youtube: COMING SOON
2. Install Required Software
You'll need to install these tools on your computer:
- Python (version 3.11 or newer) - This runs the connection between Google Ads and Claude
- Node.js - Required for running the MCP inspector and certain MCP components
- Claude Desktop - The AI assistant you'll chat with
Make sure both Python and Node.js are properly installed and available in your system path before proceeding.
3. Download the Google Ads MCP
You need to download this tool to your computer. The easiest way is:
- Click the green "Code" button at the top of this page
- Select "Download ZIP"
- Unzip the downloaded file to a location you can easily find (like your Documents folder)
Alternatively, if you're familiar with Git:
4. Install Required Components
Open your computer's Terminal (Mac) or Command Prompt (Windows):
- Navigate to the folder where you unzipped the files:Copy
- Create a virtual environment (this keeps the project dependencies isolated):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.Copy
- Activate the virtual environment:Copy
- Install the required dependencies:If you get "pip not found" error:CopyCopy
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.
5. Connect Claude to Google Ads
- Download and install Claude Desktop if you haven't already
- Make sure you have your Google service account credentials file saved somewhere on your computer
- Open your computer's Terminal (Mac) or Command Prompt (Windows) and type:
Add the following text (this tells Claude how to connect to Google Ads):
Important: Replace all paths and values with the actual information for your account:
- The first path should point to the Python executable inside your virtual environment
- The second path should point to the
google_ads_server.py
file inside the folder you unzipped - The third path should point to your Google service account credentials JSON file
- Add your Google Ads Developer Token
- Add your Google Ads Manager Account ID (if applicable)
Examples:
- Mac:
- Python path:
/Users/ernesto/Documents/mcp-google-ads/.venv/bin/python
- Script path:
/Users/ernesto/Documents/mcp-google-ads/google_ads_server.py
- Python path:
- Windows:
- Python path:
C:\\Users\\ernesto\\Documents\\mcp-google-ads\\.venv\\Scripts\\python.exe
- Script path:
C:\\Users\\ernesto\\Documents\\mcp-google-ads\\google_ads_server.py
- Python path:
- Save the file:
- Mac: Press Ctrl+O, then Enter, then Ctrl+X to exit
- Windows: Click File > Save, then close Notepad
- Restart Claude Desktop
- When Claude opens, you should now see Google Ads tools available in the tools section
5a. Connect to Cursor (AI Code Editor)
Cursor is an AI-powered code editor that can be enhanced with MCP tools. You can integrate this Google Ads MCP tool with Cursor to analyze advertising data directly within your coding environment.
Setting Up Cursor Integration
- If you haven't already, download and install Cursor
- Create a Cursor MCP configuration file:For project-specific configuration:
Create a
.cursor/mcp.json
file in your project directory.For global configuration (available in all projects): Create a~/.cursor/mcp.json
file in your home directory. - Add the following configuration to your MCP config file:Important: Replace all paths and values with the actual information for your account, just like in the Claude Desktop configuration.Copy
- Restart Cursor or reload the workspace to apply the new configuration.
- The Google Ads MCP will now appear in Cursor's "Available Tools" section and can be used by Cursor's AI agent when needed.
Using Google Ads MCP in Cursor
When working in Cursor, you can ask the AI agent to use the Google Ads tools directly. For example:
- "Use the Google Ads MCP to list all my accounts and show me which ones have the highest spend."
- "Can you analyze my campaign performance for the last 30 days using the Google Ads MCP?"
- "Run a GAQL query to find my top converting keywords using the Google Ads tools."
Cursor will prompt you to approve the tool usage (unless you've enabled Yolo mode) and then display the results directly in the chat interface.
Cursor-Specific Features
When using the Google Ads MCP with Cursor, you can:
- Combine Code and Ads Analysis: Ask Cursor to analyze your marketing-related code alongside actual campaign performance data.
- Generate Data Visualizations: Request charts and visualizations of your ad performance directly in your development environment.
- Implement Recommendations: Let Cursor suggest code improvements based on your actual advertising data.
This integration is particularly valuable for developers working on marketing automation, analytics dashboards, or e-commerce applications where ad performance directly impacts code decisions.
6. Start Analyzing Your Advertising Data!
Now you can ask Claude questions about your Google Ads data! Claude can not only retrieve the data but also analyze it, explain trends, and create visualizations to help you understand your advertising performance better.
Here are some powerful prompts you can use with each tool:
Tool Name | Sample Prompt |
---|---|
list_accounts | "List all my Google Ads accounts and tell me which ones have the highest spend this month." |
execute_gaql_query | "Execute this query for account 123-456-7890: SELECT campaign.name, metrics.clicks FROM campaign WHERE metrics.impressions > 1000" |
get_campaign_performance | "Show me the top 10 campaigns for account 123-456-7890 in the last 30 days, highlight any with ROAS below 2, and suggest optimization strategies." |
get_ad_performance | "Do a comprehensive analysis of which ad copy elements are driving the best CTR in my search campaigns and give me actionable recommendations." |
run_gaql | "Run this query and format it as a CSV: SELECT ad_group.name, metrics.clicks, metrics.conversions FROM ad_group WHERE campaign.name LIKE '%Brand%'" |
You can also ask Claude to combine multiple tools and analyze the results. For example:
- "Find my top 20 converting keywords, check their quality scores and impression share, and create a report highlighting opportunities for scaling."
- "Analyze my account's performance trend over the last 90 days, identify my fastest-growing campaigns, and check if there are any budget limitations holding them back."
- "Compare my desktop vs. mobile ad performance, visualize the differences with charts, and recommend specific campaigns that need mobile bid adjustments based on performance gaps."
- "Identify campaigns where I'm spending the most on search terms that aren't in my keyword list, then suggest which ones should be added as exact match keywords."
Claude will use the Google Ads tools to fetch the data, present it in an easy-to-understand format, create visualizations when helpful, and provide actionable insights based on the results.
Data Visualization Capabilities
Claude can help you visualize your Google Ads data in various ways:
- Trend Charts: See how metrics change over time
- Comparison Graphs: Compare different campaigns or ad groups
- Performance Distributions: Understand how your ads perform across devices or audiences
- Correlation Analysis: Identify relationships between spend and conversion metrics
- Heatmaps: Visualize complex datasets with color-coded representations
Simply ask Claude to "visualize" or "create a chart" when analyzing your data, and it will generate appropriate visualizations to help you understand the information better.
Troubleshooting
Python Command Not Found
On macOS, the default Python command is often python3
rather than python
, which can cause issues with some applications including Node.js integrations.
If you encounter errors related to Python not being found, you can create an alias:
- Create a Python alias (one-time setup):Copy
- Verify the alias works:Copy
This creates a symbolic link so that when applications call python
, they'll actually use your python3
installation.
Claude Configuration Issues
If you're having trouble connecting:
- Make sure all file paths in your configuration are correct and use the full path
- Check that your service account has access to your Google Ads accounts
- Verify that your Developer Token is valid and correctly entered
- Restart Claude Desktop after making any changes
- Look for error messages in Claude's response when you try to use a tool
- Ensure your virtual environment is activated when running the server manually
Google Ads API Limitations
If you encounter issues related to API quotas or permissions:
- Check your Google Ads API quota limits in the Google Cloud Console
- Ensure your Developer Token has the appropriate access level
- Verify that you've granted the proper permissions to your service account
Other Unexpected Issues
If you encounter any other unexpected issues during installation or usage:
- Copy the exact error message you're receiving
- Contact Ernesto Cohnen at ernesto@ixigo.com for support, including:
- What you were trying to do
- The exact error message
- Your operating system
- Any steps you've already tried
You can also consult AI assistants which can often help diagnose and resolve technical issues by suggesting specific solutions for your situation.
Remember that most issues have been encountered by others before, and there's usually a straightforward solution available.
Testing Your Setup
The repository includes a test file test_google_ads_mcp.py
that lets you verify your Google Ads API connection is working correctly before using it with Claude or Cursor.
Setting Up the Test File
- Make sure your virtual environment is activated:Copy
- Configure the environment variables in the test file or set them in your environment:
- Open
test_google_ads_mcp.py
in a text editor - Find the section starting with
if not os.environ.get("GOOGLE_ADS_CREDENTIALS_PATH"):
- Update the placeholder values with your actual credentials or comment out this section if you've set them as environment variables
- Open
- Run the test:Copy
- The test will:
- List all your Google Ads accounts
- Use the first account ID to test campaign performance retrieval
- Test ad performance data
- Retrieve ad creatives
- Run a sample GAQL query
If all tests complete successfully, your setup is working correctly and ready to use with Claude or Cursor.
Contributing
Found a bug or have an idea for improvement? We welcome your input! Open an issue or submit a pull request on GitHub, or contact Ernesto Cohnen directly at ernesto@ixigo.com.
License
This project is licensed under the MIT License. See the LICENSE file for details.
About ixigo
ixigo is India's leading travel app, helping millions of travelers find the best deals on flights, trains, buses, and hotels. For more information, visit ixigo.com.
ixigo is a technology company that builds products to help people find the best deals on flights, trains, buses, and hotels. We're a team of travel enthusiasts who are passionate about making travel more affordable and accessible to everyone.
This server cannot be installed
A tool that connects Google Ads with Claude AI, allowing users to analyze advertising data through natural language conversations and access campaign information, performance metrics, keyword analytics, and ad management.