MAMBO

How to Connect Claude Code with the Meta Ads MCP

Step-by-step guide to connecting Claude Code with the Meta Ads AI Connectors MCP Server. What metrics you can get, how to automate reports, and why it changes the daily workflow of any media buyer.

On April 29, 2026, Meta launched Meta Ads AI Connectors: two interfaces (an MCP Server and a CLI) that wrap the entire Marketing API behind a single OAuth prompt. No Developer App to create, no App Review, and no days of waiting. You authenticate in the browser and you're connected.

In this guide, we show you how to connect Claude Code with the Meta Ads MCP Server, what metrics you can access, and how to integrate it into your daily workflow to save hours of manual work.

What is the Meta Ads MCP

The Meta Ads MCP Server is an endpoint hosted at mcp.facebook.com/ads that exposes 29 Marketing API tools. Once connected, Claude can query campaigns, ad sets, creatives, audiences, Pixel diagnostics, and Conversions API, all in natural language.

MCP or CLI?: The MCP Server is ideal for analysis and reporting (natural language queries). The CLI is better for execution (batch budget changes, test launches). The official recommendation is: MCP for analysis, CLI for execution.

Prerequisites

  • Claude Code installed (version 1.0.30 or higher)
  • A Meta Business account with at least one active ad account
  • Admin access to the ad account you want to query
  • Web browser for the OAuth flow

Step 1: Configure the MCP Server in Claude Code

Claude Code uses a configuration file to register MCP servers. Open your config file (typically at ~/.claude/claude_desktop_config.json or wherever your installation uses) and add the Meta Ads server:

{
  "mcpServers": {
    "meta-ads": {
      "url": "https://mcp.facebook.com/ads"
    }
  }
}

If you use Claude Code in the terminal, you can add the server with a single command:

claude mcp add meta-ads --transport https https://mcp.facebook.com/ads

Step 2: Authenticate with OAuth

The first time Claude Code tries to connect to the Meta server, your browser will open with a Meta Business OAuth prompt. Select the ad accounts you want to grant access to and authorize the connection.

Permissions: Only authorize the ad accounts you need to query. You can revoke access at any time from Business Settings, then Integrations in Meta Business Suite.

Once authorized, Claude Code loads all 29 MCP tool descriptions into its context. From that point on, you can make natural language queries about your campaigns.

Diagram of the OAuth authentication flow between Claude Code and the Meta Ads MCP Server, showing the 29 available tools
A single OAuth authentication enables all 29 Meta Ads MCP tools within Claude Code.

Step 3: Your first query

Try a simple query to verify the connection works:

> What's the performance summary of all my active ad accounts this week?

Claude will call the Meta MCP tools, pull data from the Insights API, and return a structured summary with spend, impressions, clicks, CTR, CPM, and CPA by account and campaign.

Metrics you can access

The Meta Ads MCP exposes the same metrics as the Marketing API. These are the main categories of accessible data:

  • Insights API, Campaign performance: Spend, impressions, clicks, CTR, CPM, CPC, CPA, ROAS by campaign, ad set, and individual ad.
  • Breakdowns, Audience breakdown: Performance segmented by age, gender, location, device, platform, and placement.
  • Pixel + CAPI, Signal diagnostics: Meta Pixel and Conversions API status: active events, event matching, signal gaps affecting delivery.
  • Budget pacing, Budget pacing: How much was spent vs. daily/weekly budget, spend projection, and overspend alerts.
  • Creative insights, Creative performance: Which creatives perform best by metric, ad fatigue, and rotation recommendations.
  • Catalog ops, Catalog operations: Feed diagnostics, broken items, out-of-stock items, and product data sync (e-commerce).

Useful query examples

Morning performance report

> Give me a summary of all my active campaigns from yesterday: spend, CPM, CTR, and CPA. Sort by CPA ascending and highlight those exceeding the $50 threshold.

CPM spike detection

> Which ad sets had a CPM increase greater than 30% in the last 7 days compared to the previous week?

Pixel and CAPI diagnostics

> Run a signal diagnostic on the "E-commerce AR" ad account. Is the Pixel firing all key events? Is CAPI sending matching data?

Creative fatigue analysis

> Which ads have been active for more than 7 days with declining CTR? Suggest which ones to rotate.

Current limitations

  • It cannot touch Meta's optimization layer (Advantage+, bidding, audience expansion). It can create campaigns and set budgets, but not influence how Meta delivers them.
  • It doesn't manage lead ads forms or CRM sync. Post-lead collection still requires manual work or third-party integrations.
  • The MCP Server requires public URLs for creative assets: it cannot reference local files. You need to host images or videos somewhere accessible.
  • MCP sessions consume input tokens for tool descriptions (approx. 55k tokens for 58 tools; Meta's 29 use less, but cost scales with concurrent sessions).

Setup time: The full connection takes between 5 and 7 minutes according to user estimates: most of it is the OAuth step. The old way (creating a Developer App + App Review) took 25+ minutes with days of waiting.

Conclusion

Connecting Claude Code with the Meta Ads MCP eliminates the historical friction of accessing the Marketing API. In less than 10 minutes, you can be querying campaign performance, diagnosing signals, and generating reports in natural language. For agencies and media buyers, the most immediate use case is the morning report: a single query replaces 30-45 minutes of exports and manual assembly in Ads Manager.

At MAMBO, we use this integration to automate weekly campaign reporting for our clients and detect anomalies before they impact performance. If you want to implement Claude Code and MCP at your company, reach out.

More from the blog