Google Ads MCP Server Core
Integrates with the Google Ads API so AI agents can interact with Google Ads accounts; the setup uses OAuth credentials and a developer token to access Google Ads.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
la guida in italiano si trova dopo la guida in inglese
English Version
Google Ads MCP Server Core (Windows & Public version)
This repository contains the MCP server to integrate Google Ads with AI agents such as Antigravity or Claude. Don't worry if you're a beginner: once you open this folder in Antigravity, you'll be guided step-by-step through an interactive setup process.
๐ Quick Setup for Windows
If you are using Antigravity on Windows, we have included an automatic workflow:
Download the ZIP file.
Extract the ZIP file into a folder of your choice on your PC (e.g.,
C:\Projects\google_ads_mcp).Open that specific folder in Antigravity.
Type
/setup-mcp-windowsin the AI Chat window (NOT in the system terminal/PowerShell).
๐ Troubleshooting the /setup command
If your agent says the command does not exist:
Check Hidden Folders: Ensure the
.agentfolder exists in your directory. On Windows, folders starting with a dot might be hidden.Folder Level: Make sure you opened the folder that contains the
ads_mcpand.agentfolders, not a parent folder.Reserved Names: Do not place this project inside a folder named
.antigravity. Use a neutral path likeC:\Projects\google_ads.
Do not type this command in the terminal. It must be typed in the Antigravity chat interaction box.
4. Configure Antigravity (Add, don't overwrite!)
Open your mcp_config.json file (located at %USERPROFILE%\.gemini\antigravity\mcp_config.json).
Add the following GoogleAds block inside the mcpServers object. Do not delete your existing servers (like Meta Ads or others).
/* inside mcpServers: { ... } */
"GoogleAds": {
"command": "uv",
"args": [
"run",
"--directory",
"C:/Path/To/Folder/Antigravity-google-ads-mcp-for-windows",
"-m",
"ads_mcp.server"
],
"cwd": "C:/Path/To/Folder/Antigravity-google-ads-mcp-for-windows",
"timeout": 30000
}Tip: Ensure you put a comma , between different server objects and use forward slashes /.
Related MCP server: Google Ads MCP Server
๐ Credentials Configuration (Essential)
For security reasons, this repository DOES NOT include access credentials. You must generate your own by following these steps:
1. Get API Keys (Google Cloud Console)
Create a project on Google Cloud Console.
Enable the Google Ads API from the API library.
Configure the OAuth Consent Screen:
Choose "External".
Add your email address as a Test user (mandatory to generate the token).
Create Credentials:
Click on "Create Credentials" -> "OAuth Client ID".
Application type: Desktop App.
Download the JSON file and rename it to
client_secrets.jsonin the project root.
Developer Token: Copy it from your Google Ads Manager (MCC) account -> Tools & Settings -> API Center.
2. Generate the Refresh Token
Antigravity can do this for you!
Make sure
client_secrets.jsonis in the folder.In the AI chat, ask/wait for the step:
uv run get_refresh_token.py -c client_secrets.json.A URL will be printed. Click it, log in to your Google account, and click "Allow".
The script will automatically capture the token and print it in the chat.
3. Create the google-ads.yaml file
Rename google-ads.yaml.example to google-ads.yaml and fill in the fields:
developer_token: "YOUR_TOKEN"
client_id: "YOUR_CLIENT_ID"
client_secret: "YOUR_CLIENT_SECRET"
refresh_token: "YOUR_REFRESH_TOKEN"
login_customer_id: "YOUR_MCC_ID" # Optional
use_proto_plus: True๐ Troubleshooting: "unauthorized_client" Error
If you get a RefreshError: unauthorized_client, check these 3 points:
OAuth Consent Screen: Ensure your Google Cloud Project is set to "Testing" and you have added your email to the "Test users" list.
Client ID Type: Ensure you created an OAuth Client ID of type "Desktop App", not "Web Application".
Consistency: Check that the
client_idandclient_secretingoogle-ads.yamlare EXACTLY the same as those inclient_secrets.json.
๐ ๏ธ Requirements
uv installed on the system.
Python 3.10 or higher.
Versione Italiana
Google Ads MCP Server Core (Version)
Questo repository contiene il server MCP per integrare Google Ads con agenti AI come Antigravity o Claude. Non preoccuparti se sei alle prime armi: una volta aperta questa cartella in Antigravity, verrai guidato passo dopo passo da una procedura interattiva.
๐ Setup Rapido per Windows
Se usi Antigravity e sei su Windows, abbiamo incluso un workflow automatico:
Scarica il file ZIP.
Estrai il file ZIP in una cartella a tua scelta sul tuo PC (es.
C:\Progetti\google_ads_mcp).Apri quella specifica cartella in Antigravity.
Digita
/setup-mcp-windowsnella finestra della Chat AI (NON nel terminale di sistema/PowerShell).
๐ Risoluzione problemi comando /setup
Se l'agente dice che il comando non esiste:
Cartelle Nascoste: Assicurati che la cartella
.agentesista. Su Windows, i file che iniziano con un punto potrebbero essere nascosti.Livello Cartella: Assicurati di aver aperto la cartella che contiene direttamente
ads_mcpe.agent, non una cartella superiore.Nomi Riservati: Non posizionare il progetto dentro una cartella chiamata
.antigravity. Usa un percorso neutro comeC:\Progetti\google_ads.
Non scrivere questo comando nel terminale. Deve essere digitato nel box di chat con Antigravity.
4. Configura Antigravity (Aggiungi, non sovrascrivere!)
Apri il tuo file mcp_config.json (che si trova in %USERPROFILE%\.gemini\antigravity\mcp_config.json).
Aggiungi il seguente blocco GoogleAds dentro l'oggetto mcpServers. Non cancellare i server esistenti (come Meta Ads o altri).
/* dentro mcpServers: { ... } */
"GoogleAds": {
"command": "uv",
"args": [
"run",
"--directory",
"C:/Percorso/Alla/Cartella/Antigravity-google-ads-mcp-for-windows",
"-m",
"ads_mcp.server"
],
"cwd": "C:/Percorso/Alla/Cartella/Antigravity-google-ads-mcp-for-windows",
"timeout": 30000
}Tip: Assicurati di mettere una virgola , tra i diversi server e usa le slash in avanti /.
๐ Configurazione Credenziali (Fondamentale)
Per motivi di sicurezza, questo repository NON include le credenziali di accesso. Dovrai generare le tue seguendo questi passaggi:
1. Ottieni le API Keys (Google Cloud Console)
Crea un progetto su Google Cloud Console.
Abilita le Google Ads API dalla libreria API.
Configura la Schermata di consenso OAuth:
Scegli "External".
Aggiungi il tuo indirizzo email come "Test user".
Crea le Credenziali:
Clicca su "Crea credenziali" -> "ID client OAuth".
Tipo di applicazione: Applicazione desktop.
Scarica il file JSON e rinominalo in
client_secrets.jsonnella radice del progetto.
Developer Token: Copialo dal tuo account Google Ads Manager (MCC) -> Strumenti -> Centro API.
2. Genera il Refresh Token
Antigravity puรฒ farlo per te!
Assicurati che
client_secrets.jsonsia nella cartella.Nella chat AI, chiedi o aspetta lo step:
uv run get_refresh_token.py -c client_secrets.json.Verrร stampato un URL. Cliccaci, accedi al tuo account Google e clicca su "Consenti".
Lo script catturerร automaticamente il token e lo stamperร nella chat.
3. Crea il file google-ads.yaml
Rinomina google-ads.yaml.example in google-ads.yaml e riempi i campi:
developer_token: "IL_TUO_TOKEN"
client_id: "IL_TUO_CLIENT_ID"
client_secret: "IL_TUO_CLIENT_SECRET"
refresh_token: "IL_TUO_REFRESH_TOKEN"
login_customer_id: "IL_TUO_MCC_ID" # Facoltativo
use_proto_plus: True๐ Risoluzione Problemi: Errore "unauthorized_client"
Se ricevi l'errore RefreshError: unauthorized_client, controlla questi 3 punti:
Schermata Consenso OAuth: Assicurati che il progetto Google Cloud sia in stato "Testing" e di aver aggiunto la tua email alla lista dei "Test users".
Tipo Client ID: Assicurati di aver creato un ID Client OAuth di tipo "Desktop App" (Applicazione Desktop), non "Web Application".
Coerenza: Controlla che
client_ideclient_secretnel filegoogle-ads.yamlsiano IDENTICI a quelli presenti nel fileclient_secrets.json.
๐ ๏ธ Requisiti
uv installato sul sistema.
Python 3.10 o superiore.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Google Ads from ChatGPT, Claude or any MCP client. Sign in with OAuth or use an API key.
Connect authorized ad accounts to AI assistants for audits, reporting, and approval-gated changes.
Hosted Google Ads MCP for Claude and ChatGPT. Preview every write. No developer token.
Hosted MCP server for marketing agencies: connect Google Ads, GA4, Search Console, Meta, LinkedIn and more to Claude or ChatGPT. Pull reports and make changes via OAuth login, no setup.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables AI assistants to manage, report, and analyze Google Ads campaigns securely with encrypted multi-client support, real-time API integrations, and audit trail logging.17-
- AlicenseNot gradedqualityDmaintenanceConnects Claude Desktop to your Google Ads account, allowing you to analyze and manage campaigns, ad groups, and keywords using natural language.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI to securely access and query Google Ads account data without Google Cloud setup, using GAQL.app as a backend.35 npm50MIT
- AlicenseNot gradedqualityCmaintenanceConnects Claude to Meta Ads, enabling full management of ad accounts including campaigns, creatives, budgets, and reporting. Handles authentication, token minting, and MCP server registration automatically.MIT