AdWhiz MCP 服务器

文档

使用 AI 工具管理 Google Ads 所需的一切。

本页内容

  1. 快速开始
  2. OpenClaw 设置
  3. 工作原理
  4. 工具参考(47 个工具)
  5. 对话示例
  6. 重要概念
  7. 订阅方案
  8. 常见问题 / 故障排除
  9. 支持

快速开始

1

注册并订阅

www.adwhiz.ai/pricing 创建账户并选择方案。所有方案包含所有工具——区别在于 API 调用量和可连接的 Google Ads 账户数量。

专业版 — $79/月商业版 — $249/月企业版 — $799/月
2

连接 Google Ads

前往 www.adwhiz.ai/connect,通过 Google OAuth 授权您的 Google Ads 账户。AdWhiz 仅通过官方 Google Ads API 请求读写权限。您可以随时从 Google 账户设置中撤销访问。

3

添加到您的 AI 工具

AdWhiz 支持任何兼容 MCP 协议的工具——Claude Code、Cursor、Windsurf、OpenClaw、Copilot、Gemini CLI 等。提供两种认证方式:

推荐

浏览器登录(MCP OAuth)

只需添加服务器 URL,无需 API 密钥。您的 MCP 客户端会打开浏览器窗口,供您使用 Google 登录并授权连接。令牌自动管理。

快速安装

将以下内容粘贴到任何 AI 编程工具(Claude Code、Codex CLI、Gemini CLI 等),它会自动设置 MCP 服务器:

Add the AdWhiz Google Ads MCP server to my project.
Server URL: https://mcp.adwhiz.ai/mcp
Type: streamable-http

手动配置

{
  "mcpServers": {
    "adwhiz": {
      "type": "streamable-http",
      "url": "https://mcp.adwhiz.ai/mcp"
    }
  }
}

首次使用时,AI 工具会在浏览器中打开 adwhiz.ai/oauth/consent。使用 Google 登录并点击「授权」以完成连接。

替代方案:API 密钥

如果您的 MCP 客户端不支持 OAuth,请从控制面板创建 API 密钥,并在 Authorization 请求头中传递:

