Skip to main content
Glama

MCP Ads

开源的营销 MCP 服务器。 你可以通过 Claude、ChatGPT、Cursor 或任何 MCP 客户端运行 Google Ads、Meta Ads、GA4、Search Console、Tag Manager、WordPress 等平台——读取表现数据、审计浪费的支出、构建报告并启动营销活动(默认以暂停状态创建,除非你明确要求启动)。

约 3,100 个已注册操作,覆盖 12+ 个平台,通过 17 个分类调度器暴露出来,因此你的代理只需加载约 20 个工具定义,而不用加载数千个。


选择你的路径

###好的云 = 全部连接 — 2 分钟接入,免费额度

前往 mcp-ads.com,在浏览器中登录并让你广告账户完成 OAuth 授权,然后把一个 URL 粘贴到 Claude 里,之后就完成了。

...

Oh no, I accidentally inserted "好的云 = 全部连接" - That's wrong. I need clean.

Let's rewrite that heading "### ☁️ 云 — 2 分钟接入,免费额度"

Complete final.# MCP Ads

开源的营销 MCP 服务器。 你可以通过 Claude、ChatGPT、Cursor 或任何 MCP 客户端运行 Google Ads、Meta Ads、GA4、Search Console、Tag Manager、WordPress 等平台——读取表现、审计浪费支出、构建报告并启动营销活动(默认会以暂停状态创建,除非你明确要求启动)。

约 3,100 个已注册操作,覆盖 12+ 个平台,通过 17 个分类调度器暴露出来,因此你的代理只需加载约 20 个工具定义,而不是数千个。


Related MCP server: Google Ads - AdLoop

选择你的路径

☁️ 云 — 2 分钟接入,免费额度

前往 mcp-ads.com,登录后在浏览器里完成广告账户的 OAuth 授权,再把一个个 URL 粘贴到 Claude 中,就可以了。

  • 无需申请 API、无需开发者令牌、无需应用审核——平台审批(Google Ads 开发者令牌、Meta App Review 等)都已完成

  • 免费额度:每个平台每月 30 次工具调用。付费计划不限用量

  • 你的凭据加密存储;可随时从控制台撤销

对于几乎所有想使用而不是托管工具的人来说,这是正确的选择。

🔧 自托管 —— 永久免费,你自己的密钥,你自己的机器

克隆本仓库,并用你自己的平台凭据运行。采用 MIT 许可证,无附加条件,无回传数据、无遥测。你的令牌永远不会离开你的机器。

我不得不承认:多个广告平台都要求你先申请 API 访问权限(见下表)。如果你已经拥有这些凭据——你是一家拥有 Google Ads 开发者令牌的代理商,或者一位拥有已审批 Meta 应用的开发者——自托管只需要几分钟。如果没有,那就需要为各平台自己的审批队列预留几天到几周的时间,或者直接用云版本。

无论哪种方式,代码相同、工具相同。 托管版就是这台服务器,再加上了多用户认证以及已经提前完成的审批。


自托管快速开始

git clone https://github.com/RoyAzran/mcp-ads.git
cd mcp-ads
pip install -r requirements.txt
cp .env.example .env      # fill in the platforms you use
python server.py doctor   # shows what's connected

然后将它添加到 Claude Desktopclaude_desktop_config.json)或 Claude Code.mcp.json):

{
  "mcpServers": {
    "mcp-ads": {
      "command": "python",
      "args": ["/absolute/path/to/mcp-ads/server.py"]
    }
  }
}

整个安装就完成了。让你的代理 “审计我的 Google Ads 浪费指出”,然后看它执行吧。

也可以用 Docker:

cp .env.example .env
docker compose up -d      # HTTP server on 127.0.0.1:8000, MCP endpoint at /mcp

不用 Docker 的 HTTP 模式: python server.py serve --transport http

OAuth 辅助器,适用于基于 bearer token 的平台(会打开浏览器、存储并提供刷新令牌):

python server.py auth snapchat_ads

实打实地开箱即达

自托管意味着你要拿着每个平台自己的密钥。有些可以用几分钟就给你;有些则需要你去申请。实际情况如下:

平台

操作数

你所需的条件

合理的工作量

GA4

95

Google OAuth 客户端 + refresh token

分钟到几小时

Search Console

23

同一个 Google 令牌

分钟

Tag Manager

64

同一个 Google 令牌

分钟

Google Sheets

69

同一个 Google 令牌

分钟

WordPress

约 1,800

站点 URL + Application Password

分钟

Google Ads

约 755

上面的一切 再加一个开发者令牌(Google 会检查)

