← 返回「广告 AI 连接器」目录
来源:Meta Developer Documentation · 本地归档日期:2026-07-30 · 查看官方中文页面
说明:正文基于 Meta 提供的官方 Markdown 原文保真归档;导航标题按中文菜单整理。代码、参数名与 API 标识保留原样,便于准确检索和复制。

Get started

Owning a Meta app is not a prerequisite on using the ads MCP server. For access without owning a Meta app, follow How to set up Meta ads AI connectors instead.

To use the ads MCP server with your own Meta app, follow the steps below to set up your environment and gain access.

Create or reuse a Meta developer app

  1. Go to developers.facebook.com/apps and create a new app, or open an existing app.
  2. Add the Create & manage ads with ads MCP server use case.

Authentication

The ads MCP server supports two authentication methods.

OAuth

The MCP client redirects you to the Facebook Login for Business dialog. Sign in with your Facebook account or Meta Managed Account (MMA) and approve requested permissions. No manual token setup is required.

Configure your Meta developer app redirect URL to correspond with the selected MCP client in Facebook Login for Business settings.

User access token

Generate a token using Graph API Explorer or your own OAuth flow. Request these permissions:

  • ads_mcp_management
  • ads_read
  • ads_management
  • catalog_management
  • business_management
  • pages_show_list
  • instagram_basic

Connect to ads MCP server

Server URL:

https://mcp.facebook.com/ads

Connect from Claude Code

claude mcp add --transport http --client-id <META_APP_ID> meta-ads https://mcp.facebook.com/ads

Connect from ChatGPT

  1. Set the Meta developer app redirect URL according to ChatGPT's specification.
  2. Choose OAuth as the authentication method.
  3. Enter https://mcp.facebook.com/ads as the Server URL.
  4. In Advanced OAuth Settings, enter the Meta developer app ID as the OAuth Client ID.

Connect with a user access token

For programmatic setup, pass a user access token in the Authorization: Bearer <ACCESS_TOKEN> header.

curl -i -X POST "https://mcp.facebook.com/ads" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  --data-raw '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Run your first prompts

Once connected, try:

  • “List my ad accounts.”
  • “Create a new traffic campaign in ad account .”
  • “Draft an ad set for my campaign that optimizes for link clicks.”
  • “Summarize the top-spending campaigns in over the last 30 days.”
在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →