google-ads-api-mcp-setup
它能做什么
它会帮你下载、配置开源的 Google Ads MCP 服务器,并将其连接到 Gemini、Claude Code 或 Cursor 等 AI 助手。适合希望用通俗语言询问广告系列和报告的人。
适用场景
- ✓当你希望 AI 助手读取你的 Google Ads 广告系列时。
- ✓当你希望通过通俗的提问获取 Google Ads 报告指标时。
- ✓当你想把 Cursor 或 Claude Code 连接到你的 Google Ads 账户时。
技能链接
https://github.com/google/skills/blob/main/skills/ads/google-ads-api-mcp-setup/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把 Claude Code 连接到我的 Google Ads 账户,好让我询问广告系列的情况。”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查你是否安装了 Python 3.12 或更高版本以及 pipx,确认你有 Google Ads 凭证,然后引导你完成下载、配置和安装步骤。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Google Ads API MCP Server Installation
This skill provides a structured setup guide to install, configure, and integrate the official open-source Google Ads Model Context Protocol (MCP) Server.
System Requirements & Compatibility (Agent Action: State Required Prerequisites)
When answering questions about installing or setting up the MCP server, you
MUST explicitly state to the user that both Python 3.12+ and 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.
⚠️ Prerequisites: Credentials Required
[!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.
Step 1: Validate Your Google Ads API Credentials
The Google Ads MCP Server requires the same five parameters as the standard client libraries. Before proceeding to installation, verify that you have these values secured and formatted correctly:
- Developer Token: Your unique API access key from the API Center (Manager Account).
- OAuth2 Client ID & Client Secret: Desktop Application credentials from the Google Cloud Console.
- OAuth2 Refresh Token: The long-lived token generated via the OAuth consent flow.
- Client Customer ID: The 10-digit target Google Ads account ID.
[!IMPORTANT]
Format: Must contain digits only, no hyphens (e.g.,
1234567890, NOT123-456-7890).
- Login Customer ID (Required for MCC Hierarchies): The 10-digit Manager Account (MCC) ID.
- Format: Digits only, no hyphens (e.g.,
9876543210). - Note: Essential if your OAuth credentials belong to a Manager Account administrator rather than directly to the client account.
- Format: Digits only, no hyphens (e.g.,
Once you have verified that all five parameters are present and formatted correctly, proceed to Step 2.
Step 2: Install Prerequisites (Python & pipx)
You MUST verify if the prerequisites are already installed before proposing any installation commands.
1. Verification Phase (Agent Action)
You MUST run the following commands to check the environment:
- Check Python version:
python3 --version(Verify it is3.12+). - Check if pipx is installed:
pipx --version.
- If both are present: Skip the installation phase and proceed directly to Step 3.
- If Python is missing/outdated: Stop and ask the user to upgrade Python to
3.12+on their host machine. - If pipx is missing: Proceed to the installation phase below.
2. Installation Phase (OS-Specific)
Detect the operating system and propose the appropriate command to install pipx using your terminal tools:
macOS
If the environment is macOS, propose:
brew install pipx && pipx ensurepath
# Or alternatively (if Homebrew is not installed):
pip install pipx && pipx ensurepath
Windows (PowerShell)
If the environment is Windows, propose:
scoop install pipx
# Or alternatively:
pip install pipx && pipx ensurepath
Linux (Ubuntu/Debian)
If the environment is Linux, propose:
sudo apt install pipx && pipx ensurepath
[!WARNING] Shell Restart Required: If you installed
pipxand 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.
Step 3: Install the Google Ads MCP Server
You must install the server package. By default, you MUST install the stable release from PyPI. Only install the GitHub development version if the user explicitly requests it.
1. Installation Command
Propose and execute the installation command:
常见问题
开始前需要准备什么?
Python 3.12 或更高版本、pipx,以及你的 Google Ads 凭证。
如果我还没有凭证怎么办?
本技能会先引导你到 Google Ads 快速入门页面创建凭证。
它支持哪些助手?
本技能以 Gemini、Claude Code 和 Cursor 为例。
详情
作者的原始描述
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.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10186
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。