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 分