google-ads-manager-mcp

google-ads-manager-mcp

MCP server to read and manage Google Ads accounts via GAQL queries, campaign/ad group/keyword operations, and safe write support with draft-confirm flow.

Category
访问服务器

README

Google Ads Manager MCP

Unofficial, community-maintained project. Not affiliated with, endorsed by, or sponsored by Google. "Google Ads" is a trademark of Google LLC.

A local MCP (Model Context Protocol) server that lets an AI assistant read and manage a Google Ads account: run GAQL reports, create campaigns, pause/enable campaigns, and add keywords.

Google also publishes an official Google Ads MCP server, which is read-only (reporting/diagnostics only). This project covers the same reporting ground and adds write support — creating and editing campaigns, budgets, ad groups, keywords, and ads — gated behind a draft/confirm safety layer so nothing changes in your account by accident.

Every write goes through a draft → confirm safety flow: the tool that "creates" or "updates" something only validates the change against Google's API (validate_only) and hands back a draftId with a preview. Nothing changes in your Ads account until you call confirm_write with that draftId. Drafts expire after 10 minutes.

Tools

Read-only:

  • list_accessible_customers — which accounts this refresh token can reach
  • search_gaql — run any raw GAQL SELECT query
  • get_campaigns — campaigns with status, budget, and core metrics
  • get_ad_groups — ad groups (optionally filtered to a campaign) with metrics
  • get_keywords — keyword criteria with match type, status, and metrics
  • get_search_terms — actual search terms that triggered your ads, for finding negative keyword candidates

Write (draft → confirm):

  • create_campaign — new campaign + budget, created PAUSED unless you say otherwise
  • update_campaign_status — enable / pause / remove a campaign
  • update_campaign_budget — change an existing campaign's daily budget
  • add_keywords — add keyword criteria to an ad group
  • create_ad_group — new ad group inside an existing campaign
  • update_ad_group_status — enable / pause / remove an ad group
  • update_keyword_status — enable / pause / remove a keyword criterion
  • add_negative_keywords — add negative keyword criteria to an ad group
  • create_responsive_search_ad — new responsive search ad, created PAUSED unless you say otherwise
  • confirm_write — execute a previously returned draftId for real

Setup

1. Google Ads developer token

Google Ads → Tools & Settings → API Center. Test-account tokens are issued instantly; a production-level token requires Google's manual review (roughly 1-2 weeks), so apply for that early if you'll use this beyond a test account.

2. OAuth client

Google Cloud Console → APIs & Services → Credentials → Create credentials → OAuth client ID. Choose application type Desktop app. Copy the client ID and client secret.

3. Configure environment

cp .env.example .env

Fill in GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN, and GOOGLE_ADS_CUSTOMER_ID (the account this server should manage — 10 digits, dashes optional). If that account is a client under a manager (MCC) account, also set GOOGLE_ADS_LOGIN_CUSTOMER_ID to the manager account's ID.

4. Get a refresh token

npm install
npm run auth

This opens an authorization URL — open it, sign in with the Google account that has access to your Ads account, approve the adwords scope. The script prints a GOOGLE_ADS_REFRESH_TOKEN; add it to .env.

5. Build

npm run build

6. Point your MCP client at it

For Claude Desktop / Claude Code, add to your MCP config:

{
  "mcpServers": {
    "google-ads-manager": {
      "command": "node",
      "args": ["/absolute/path/to/google ads manger mcp/build/index.js"],
      "env": {
        "GOOGLE_ADS_CLIENT_ID": "...",
        "GOOGLE_ADS_CLIENT_SECRET": "...",
        "GOOGLE_ADS_DEVELOPER_TOKEN": "...",
        "GOOGLE_ADS_REFRESH_TOKEN": "...",
        "GOOGLE_ADS_CUSTOMER_ID": "..."
      }
    }
  }
}

(Or skip the env block and just make sure .env is populated — the server loads it via dotenv when run directly, e.g. npm run dev during local iteration.)

Notes

  • This is scoped to a single Google Ads account (GOOGLE_ADS_CUSTOMER_ID). To manage several client accounts under one manager account, either run one instance per customer ID, or extend googleAdsClient.ts to accept a customerId argument per tool call.
  • New campaigns default to PAUSED (startEnabled: false) so nothing spends until you explicitly enable it.

Contributing

Issues and PRs welcome — new report types, negative-keyword-at-campaign-level support, and multi-account (MCC) handling are the most useful next additions.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选