Google Ads MCP Server
Connects Claude Desktop to your Google Ads account, allowing you to analyze and manage campaigns, ad groups, and keywords using natural language.
README
🚀 Google Ads MCP Server for Claude Desktop
This project provides a Model Context Protocol (MCP) server that connects Claude Desktop directly to your Google Ads Account, allowing you to analyze and manage your advertising campaigns using natural language.
🛠️ Features
Exposes seven powerful tools directly to Claude Desktop:
- Campaign Management:
get_campaigns: Lists all active/paused campaigns, budget allocation, and performance metrics (Impressions, Clicks, Conversions, Spend).update_campaign_status: Toggles campaign status (ENABLEDorPAUSED) by Campaign ID.set_campaign_budget: Modifies the daily budget of any campaign (in USD).
- Ad Group Management:
get_ad_groups: Lists all ad groups with their names, IDs, status, and target campaign.
- Keyword Management & PPC Bidding:
get_keywords: Pulls keywords with performance metrics (clicks, impressions, conversions, current bids). Optionally filter by Ad Group ID.- **
add_keyword**: Adds a new keyword (Broad/Phrase/Exact match) under a specific ad group with a manual CPC bid limit. update_keyword_bid: Modifies the Max CPC bid limit (in USD) for a specific keyword in an ad group.
📂 Project Structure
server.py: The MCP server. Runs in Mock (Simulation) Mode if no credentials are found, allowing you to test it instantly without API access.auth_helper.py: Interactive script to authenticate and generate OAuthrefresh_token.requirements.txt: Python package dependencies.
⚡ Quick Start & Setup (Windows Auto Setup)
If you are on Windows, we have provided an automated setup script to configure everything for you:
- Double-click the
setup.batfile in this project folder. - The script will automatically install dependencies, guide you through the OAuth login browser flow, and open the Claude Desktop config folder.
- Paste the configuration JSON block (shown below) into your
claude_desktop_config.jsonand restart Claude Desktop.
🛠️ Manual Configuration (Alternative)
If you prefer to configure the environment manually:
1. Create a Python Virtual Environment
Open your terminal (PowerShell or Bash) and run:
# Navigate to this folder
cd /path/to/this/folder
# Create virtual environment
python -m venv .venv
# Activate it (Windows PowerShell)
.venv\Scripts\Activate.ps1
# Activate it (macOS/Linux)
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
2. Configure Claude Desktop
Open your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add this configuration (make sure to replace the paths with absolute paths to your Python executable and project folder):
{
"mcpServers": {
"google-ads-manager": {
"command": "C:\\path\\to\\project\\.venv\\Scripts\\python.exe",
"args": [
"-u",
"C:\\path\\to\\project\\server.py"
],
"env": {
"MOCK_MODE": "true"
}
}
}
}
⚠️ Windows Warning: Use double backslashes (
\\) in paths. Make sure the executable points directly to your.venvscript to avoid environment mismatches.
3. Restart Claude Desktop
Restart your Claude Desktop application. You should see a small hammer icon 🔨 in the input box, showing that the Google Ads Manager server tools are loaded!
Try typing:
- "Show me my google ads campaigns"
- "Show me keywords in ad group 2001"
- "Add exact keyword 'buy shoes' to ad group 2001 with cpc bid of 1.50"
- "Pause campaign 1002"
- "Increase daily budget of campaign 1001 to $65"
💼 Going Live (Real Google Ads Integration)
To connect the server to your real live Google Ads account, follow these steps:
1. Place your GCP client secrets file
- Go to your Google Cloud Console -> Credentials.
- Download your OAuth 2.0 Client credentials JSON file (Desktop Application type).
- Put this
.jsonfile in this project folder.
2. Run the Auth Helper script
With your virtual environment active, run:
python auth_helper.py
- This will open your browser and ask you to log in to your Google Account.
- After clicking Allow, return to your terminal and enter your Developer Token and Client Customer ID.
- This script will automatically generate a secure
google-ads.yamlconfiguration file.
3. Update Claude Config for Live Mode
Edit your claude_desktop_config.json and change "MOCK_MODE": "true" to "false" (or delete the "env" section).
Restart Claude Desktop, and you are live!
⚠️ Troubleshooting (常见问题排查)
Q1: Browser shows "This app isn't verified" (此应用未经 Google 验证)
- Reason: Since this is a custom local tool, it has not gone through Google's public verification process. This is completely normal and safe.
- Solution: Click "Advanced" (高级) in the bottom left, then click "Go to your-project-name (unsafe)" (继续前往) to complete the authorization.
Q2: Error 403: access_denied / App has not completed verification
- Reason: Your GCP project is in "Testing" mode, and the Google account you are using to log in is different from the account that owns the GCP project.
- Solution:
- Make sure you select the same Google account that created the GCP credentials during the OAuth flow.
- Alternatively, go to your GCP Console -> Google Auth Platform -> Audience (测试受众) -> Click "+ ADD USERS" under Test Users, and add your login email address.
Built by Bohea Still — independent developer taking on automation, AI-pipeline and integration projects. Case study →
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。