1–3 周

Meta Ads

234

一个 Meta 应用;ads_management/ads_read 需要 App Review(审批前也适用于应用自己的管理员/测试者)

自己使用:几天;App Review:数周

Snapchat Ads

12

Business Manager 里的自助 OAuth 应用

几小时

Microsoft Ads

11

Entra OAuth 应用 + 开发者令牌(沙箱即时可用,生产环境需审核)

几小时到几天

TikTok Ads

35

Business API 应用审批

几周

LinkedIn Ads

26

Marketing Developer Platform 批准——个人申请通常被拒绝

通常无法获得

Meta Ad Library

7

来自 Meta ID 已验证身份的令牌

几天

Ads Transparency

7

不需要任何东西——但有下方相关说明

默认关闭

创意生成工具

7

你的 OpenAI API 密钥

分钟

如果你看到这张表就累了,那正是 云端版 存在的意义——审批都已经完成,你只需连接账户。

工具表面是怎么工作的

你的代理会为每个平台看到同一个调度器,外加 list_actions

1. list_actions(category="meta_ads_action", search="budget")
2. meta_ads_action(action="<name from step 1>", params={...})
  • 写操作创建的一切都处于暂停状态,除非你明确要求

  • 按名称区分读/写工具的角色权限(permissions.py

  • 使用 --surface full 会把每个操作都注册成独立的 MCP 工具——适合程序化客户端,对于聊天客户端则工具数量过多

NPX CLI

客户端没有 Python?CLI 是一个约 300 行的 stdio 代理(cli/),可以转发到任意 MCP Ads 服务器:

# against your self-hosted server
MCP_ADS_BASE_URL=http://127.0.0.1:8000 npx -y @marketingmcp/cli

# against the cloud (API key from mcp-ads.com/manage)
MCP_ADS_API_KEY=mcp_live_xxx npx -y @marketingmcp/cli

关于 Google Ads Transparency 的说明

tools/google_ads_transparency.py 通过以下浏览器上真正调用的接口读取 Google 公开的 Adobe 页面,这里合法的方式有:读的创作中心的 exit 这是中心。Google 为这些数据提供 API 并未公开;接口可能会在没有任何通知的情况下变更,甚至开始拒绝请求;而这种访问并不属于 Google 认可的行为。该工具族默认关闭—在阅读这个模块的 docstring 之后再去设置 GOOGLE_ADS_TRANSPARENCY_ENABLED=true;Meta Ads 工具,这里我们用到的,是 Meta 官方 API,不带有上面说明的限制条件。

安全态势

  • 凭据来自你的 .env 文件,以及可选的 Fernet 加密本地存储(MCP_ADS_SECRET_KEY)。不会真用来“回传”;遥测默认全部关闭,除非你配置自己的分析项目。

  • HTTP 模式默认认证是不认证设计(这是你的本机回环地址)。服务拒绝在公共接口上绑定,除非你设置 MCP_ADS_ALLOW_PUBLIC_BIND=true,因为持有这些凭据可能会花真钱。

  • CI 运行一个边界风控(tests/test_no_private_imports.py),任何 secret 形式的东西进入库都会失败。

请参见 SECURITY.md 了解上报。

贡献

欢迎提交 issue 和 PR——请参见 CONTRIBUTING.mdscripts/ 里的检查脚本就是审核基准:每一个都对应了一条在等环境中发生过的真实事故;在提交 PR 前运行 python scripts/check_tools_execute.py 能提前排查大部分问题。

只有一种情况我们帮不了。获取平台 API 的进入权限。那些审批队列属于 Google、Meta、LinkedIn、TikTok、Microsoft。

许可证

MIT。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Unified MCP server for managing Meta Ads, LinkedIn Ads, Google Ads, GA4, and Search Console with 89 read/write tools, multi-account support, OAuth setup, and safe dry-run mutations.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    An MCP server that gives your AI assistant read + write access to Google Ads and GA4 — with safety guardrails that prevent accidental spend.
    67
    238
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Hosted MCP server that gives AI agents read and write access to your full marketing & ecommerce stack — Google Analytics, Search Console, Google & Meta Ads, Shopify, WooCommerce, Shopware, Slack and LinkedIn. 100+ tools across 10 connectors. BYOK, OAuth 2.1.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables reading and mutating Google Ads campaigns via MCP tools, and includes structured marketer workflows for search term mining, budget optimization, and weekly reviews.
    51
    4
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RoyAzran/mcp-ads'

If you have feedback or need assistance with the MCP directory API, please join our Discord server