Google Ads MCP
Enables managing Google Ads accounts, including analyzing campaign, ad, keyword, and search-term performance; running custom GAQL queries; pausing or enabling campaigns, ad groups, and ads; adding negative keywords; and creating responsive search ads with a preview-and-confirm safety workflow.
Provides tools for Google Analytics 4, including listing GA4 properties, running custom reports, retrieving realtime active users, and viewing configured events over the last 30 days.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Ads MCP show me last month's campaign performance and top search terms"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-ads-mcp
Servidor MCP (Model Context Protocol) para gestionar Google Ads y Google Analytics 4 directamente desde Claude Code y Claude Desktop.
Escrito por Gabriel Urrutia. Inspirado en AdLoop por kLOsk — reimplementación independiente optimizada para Claude con soporte nativo en Windows, macOS y Linux.
¿Qué hace?
Analizar rendimiento de campañas, anuncios y keywords
Consultar términos de búsqueda y proponer negativos
Pausar / activar campañas, grupos y anuncios
Crear anuncios de búsqueda responsivos (RSA)
Agregar negative keywords
Ejecutar queries GAQL personalizadas
Consultar reportes y usuarios en tiempo real de GA4
Todo con un sistema de seguridad preview → confirm: ningún cambio se aplica sin aprobación explícita.
Related MCP server: Google Ads MCP
Requisitos
Python 3.11+
uv (gestor de paquetes)
Cuenta de Google Ads con acceso a la API
Google Cloud Project con las APIs habilitadas
Instalación
Windows (PowerShell)
git clone https://github.com/gabogabucho/google-ads-mcp.git
cd google-ads-mcp
powershell -ExecutionPolicy Bypass -File install.ps1macOS / Linux (bash)
git clone https://github.com/gabogabucho/google-ads-mcp.git
cd google-ads-mcp
bash install.shLos instaladores:
Verifican Python, uv y git
Crean el virtualenv e instalan dependencias
Crean
~/.google-ads-mcp/config.yamldesde el ejemploCopian las Skills a
~/.claude/skills/Muestran el snippet exacto para configurar Claude Desktop
Configuración de Google
1. Google Cloud Project
Ve a console.cloud.google.com → crea un proyecto
Habilita estas APIs:
Google Ads API
Google Analytics Data API
Google Analytics Admin API
2. Credenciales OAuth 2.0
APIs & Services → Credentials → Create → OAuth 2.0 Client ID
Application type: Desktop app
Descarga el JSON → guárdalo como
~/.google-ads-mcp/credentials.json
3. Developer Token de Google Ads
En Google Ads: herramienta (llave inglesa) → API Center → copia el token
El token de nivel TEST solo funciona con cuentas de prueba
4. Editar config.yaml
# macOS/Linux
$EDITOR ~/.google-ads-mcp/config.yaml
# Windows
notepad %USERPROFILE%\.google-ads-mcp\config.yamlVer config/config.yaml.example para todos los campos.
5. Primera autenticación
El primer python -m google_ads_mcp abre el navegador para autenticar con Google.
El token se guarda en ~/.google-ads-mcp/token.json y se renueva automáticamente.
Configurar en Claude Desktop
Edita claude_desktop_config.json:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"google-ads": {
"command": "RUTA_AL_PYTHON_DEL_VENV",
"args": ["-m", "google_ads_mcp"],
"env": {
"GOOGLE_ADS_MCP_CONFIG": "RUTA_A_CONFIG_YAML"
}
}
}
}El instalador muestra las rutas exactas para tu sistema al terminar.
Configurar en Claude Code
# Añadir globalmente
claude mcp add google-ads \
--env GOOGLE_ADS_MCP_CONFIG=$HOME/.google-ads-mcp/config.yaml \
-- python -m google_ads_mcpO crea .mcp.json en la raíz del proyecto (ver config/mcp.json.example).
Skills disponibles
Después de instalar, usa estos comandos en Claude Code:
Comando | Descripción |
| Diagnóstico de configuración y guía de setup |
| Analizar campañas, keywords y search terms |
| Gestionar campañas con safety checks |
| Reportes y tiempo real de GA4 |
Herramientas MCP
Lectura — Google Ads
Tool | Descripción |
| Todas las cuentas accesibles |
| Métricas de campañas |
| Métricas de anuncios |
| Keywords con Quality Score |
| Términos de búsqueda reales |
| Query GAQL personalizada |
Lectura — GA4
Tool | Descripción |
| Cuentas y propiedades GA4 |
| Reporte personalizado |
| Usuarios activos ahora |
| Eventos configurados (30 días) |
Escritura (preview → confirm)
Tool | Descripción |
| Vista previa: pausar/activar/eliminar campaña |
| Vista previa: agregar negative keywords |
| Vista previa: crear anuncio RSA |
| Aplicar cambio por plan_id (dry_run=True por defecto) |
Sistema de seguridad
Usuario pide cambio
↓
preview_*() → valida límites, genera plan con ID corto
↓
Claude muestra preview, pide confirmación
↓
apply_change(plan_id, dry_run=True) ← simulación primero
↓
apply_change(plan_id, dry_run=False) ← solo con OK explícito del usuarioProtecciones activas:
Cap de presupuesto diario máximo (configurable)
Límite de % de aumento de bids
Operaciones bloqueadas por lista
Log de auditoría en
~/.google-ads-mcp/audit.logRSAs nuevos creados en estado PAUSED
Estructura del proyecto
google-ads-mcp/
├── src/google_ads_mcp/
│ ├── server.py # FastMCP: definición de todas las tools
│ ├── ads.py # Google Ads API (lectura y escritura)
│ ├── ga4.py # Google Analytics 4 API (solo lectura)
│ ├── auth.py # OAuth 2.0 con token caching
│ ├── config.py # Carga de config.yaml
│ └── safety.py # Guards, plan store, audit log
├── skills/
│ ├── google-ads-analyze/SKILL.md
│ ├── google-ads-manage/SKILL.md
│ ├── google-ads-ga4/SKILL.md
│ └── google-ads-setup/SKILL.md
├── config/
│ ├── config.yaml.example
│ ├── claude-desktop-config.json.example
│ └── mcp.json.example
├── docs/troubleshooting.md
├── install.sh # macOS / Linux
├── install.ps1 # Windows PowerShell
├── pyproject.toml
└── LICENSE # MITCréditos
Gabriel Urrutia (@gabogabucho) — autor
MIT License — ver LICENSE.
Available Tools
14 toolsapply_changeApply Change
Execute a previously previewed change.
ALWAYS show the preview to the user and get explicit confirmation before calling this with dry_run=False. When dry_run=True (default), it simulates the change without modifying Google Ads.
Inputs: plan_id (required), dry_run. Returns: result
get_ad_performanceGet Ad Performance
Get performance metrics at the individual ad level for a Google Ads account.
Useful for identifying underperforming ads, comparing creative variations, and finding ads to pause or improve.
Inputs: end_date (required), start_date (required), customer_id (required). Returns: result
get_campaign_performanceGet Campaign Performance
Get performance metrics for all campaigns in a Google Ads account.
Returns impressions, clicks, cost (USD), conversions, CTR, and average CPC. Results are sorted by spend (highest first), limited to 100 campaigns.
Inputs: end_date (required), start_date (required), customer_id (required). Returns: result
get_ga4_eventsGet Ga4 Events
List all GA4 event names and their 30-day count.
Use this to verify that conversion events are firing, check which events are tracked, and cross-reference with Google Ads conversion actions.
Inputs: property_id (required). Returns: result
get_keyword_performanceGet Keyword Performance
Get performance metrics for all keywords in a Google Ads account.
Returns keyword text, match type, Quality Score, bid, clicks, cost, and conversions. Useful for identifying low-QS keywords, high-spend with no conversions, and keywords that are candidates for negative keyword lists.
Inputs: end_date (required), start_date (required), customer_id (required). Returns: result
get_realtime_usersGet Realtime Users
Get real-time active user count from Google Analytics 4.
Useful for verifying that a newly activated campaign is generating traffic, or monitoring live user activity.
Inputs: property_id (required), dimensions. Returns: result
get_search_termsGet Search Terms
Get actual search terms that triggered ads in a Google Ads account.
Essential for finding negative keyword opportunities and understanding real user intent. Returns the top terms by spend.
Inputs: end_date (required), start_date (required), customer_id (required), limit. Returns: result
list_ga4_propertiesList Ga4 Properties
List all Google Analytics 4 accounts and properties accessible with current credentials.
Use this when the user hasn't provided a GA4 property_id, or to discover which properties are available.
Inputs: no named parameters. Returns: result
list_google_ads_accountsList Google Ads Accounts
List all Google Ads accounts accessible with the current credentials.
Use this first when the user hasn't specified a customer_id, or to discover which accounts are available.
Inputs: no named parameters. Returns: result
preview_add_negative_keywordsPreview Add Negative Keywords
Preview adding negative keywords to a campaign or ad group.
ALWAYS call this before apply_change. Either campaign_id or ad_group_id is required.
Inputs: keywords (required), customer_id (required), match_type, ad_group_id, +1 more. Returns: result
preview_campaign_status_changePreview Campaign Status Change
Preview pausing, enabling, or removing a campaign. Returns a plan_id to use with apply_change.
ALWAYS call this before apply_change. Show the preview to the user and ask for explicit confirmation before proceeding.
Inputs: action (required), campaign_id (required), customer_id (required). Returns: result
preview_responsive_search_adPreview Responsive Search Ad
Preview creating a Responsive Search Ad. Returns a plan_id to use with apply_change.
Validates headline/description counts and character limits before previewing. New ads are always created in PAUSED status.
Inputs: final_url (required), headlines (required), ad_group_id (required), customer_id (required), +3 more. Returns: result
run_ga4_reportRun Ga4 Report
Run a custom Google Analytics 4 report.
Common dimensions: sessionDefaultChannelGroup, deviceCategory, country, city, landingPage, sessionCampaignName, sessionGoogleAdsKeyword, pagePath, date
Common metrics: sessions, totalUsers, newUsers, bounceRate, conversions, totalRevenue, engagementRate, screenPageViews, averageSessionDuration
Date range examples: "30daysAgo", "7daysAgo", "today", "yesterday", "2024-01-01"
Inputs: metrics (required), end_date (required), dimensions (required), start_date (required), +2 more. Returns: result
run_gaql_queryRun Gaql Query
Execute a custom Google Ads Query Language (GAQL) query.
Use this for advanced analysis not covered by the other tools. GAQL syntax: SELECT fields FROM resource WHERE conditions ORDER BY ... LIMIT n
Common resources: campaign, ad_group, keyword_view, search_term_view, ad_group_ad, campaign_criterion, ad_group_criterion
Inputs: query (required), customer_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Ask Claude about your Google Ads: campaign performance, wasted search terms, GAQL reports.
Google Ads, Microsoft Advertising, GA4 and Search Console in Claude. Connect an ad account first.
Manage Google, Meta, TikTok, Snapchat and LinkedIn ads, plus GA4, Tag Manager and Search Console, by chat from Claude or ChatGPT. Spend increases need your confirmation first.
Run Google Ads and Meta Ads from ChatGPT or Claude: audit wasted spend, create and manage campaigns.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables natural language access to Google Ads campaigns, accounts, and performance metrics via Claude, with tools for managing ad groups, keywords, budgets, and visualizing data.1-
- AlicenseNot gradedqualityCmaintenanceEnables natural-language analysis and management of Google Ads accounts, campaigns, keywords, budgets, and performance metrics through Claude.MIT
- AlicenseBqualityCmaintenanceEnables Claude and other MCP-capable assistants to monitor and manage Google Ads accounts by pulling performance reports, running GAQL queries, adjusting budgets, pausing or enabling campaigns, adding keywords and negative keywords, and creating campaigns and ads, with preview and read-only safety controls.31Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude and other models to read a Google Ads account and safely create, edit, pause, and budget campaigns, ad groups, ads, keywords, and bids. Every write is previewed through Google's validateOnly, approved by a person, and protected by server-side spending limits and an audit log.MIT