跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Meta Ads,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 分析你的 Facebook 和 Instagram 广告:按广告系列、广告组、广告、年龄、国家或版位查看花费、覆盖人数、点击次数和转化次数,还能查看广告系列、创意、受众和更改历史。经你确认后,还可以暂停或开启广告并修改预算。
试试这样问
Meta Ads 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Meta Ads、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Meta Ads + Meta Muse
让你的 AI 分析你的 Facebook 和 Instagram 广告:按广告系列、广告组、广告、年龄、国家或版位查看花费、覆盖人数、点击次数和转化次数,还能查看广告系列、创意、受众和更改历史。经你确认后,还可以暂停或开启广告并修改预算。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
META_ADS_ACCESS_TOKEN, META_ADS_ACCOUNT_ID
步骤 1 — 获取凭证
- 打开
https://developers.facebook.com/apps/creation/,使用用例 Create & manage ads with Marketing API 创建一个应用,并把它关联到你的商务资产组合。这样应用会获得ads_read、ads_management和business_management权限。 - 推荐使用永不过期的令牌:在 Business Settings(
https://business.facebook.com/settings)中打开 Users → System users,添加一个系统用户(角色选 Admin,只读则选 Employee)。在 Assign assets 中把你的广告账户分配给它(选 Manage campaigns,只读则选 View performance)。点击 Generate token,选择应用,有效期选 Never,勾选ads_read,如需修改状态和预算,再勾选ads_management。Meta 可能会先要求你验证商务资产组合(Business Settings → Security Center);完成之前,请使用第 3 步的令牌。 - 更快的测试方式:在 Graph API Explorer(
https://developers.facebook.com/tools/explorer/)中选择你的应用,获取带有ads_read和ads_management的 User Token。它只有一到两小时有效,所以请在 Access Token Debugger(https://developers.facebook.com/tools/debug/accesstoken)中打开它,点击 Extend Access Token,换成有效期 60 天的令牌。 - 把令牌粘贴到
META_ADS_ACCESS_TOKEN(以EA开头;粘贴时不要带 Bearer 一词)。把带act_前缀的广告账户 ID 填入META_ADS_ACCOUNT_ID,例如act_1234567890。Ads Manager 会在地址栏中显示这个编号(act=1234567890)。 - 安装连接器并运行
meta_ads_list_ad_accounts。它会列出令牌能访问的所有广告账户,以及各自的状态、币种和时区。
访问级别:新应用只有 Limited access(原 Standard)。这足以访问你自己企业的广告账户,但速率限制很严。其他企业的广告账户需要通过 App Review 获得 Full access(原 Advanced)。请保持 Require App Secret(App settings → Advanced)关闭:开启后,Meta 会拒绝连接器的调用。
先确认:meta_ads_update_status 用于暂停或开启广告系列、广告组或广告,meta_ads_update_budget 用于修改单日预算或总预算。两者都会立即生效并影响你的花费:开启会开始花钱,暂停会停止投放。AI 会说明对象(名称和 ID)、当前值和新值,并等你同意后再执行。只有广告、所属广告组和所属广告系列都为 ACTIVE 时,广告才会投放。预算是账户币种最小单位的整数(2000 表示 20.00 EUR);JPY 或 KRW 等币种没有更小的单位。
可读取的内容:广告账户、广告系列、含定位设置的广告组、附带未投放原因的广告、创意、自定义受众和类似受众、更改历史(谁在何时改了什么)以及效果数据。Insights 可以针对整个账户或单个广告系列、广告组、广告,查看预设时段(如过去 7 天或上个月)或最多 37 个月前的任意日期内的花费、覆盖人数、点击次数和转化次数,需要时可按天查看,并按年龄、性别、国家、地区或版位细分。
常见错误:190:令牌无效或已过期,请重新创建一个。10 或 200 到 299:缺少权限(294 表示缺少 ads_management),或令牌无权访问该广告账户。100:参数有误;如果子代码是 1487534,说明请求过大,请缩短时间范围或去掉细分维度。4、17、613、80000 和 80004 是速率限制:请等待几分钟。
该连接器不会创建任何内容:它不会创建或编辑广告系列、广告组、广告、创意或受众,不会上传媒体,也不处理潜在客户表单、像素或 Conversions API。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Muse 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Muse 以自定义连接器的形式添加远程 MCP 服务器,并通过 OAuth 登录。
- 在 Muse 中打开 Settings → Connectors,选择 Add custom connector。
- 粘贴 MCP 服务器 URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。 - Muse 会打开 AnythingMCP 的登录页面:登录并批准访问。
- 在聊天中,向 Muse 提出需要用到
Meta Ads的工具的请求。
你也可以在聊天中完成设置,适用于网页版、iOS 和 Android 应用以及 WhatsApp。给 Muse 发送这条消息:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Muse 从 Meta 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
meta_ads_list_ad_accounts | List the ad accounts the token can reach, with id (act_...), name, account_status (1 active, 2 disabled, 3 unsettled, 7 pending risk… |
meta_ads_get_ad_account | Read the ad account in META_ADS_ACCOUNT_ID: name, status, currency, time zone, amount spent, balance, spend cap and minimum daily budget |
meta_ads_list_campaigns | List the campaigns of the ad account with name, status and effective_status, objective, daily or lifetime budget (minor currency unit), bid… |
meta_ads_get_campaign | Read one campaign by id: name, status, effective_status, objective, budgets, bid strategy, special ad categories and schedule |
meta_ads_list_ad_sets | List the ad sets of the ad account with campaign_id, status, budgets, bid strategy, billing event, optimization goal, targeting and schedule |
meta_ads_list_campaign_ad_sets | List the ad sets of one campaign with status, budgets, optimization goal, targeting and schedule |
meta_ads_get_ad_set | Read one ad set by id: campaign, status, budgets, bid strategy and amount, billing event, optimization goal, full targeting spec and… |
meta_ads_list_ads | List the ads of the ad account with ad set, campaign, status, effective_status, creative id and issues_info (why an ad does not deliver) |
meta_ads_list_ad_set_ads | List the ads of one ad set with status, effective_status, creative and issues_info |
meta_ads_get_ad | Read one ad by id: name, ad set, campaign, status, effective_status, creative and issues_info |
meta_ads_get_account_insights | Performance of the whole ad account for a period: impressions, reach, frequency, clicks, CTR, CPC, CPM, spend, actions (conversions by… |
meta_ads_get_insights | Performance of one campaign, ad set or ad for a period, with the same metrics, periods, breakdowns and levels as… |
meta_ads_list_ad_creatives | List the ad creatives of the ad account with name, title, body, call to action, link, image and thumbnail URLs, video id and the object… |
meta_ads_get_ad_creative | Read one ad creative by id (meta_ads_get_ad shows the creative id of an ad): texts, call to action, link, image and thumbnail, video and… |
meta_ads_list_custom_audiences | List the custom and lookalike audiences of the ad account with subtype (CUSTOM, WEBSITE, LOOKALIKE, ENGAGEMENT and others), approximate… |
meta_ads_list_account_activities | Change history of the ad account: who changed what and when (event_type such as update_campaign_run_status or update_ad_set_budget… |
meta_ads_update_status | Pause or activate a campaign, ad set or ad |
meta_ads_update_budget | Change the daily or lifetime budget of a campaign (with campaign budget) or of an ad set (with ad set budgets) |
示例提示
- “我们上个月在 Facebook 和 Instagram 上花了多少钱?哪个广告系列的单次购买成本最低?”
- “按年龄、性别和版位细分过去 30 天的花费和点击次数。”
- “我们哪些广告现在没有投放?原因是什么?”
- “把我们效果最好的广告系列的单日预算提高 20%,但修改前先给我看当前预算和新预算。”
FAQ
Muse 在哪些地区可用? Meta 目前在美国和加拿大提供 Muse,可在网页版、iOS 和 Android 应用以及 WhatsApp 中使用。
Meta 会审核这个连接器吗? 不会。Meta 不审核自定义连接器。Muse 只能看到你在 AnythingMCP 中为此 MCP 服务器启用的工具,你也可以随时在 Settings → Connectors 中断开它。
下一步
这份指南对你有帮助吗?