MCP Google Ads

io.github.Ayo-Fam由 GitHub 账号 Ayo-Fam 发布v0.1.0更新于 Oct 24, 2026

Multi-account Google Ads MCP: campaigns, keywords, search terms, and ad performance.

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

本地 MCP 服务器,让助手查询多个 Google Ads 账户的广告系列、关键词、搜索词和广告效果。

可以做什么
  • 账户管理:列出账户、设置默认账户、发现可访问的客户账户
  • 花费报告:账户汇总与跨周期对比
  • 广告系列分析:列出广告系列并获取指定时间范围的效果指标
  • 查询级明细:关键词效果、搜索词报告和广告效果
  • 所有查询通过 GAQL 调用 Google Ads API,带重试并将结果规范化
适用场景
适合同时管理多个客户或内部 Google Ads 账户、希望在一个助手会话中切换账户而无需重启服务器的场景,主要用于报表与效果分析,而非修改广告系列。
运行要求
以本地 Python 包(mcp-google-ads-multi)运行,可通过 pip 安装或用 uvx 启动。需要 GOOGLE_ADS_DEVELOPER_TOKEN 中的 Google Ads API 开发者令牌,以及由 GOOGLE_ADS_ACCOUNTS_CONFIG 指向的 accounts.json 文件,其中保存各账户的 OAuth 或服务账号凭据。需要访问 Google Ads API 的网络连接。
安装前请注意
accounts.json 配置文件保存所有账户的 OAuth 或服务账号凭据,应按机密文件保护。开发者令牌通过环境变量传入。该服务器为 beta 版本(0.1.0),工具以只读报表查询为主,但账户数据会发送至 Google Ads API。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MCP Google Ads,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-google-ads

Multi-account Google Ads MCP server for operators who need one MCP surface across multiple client or in-house ad accounts without restarting the server.

Release posture: beta package, version 0.1.0 from pyproject.toml.

Choose your path

You are...Start hereThen
Connecting the server to your MCP clientdocs/start-here.mdQuick start below
Auditing account switching and retriesdocs/architecture.mdgads/server.py
Reviewing packaging metadatapyproject.tomlaccounts.example.json

Architecture

mermaid
flowchart TD  U[AI operator] --> C[MCP client]  C --> S[FastMCP server]  S --> M[Account manager]  M --> F[Accounts config]  S --> Q[GAQL query helpers]  Q --> R[Retry wrapper]  R --> A[Google Ads API]  A --> R --> S

Request flow

mermaid
flowchart TD  P[Operator asks for account or campaign data] --> T[Selected MCP tool]  T --> A[Resolve named or default account]  A --> B[Build Google Ads client]  B --> C[Run GAQL query]  C --> D{API call succeeds?}  D -- yes --> E[Normalize rows and return]  D -- retryable --> F[Backoff and retry]  F --> D  D -- no --> G[Return error payload]

Quick start

  1. Install the package.
bash
python -m pip install mcp-google-ads-multi
  1. Copy the accounts config template and add your accounts.
bash
mkdir -p ~/.config/mcp-google-adscp accounts.example.json ~/.config/mcp-google-ads/accounts.json
  1. Register it in your MCP client.
json
{  "mcpServers": {    "google-ads": {      "command": "uvx",      "args": ["mcp-google-ads-multi"],      "env": {        "GOOGLE_ADS_DEVELOPER_TOKEN": "your-developer-token",        "GOOGLE_ADS_ACCOUNTS_CONFIG": "/Users/you/.config/mcp-google-ads/accounts.json"      }    }  }}

Available tools

Tool groupToolsPurpose
Account selectionlist_accounts, set_default_account, list_customersManage account routing and discover accessible customers
Spend summaryget_account_summary, compare_periodsPeriod-over-period account reporting
Campaign analysislist_campaigns, get_campaign_performanceCampaign inventory and range-based metrics
Query-level detailget_keyword_performance, search_terms_report, get_ad_performanceKeyword, search-term, and ad reporting

Runtime proof

ClaimProof
Package entry point is stablemcp-google-ads-multi = "gads.server:main" in pyproject.toml
Multi-account routing is first-classAccountManager() and set_default_account() in gads/server.py
Queries go through reusable helpersgads/query.py and gads/retry.py
Config is file-drivenaccounts.example.json documents the accounts shape

Repo map

PathPurpose
gads/server.pyFastMCP tool surface
gads/accounts.pyAccount config, OAuth/service-account loading
gads/query.pyGAQL execution helpers
gads/retry.pyRetry behavior for API calls
docs/start-here.mdSetup, validation, common failures
docs/architecture.mdComponent map and request lifecycle

Validation

CheckCommand
Import compilespython -m compileall gads
Package buildspython -m build
README/docs links are localrg '\\]\\(([^)]+\\.md)\\)' README.md docs/

License

MIT

Project context for new tasks

Use INDEX.md to find task-specific contracts; consult prompt.md when product direction is relevant. Historical examples do not select the current task.

来源:README.md,提交 93fe255

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分