home / mcp / google ads mcp server
Provides access to Google Ads data, budgeting, keywords, ad groups, visualizations, and automated insights via MCP for Claude Desktop.
Configuration
View docs{
"mcpServers": {
"bjorndavidhansen-google-ads-mcp-server": {
"url": "https://mcp.example.com/google-ads-mcp",
"headers": {
"APP_ENV": "dev",
"GOOGLE_ADS_CLIENT_ID": "YOUR_CLIENT_ID",
"GOOGLE_ADS_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_ADS_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN",
"GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN"
}
}
}
}You can access Google Ads data through Claude Desktop via a dedicated MCP Server. This server provides campaigns, accounts, and performance metrics, along with budgeting, keyword, and ad group management. It also includes visualizations, automated insights, and multi-environment deployment, helping you explore and optimize Google Ads from Claude with minimal setup.
Set up and run the Google Ads MCP Server locally or in a container, then connect Claude Desktop to the MCP server to query data, visualize metrics, and run management actions. You can manage ad groups, keywords, and budgets, view dashboards, and receive automated insights that guide optimization.
# Prerequisites
- Python 3.9 or higher
- Claude Desktop
- Google Ads API credentials
# Local development
# 1) Clone the project
git clone https://github.com/yourusername/google-ads-mcp.git
cd google-ads-mcp
# 2) (Recommended) Create a Python virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3) Install dependencies
pip install -r requirements.txt
# 4) Create and configure environment variables
cp .env.example .env
# Edit .env with your Google Ads credentials
# 5) Start the MCP server
python server.py
```
```bash
# Docker deployment
# 1) Build the Docker image
docker build -t google-ads-mcp:latest .
# 2) Run the container with environment variables
docker run -p 8000:8000 --env-file .env google-ads-mcp:latest
# Optional: use docker-compose if provided
docker-compose up -dThe server supports multiple environments and environment-specific configurations. You set the runtime environment with APP_ENV as dev, test, or prod, and you configure other settings via environment variables. Feature flags let you enable or disable specific functionality. Ensure your Google Ads credentials are provided in a way that the MCP server can access them at startup.
Credentials are kept separate from code and loaded via environment variables or Kubernetes secrets in production. The MCP server includes authentication for API access and rate limiting in production environments. Follow best practices to keep credentials secure and rotate keys regularly.
# Example environment variables (placeholders; replace with actual values)
GOOGLE_ADS_DEVELOPER_TOKEN=YOUR_DEVELOPER_TOKEN
GOOGLE_ADS_CLIENT_ID=YOUR_CLIENT_ID
GOOGLE_ADS_CLIENT_SECRET=YOUR_CLIENT_SECRET
GOOGLE_ADS_REFRESH_TOKEN=YOUR_REFRESH_TOKEN
APP_ENV=devConfigure Claude Desktop to connect to the MCP server by adding a tooling entry that points to the Python runtime and the server script. After saving, restart Claude Desktop and use the tools to query Google Ads data and create visualizations.
{"mcpServers": {
"google_ads": {
"command": "python",
"args": ["server.py"]
}
}}Ask Claude to show account performance, compare campaigns, visualize budget distribution, or list ad groups and keywords. Use natural language prompts that map to the provided tools for ad group management, keyword management, budget management, and the enhanced visualization and insights capabilities.
You can manage ad groups with the following tools. Each tool retrieves or updates data for your Google Ads accounts.
Handle keywords with dedicated tools to fetch, visualize, add, update, or remove keywords, and to analyze search terms for insights.
Manage campaign budgets, analyze utilization, and obtain recommendations to optimize spending across campaigns.
Access dashboards and visualizations to compare performance, breakdown metrics by device or geography, and understand budget and performance trends.
Gain anomaly detection, optimization suggestions, opportunities, and an integrated insights dashboard to guide improvements.
Run the test suite with pytest to validate functionality across ad group, keyword, budget features, tools, visualizations, and budget visualizations.
Retrieve ad groups for a Google Ads account with optional filtering and visualization support.
Fetch ad groups data in JSON format suitable for visualizations.
Get performance metrics for a specific ad group.
Return ad group performance metrics in JSON format for visualization.
Create a new ad group within a campaign.
Update attributes of an existing ad group.
Retrieve keywords for a Google Ads account with optional filtering.
Fetch keywords in JSON format for visualization.
Add new keywords to an ad group.
Update an existing keyword status or bid.
Remove keywords from an ad group.
View search terms that triggered your ads.
Get search terms in JSON format for visualization.
Analyze search terms performance and extract insights.
Get insights about search terms performance in JSON format.
Get campaign budgets with performance metrics and utilization.
Get budget information in JSON format with visualizations.
Analyze budget performance with insights and recommendations.
Update a budget's amount or delivery method (placeholder implementation).
Get a comprehensive account dashboard with KPIs, trends, and top performers.
Get a detailed dashboard for a specific campaign.
Compare metrics between multiple entities (campaigns, ad groups).
Break down performance by dimensions like device, geo, or time.
Detect significant changes in performance across campaigns, ad groups, or keywords.
Provide anomaly data in JSON format with visualizations.
Generate actionable optimization suggestions for the account.
Get optimization suggestions in JSON format with visualizations.
Discover growth opportunities in the Google Ads account.
Get growth opportunities in JSON format with visualizations.
Get a comprehensive insights dashboard combining anomalies, suggestions, and opportunities.