{
  "mcpServers": {
    "adwhiz": {
      "type": "streamable-http",
      "url": "https://mcp.adwhiz.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

YOUR_API_KEY 替换为您控制面板中的密钥。保存配置文件后重启 AI 工具。

OpenClaw 设置

AdWhiz 可作为 OpenClaw 技能使用。通过 ClawHub 安装即可自动配置,也可以手动将 MCP 服务器添加到 openclaw.json。两种方式都能让您的代理访问全部 47 个工具。

AdWhiz OpenClaw 集成页面,展示设置步骤、支持的工具和配置示例
1

安装 AdWhiz 技能(推荐)

最快的入门方式是通过 ClawHub。它会自动配置 MCP 服务器,提示您输入 API 密钥,并为全部 47 个工具提供代理指令。

clawhub install adwhiz

需要安装 Node.js 以运行基于 npx 的 MCP 服务器。安装过程中会提示您输入 ADWHIZ_API_KEY

2

或手动配置 openclaw.json

如果您更喜欢手动设置,请直接将 AdWhiz MCP 服务器添加到 openclaw.json。提供两种传输选项:

选项 A:HTTP + OAuth(推荐)

{
  "mcpServers": {
    "adwhiz": {
      "transport": "http",
      "url": "https://mcp.adwhiz.ai/mcp"
    }
  }
}

无需 API 密钥——首次连接时会自动打开浏览器授权页面。

选项 B:HTTP + API 密钥

{
  "mcpServers": {
    "adwhiz": {
      "transport": "http",
      "url": "https://mcp.adwhiz.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

适用于不支持 OAuth 的客户端。从控制面板获取 API 密钥。

选项 C:stdio(通过 npx 本地运行)

{
  "mcpServers": {
    "adwhiz": {
      "command": "npx",
      "args": ["-y", "@adwhiz/mcp-server"],
      "env": {
        "ADWHIZ_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

需要安装 Node.js。使用 API 密钥进行认证。

OpenClaw 代理:自动配置

如果您是 OpenClaw 代理,正在阅读此页面以自行安装 AdWhiz,请按以下步骤操作:

  1. 1使用 HTTP + OAuth 传输(选项 A)——只需添加服务器 URL。无需 API 密钥,首次使用时会打开浏览器授权页面。
  2. 2如果用户的 MCP 客户端不支持 OAuth,请回退到 HTTP + API 密钥(选项 B)。用户可在 https://www.adwhiz.ai/dashboard 创建 API 密钥。
  3. 3如果 Node.js 可用且用户偏好本地执行,请使用 stdio 传输(选项 C)配合 API 密钥。
  4. 4使用上方的配置代码片段,将相应的 mcpServers 条目添加到用户的 `openclaw.json` 配置文件中。
  5. 5通过调用 `list_accounts` 工具验证连接——它应返回用户的 Google Ads 账户。
  6. 6如果用户尚未完成 Google Ads OAuth,请引导他们访问 https://www.adwhiz.ai/connect 进行授权。
# Agent self-install summary:
# 1. Prefer HTTP + OAuth (no API key needed)
# 2. Fallback: HTTP + API key, or stdio + API key (needs Node.js)
# 3. Write mcpServers config to openclaw.json
# 4. Test with list_accounts tool
# 5. If Google Ads not connected → direct user to adwhiz.ai/connect
#
# Skill manifest: openclaw/skills/adwhiz/SKILL.md
# MCP endpoint: https://mcp.adwhiz.ai/mcp
# Auth: OAuth (auto) or Bearer API key
# npm package: @adwhiz/mcp-server (stdio only)

工作原理

AdWhiz 是一个远程 MCP 服务器——一个实现了 Model Context Protocol 的无状态 HTTPS 服务。配置完成后,您的 AI 工具会自动发现全部 47 个工具,并在相关时代您调用。

  • 自然语言接口用自然语言描述您的需求即可。Claude 会理解您的意图并自动选择合适的工具组合。
  • 47 个工具,自动发现AI 工具启动时会从 mcp.adwhiz.ai 获取工具清单。无需手动选择工具。
  • 浏览器登录(OAuth)只需添加服务器 URL,无需 API 密钥。首次使用时会打开浏览器窗口供您登录并授权。令牌自动刷新。
  • 安全优先默认设置新广告系列和广告始终以暂停状态创建。必须明确启用后才能投放。
  • 完整审计日志每次修改操作都会被记录。在 AI 工具中使用 get_operation_log 工具可随时查看近期更改。
  • 尽可能只读查询和报告工具不会修改您的账户。写入工具需要您在对话中确认操作。

工具参考

47 个工具,分 5 个类别。所有工具都需要 customer_id 参数(10 位数字,无连字符)。

账户工具

2 个工具
工具描述
list_accountsList all accessible Google Ads accounts
get_account_infoGet account details (currency, timezone, optimization score)

读取工具

14 个工具
工具描述
list_campaignsList campaigns with status, type, budget, bidding strategy
get_campaign_performanceCampaign metrics: cost, clicks, conversions, CTR, CPA, ROAS, impression share
list_ad_groupsList ad groups with bids, filtered by campaign
list_adsList ads with headlines, descriptions, final URLs
list_keywordsKeywords with match types, bids, quality scores
get_search_termsSearch terms report — actual queries triggering your ads
list_negative_keywordsNegative keywords at campaign, ad group, or account level
list_assetsSitelinks, callouts, structured snippets
list_conversion_actionsConversion actions with status, type, category
list_budgetsCampaign budgets with associated campaigns
list_bidding_strategiesPortfolio bidding strategies
list_audience_segmentsAudience targeting criteria
list_user_listsRemarketing/audience lists for targeting
get_operation_logRecent mutations performed via AdWhiz

写入工具

28 个工具
工具描述
create_campaignCreate a campaign (Search, Display, PMax, Video) — starts PAUSED
update_campaignUpdate campaign name
set_campaign_statusPause, enable, or remove a campaign
create_ad_groupCreate an ad group in a campaign
update_ad_groupUpdate ad group name or CPC bid
set_ad_group_statusPause, enable, or remove an ad group
create_responsive_search_adCreate RSA with headlines + descriptions — starts PAUSED
set_ad_statusPause, enable, or remove an ad
add_keywordsAdd keywords with match types and bids
update_keyword_bidChange a keyword's CPC bid
set_keyword_statusPause, enable, or remove a keyword
add_negative_keywordAdd negative keyword at campaign or ad group level
remove_negative_keywordRemove a negative keyword
create_shared_negative_listCreate a shared negative keyword list
add_to_shared_listAdd keywords to a shared negative list
attach_shared_listAttach shared list to a campaign
create_sitelinkCreate a sitelink asset
create_calloutCreate a callout asset
create_structured_snippetCreate a structured snippet asset (e.g. Models, Brands, Types)
create_price_extensionCreate a price extension with up to 8 offerings
link_asset_to_campaignLink asset (sitelink, callout, snippet, price, etc.) to a campaign
unlink_asset_from_campaignRemove an asset-to-campaign linkage without deleting the asset
create_conversion_actionCreate a conversion tracking action
update_conversion_actionUpdate conversion action name or status
create_budgetCreate a campaign budget
update_budgetUpdate budget amount or name
create_bidding_strategyCreate a portfolio bidding strategy
add_audience_to_campaignAdd audience targeting to a campaign

审计工具

2 个工具
工具描述
run_mini_auditQuick 3-metric audit: wasted spend, best/worst CPA, projected savings
run_full_auditComprehensive audit: campaigns, keywords, search terms, issues, recommendations

查询工具

1 个工具
工具描述
run_gaql_queryExecute any read-only GAQL query (max 1,000 rows)

对话示例

将这些提示直接输入您的 AI 工具——它会自动选择合适的 MCP 工具。

List all my campaigns and their performance this month

Claude

list_campaigns + get_campaign_performance

Find search terms wasting money and add them as negative keywords

Claude

get_search_terms → analyze non-converting terms → add_negative_keyword

Create a new search campaign for 'plumber in NYC' keywords with $50/day budget

Claude

create_campaign + create_ad_group + add_keywords + create_responsive_search_ad

Run a full audit of my account

Claude

run_full_audit → comprehensive analysis report

Pause all campaigns spending more than $100/day with CPA over $50

Claude

get_campaign_performance → identify targets → set_campaign_status

What GAQL query would show me keywords with quality score below 5?

Claude

run_gaql_query with ad_group_criterion WHERE quality_info.quality_score < 5

重要概念

客户 ID

每个工具都需要 customer_id 参数——一个 10 位数字,无连字符(例如 9044845197)。如果不确定,请使用 list_accounts 工具查找。

微单位(货币)

Google Ads API 以微单位存储货币值:1,000,000 微单位 = $1.00。AdWhiz 在所有响应中自动将微单位转换为美元,您无需手动计算。

安全默认设置

新广告系列和新广告始终以暂停状态创建。您必须显式调用 set_campaign_statusset_ad_status,设置 status: ENABLED 后才能投放。

操作日志

每次修改(创建、更新、暂停、删除)都在服务端记录。随时在 AI 工具中使用 get_operation_log 查看通过 AdWhiz 进行的近期更改。

日期范围

效果工具接受 GAQL 日期预设字符串。常用预设:

LAST_7_DAYSLAST_30_DAYSLAST_90_DAYSTHIS_MONTHLAST_MONTH

订阅方案

所有方案包含全部 47 个工具。可随时从控制面板升级或降级。

功能专业版商业版企业版
月费$79$249$799
月 API 调用量5002,00010,000
广告账户1最多 5 个无限
全部 47 个工具
多账户管理
支持标准优先专属

常见问题 / 故障排除

AI 工具看不到 AdWhiz 工具

检查 MCP 配置文件(如 .mcp.json)是否在正确位置且 JSON 格式有效。确认控制面板中的 API 密钥正确。更改配置后请完全重启 AI 工具。

出现「订阅未激活」错误

您的订阅可能已过期或扣款失败。登录 www.adwhiz.ai/dashboard 检查订阅状态,或联系 support@adwhiz.ai。

出现「月度限额已用完」错误

您已用完当前计费周期的 API 调用配额。从控制面板升级方案,或等待下一个计费周期重置配额。

如何添加另一个 Google Ads 账户?

前往 www.adwhiz.ai/connect 再次完成 Google OAuth 流程。每次授权可访问一个 Google Ads 账户(或 MCC)。为每个要管理的账户重复此操作。

我的数据安全吗?

是的。AdWhiz 使用 AES-256-GCM 加密存储刷新令牌,通过官方 OAuth2 认证的 Google Ads API v23 与 Google 通信,且不长期存储原始广告数据。您可以随时从 Google 账户设置中撤销访问权限。

支持

我们将在一个工作日内回复所有支持请求。