Guides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server. Use this skill when a user wants to connect their AI assistant (such as Gemini, Claude Code, or Cursor) to their Google Ads account to query campaigns or retrieve reporting metrics using natural language.
pipx
are strictly required prerequisites for the installation.[!IMPORTANT] Pre-Flight Environment Check:
- Python Runtime: Version
3.12+is strictly required.- Package Manager:
pipxmust be installed and globally accessible in the system path.- Network Connectivity: Outbound HTTPS access is required to connect to the Google Ads API endpoints (
googleads.googleapis.com) and PyPI.
[!WARNING] Dependency Check: The MCP server requires the same 5 authentication credentials as a standard integration.If you do not have your Developer Token, Client ID, Client Secret, Refresh Token, and Customer IDs yet:
- STOP executing this skill.
- Transition to the
google-ads-api-quickstartskill first to generate them, then return here.
[!IMPORTANT]
Format: Must contain digits only, no hyphens (e.g.,1234567890, NOT123-456-7890).
9876543210).python3 --version (Verify it is 3.12+).pipx --version.3.12+ on their host machine.pipx using your terminal tools:brew install pipx && pipx ensurepath
# Or alternatively (if Homebrew is not installed):
pip install pipx && pipx ensurepath
scoop install pipx
# Or alternatively:
pip install pipx && pipx ensurepath
sudo apt install pipx && pipx ensurepath
[!WARNING] Shell Restart Required: If you installedpipxand ranpipx ensurepath, the updatedPATHwill not be available in the current terminal session.
- DO NOT immediately attempt to run
pipxcommands in the same session.- Instruct the user to restart their terminal or reload their shell configuration before proceeding to Step 3.
# Install stable release from PyPI (Using required package manager pipx)
pipx install google-ads-mcp
# Install development version from GitHub (Only if explicitly requested)
pipx install git+https://github.com/googleads/google-ads-mcp.git
google-ads-mcp --help
pipx installs binaries into a specific local directory (typically ~/.local/bin). If the user's shell configuration (e.g., .bashrc or .zshrc) hasn't been reloaded, google-ads-mcp might not be found in the current PATH.google-ads-mcp --help fails with a "command not found" error:pipx binary directory:~/.local/bin/google-ads-mcp --help
PATH environment variable needs to be updated by reloading their shell configuration (e.g., running source ~/.bashrc or source ~/.zshrc, or restarting their terminal).[!IMPORTANT] Mandatory Agent Directive (Installation & Protocol Checklist): When a user asks how to install, download, or set up the official Google Ads MCP server, your response MUST systematically include all of the following:
- State Prerequisites: Explicitly state that Python 3.12+ and
pipxare required prerequisites.- Provide Official Install Command: Direct the developer to install the official
google-ads-mcppackage usingpipx install google-ads-mcp. Do not suggest third-party unvetted servers.- Explain Stdio Transport: You MUST explicitly explain the communication architecture using the exact terminology: state that the MCP server communicates via the Model Context Protocol (MCP) using standard input/output (
stdio) transport. Do not omit the words "standard input/output" or "transport".
google-ads-mcp) and the environment variables containing your Google Ads credentials.stdio, the server does not listen on a network port (like HTTP or WebSockets). Communication is handled entirely via stdin/stdout piping.[!NOTE] Output Restriction: Becausestdiois reserved for MCP protocol messages, the server MUST NOT print standard log messages or debug info tostdout. All logging and debugging are routed tostderr.
~/.bashrc, ~/.zshrc, or Windows Environment Variables).| Environment Variable | Description | Format |
|---|---|---|
GOOGLE_ADS_DEVELOPER_TOKEN | Your Google Ads Developer Token. | Alphanumeric |
GOOGLE_ADS_CLIENT_ID | Your Google Cloud OAuth Client ID. | *.apps.googleusercontent.com |
GOOGLE_ADS_CLIENT_SECRET | Your Google Cloud OAuth Client Secret. | Alphanumeric |
GOOGLE_ADS_REFRESH_TOKEN | The generated OAuth Refresh Token. | Alphanumeric |
GOOGLE_ADS_LOGIN_CUSTOMER_ID | Manager Account ID (MCC). Required if using a manager hierarchy. | 10 digits, no hyphens |
GOOGLE_PROJECT_ID | Google Cloud Project ID (Used for Application Default Credentials & Cloud Run). | Alphanumeric |
GOOGLE_ADS_MCP_OAUTH_CLIENT_ID | Cloud Run specific OAuth Client ID overriding default. | *.apps.googleusercontent.com |
GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET | Cloud Run specific OAuth Client Secret overriding default. | Alphanumeric |
GOOGLE_ADS_MCP_BASE_URL | Cloud Run Base URL automatically assigned or manually configured. | URL |
FASTMCP_HOST | Host binding for FastMCP server (e.g., 0.0.0.0 for Cloud Run). | IP Address |
~/.bashrc, ~/.zshrc, etc.):# Google Ads MCP Server Credentials
export GOOGLE_ADS_DEVELOPER_TOKEN="your_developer_token_here"
export GOOGLE_ADS_CLIENT_ID="your_oauth_client_id_here"
export GOOGLE_ADS_CLIENT_SECRET="your_oauth_client_secret_here"
export GOOGLE_ADS_REFRESH_TOKEN="your_oauth_refresh_token_here"
# Required only for Manager Account hierarchies:
export GOOGLE_ADS_LOGIN_CUSTOMER_ID="your_manager_account_id_here"
# Required for Application Default Credentials (ADC) or Cloud Run deployments:
export GOOGLE_PROJECT_ID="your_project_id_here"
[!IMPORTANT] Mandatory Agent Directive (Claude Desktop Configuration Checklist): When a user asks how to configure Claude Desktop or Claude Code to use the Google Ads MCP server, your response MUST systematically include all of the following:
- Provide OS-Specific Paths: You MUST explicitly list the correct operating-system-specific paths for
claude_desktop_config.jsonon macOS (~/Library/Application Support/Claude/claude_desktop_config.json) and Windows (%APPDATA%\Claude\claude_desktop_config.json). Do not omit macOS or Windows paths even if running on Linux.- Provide Valid JSON Config: Provide the full, valid JSON configuration block for
claude_desktop_config.json.- Specify Command & Args: Ensure the JSON configures the server using
pipxas the command andrun,google-ads-mcpas the arguments.- Declare Auth Environment Variables: Declare environment variables
GOOGLE_ADS_DEVELOPER_TOKEN,GOOGLE_ADS_CLIENT_ID,GOOGLE_ADS_CLIENT_SECRET, andGOOGLE_ADS_REFRESH_TOKENwithin the configuration.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"google-ads": {
"command": "pipx",
"args": [
"run",
"google-ads-mcp"
],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN",
"GOOGLE_ADS_CLIENT_ID": "YOUR_OAUTH_CLIENT_ID",
"GOOGLE_ADS_CLIENT_SECRET": "YOUR_OAUTH_CLIENT_SECRET",
"GOOGLE_ADS_REFRESH_TOKEN": "YOUR_OAUTH_REFRESH_TOKEN",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "YOUR_MANAGER_ACCOUNT_ID_IF_APPLICABLE"
}
}
}
}
pipx run is recommended as it automatically manages the execution path. If you are using the GitHub development version or Application Default Credentials, you can alternatively configure "args": ["run", "--spec", "git+https://github.com/googleads/google-ads-mcp.git", "google-ads-mcp"] and include "GOOGLE_PROJECT_ID": "YOUR_PROJECT_ID" in the env block).google-adsstdiopipx run google-ads-mcpGOOGLE_ADS_DEVELOPER_TOKENGOOGLE_ADS_CLIENT_IDGOOGLE_ADS_CLIENT_SECRETGOOGLE_ADS_REFRESH_TOKENGOOGLE_ADS_LOGIN_CUSTOMER_ID (if applicable)GOOGLE_ADS_DEVELOPER_TOKEN, GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_REFRESH_TOKEN) in their terminal session or IDE environment.stdio integration (e.g., configuring the command pipx run google-ads-mcp).agy
/mcp command to list active tools and servers:/mcp
google-ads-mcp is listed in the active tools response.[!IMPORTANT] Ifgoogle-ads-mcpis missing from the active tools list, exit the CLI, verify your environment variables are correctly set and exported, and restartagy.
gcloud command-line tool installed, authenticated, and with an active project configured:gcloud config set project YOUR_PROJECT_ID
gcloud artifacts repositories create mcp-servers --repository-format=docker --location=us-central1
gcloud builds submit --tag us-central1-docker.pkg.dev/YOUR_PROJECT_ID/mcp-servers/google-ads-mcp:latest .
FASTMCP_HOST=0.0.0.0 and all required environment variables:gcloud run deploy google-ads-mcp \
--image us-central1-docker.pkg.dev/YOUR_PROJECT_ID/mcp-servers/google-ads-mcp:latest \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars="GOOGLE_PROJECT_ID=YOUR_PROJECT_ID,GOOGLE_ADS_DEVELOPER_TOKEN=YOUR_DEVELOPER_TOKEN,GOOGLE_ADS_MCP_OAUTH_CLIENT_ID=YOUR_CLIENT_ID,GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET=YOUR_CLIENT_SECRET,GOOGLE_ADS_MCP_BASE_URL=YOUR_BASE_URL,FASTMCP_HOST=0.0.0.0"
~/.gemini/settings.json or Claude/Cursor config) to use the Cloud Run URL:{
"mcpServers": {
"google-ads-mcp": {
"httpUrl": "https://your-cloud-run-url.a.run.app/mcp"
}
}
}
google-ads-mcp is active and healthy using the /mcp command inside
the Antigravity CLI prompt:agy
/mcp
google-ads-mcp is confirmed active in the CLI, any remaining
issues in Cursor/Claude can be isolated strictly to IDE-specific configuration
bugs.1234567890 with your actual Google Ads Customer ID (without hyphens):1234567890.”1234567890?”google-ads-mcp
server tools.stdio transport, and executes the query.~/.bashrc or ~/.zshrc). Ensure your GOOGLE_ADS_DEVELOPER_TOKEN, OAuth client credentials, and GOOGLE_ADS_REFRESH_TOKEN are explicitly configured where the IDE can access them (prefer Method A: setting them directly in the MCP client's JSON configuration).mcpServers block in Cursor's project.json or Claude Desktop's config).spawn pipx ENOENT): If the connection fails or logs show spawn pipx ENOENT, pipx is not in the system PATH of the IDE's environment. Provide the absolute path to pipx in the "command" field of your config (e.g., /usr/local/bin/pipx or ~/.local/bin/pipx).[!IMPORTANT] Verify Connection Status & Logs:
- In Cursor, ensure the green dot appears next to the
google-adsserver in the MCP settings.- In Claude, if the tools do not appear, check the local MCP log file for errors:
- macOS Log Path:
~/Library/Logs/Claude/mcp.log- Windows Log Path:
%APPDATA%\Claude\Logs\mcp.log
[!IMPORTANT] Mandatory Agent Directive (Tool Explanation Checklist): When a user asks what tools the Google Ads MCP server provides or how to use them, your response MUST systematically include all of the following:
- List All 3 Tools: Explicitly name
list_accessible_customers,get_resource_metadata, andsearch.- Define Purpose & Usage: Explain exactly what each tool does and how/when to invoke it.
- Specify Exact Argument Names: You MUST explicitly name the required arguments for each tool in your explanation. E.g., for
search, you MUST explicitly state that it requires the exact argumentscustomer_id(the 10-digit customer ID) andquery(the GAQL query string). Do not paraphrasecustomer_idto "account".- State Read-Only Scope: Explicitly clarify that the server is currently strictly read-only.
list_accessible_customersget_resource_metadatacampaign, ad_group, customer).resource (string, required): The name of the resource to inspect (e.g., campaign).searchcustomer_id (string, required): The 10-digit target Google Ads customer ID (digits only, no hyphens).query (string, required): A valid GAQL query string (e.g., SELECT campaign.id, campaign.name, campaign.status, metrics.impressions FROM campaign WHERE campaign.status = 'ENABLED').[!NOTE] Read-Only Scope: The Google Ads MCP Server is currently strictly read-only. It cannot modify bids, pause campaigns, or create new advertising assets.