Connect Meta Ads to Claude & GPT: MCP & CLI Setup Guide
Farhan Rakhangi
Co-Founder, Bombay Media
Why Meta's AI Connectors Change How Agencies Run Ads
On April 29, 2026, Meta quietly shipped something that most agency owners missed in their feed: Ads AI Connectors — a native integration layer that puts your Meta Ads data directly inside AI models like Claude and GPT-4o. If you're already using AI tools to scale your marketing, this integration is the missing piece that connects your ad account directly to the AI layer.
No more exporting CSVs, copying campaign data into ChatGPT, or building custom API wrappers. The connector creates a live, authenticated bridge between your Meta Ads account and the AI model of your choice.
There are two ways to connect: the MCP route (Model Context Protocol, for chat interfaces like Claude Desktop or Claude.ai) and the CLI route (a command-line tool for scripted workflows and automation pipelines). Both use the same underlying Meta Marketing API — they differ in interface and use case.
For agency owners, media buyers, and growth marketers, this is one of the most operationally significant updates Meta has shipped in years. This guide covers both routes end-to-end: prerequisites, setup steps, real use cases, and how to decide which route fits your team.
Key Takeaways
- Meta launched Ads AI Connectors on April 29, 2026 — native MCP and CLI integration with Meta Marketing API
- MCP route works inside Claude Desktop and GPT-4o interfaces; CLI route works in terminal and automation pipelines
- Both routes require a Meta system user token with
ads_readandads_managementpermissions- MCP suits ongoing analysis and client reporting; CLI suits scheduled, scripted workflows
- Setup time: under 30 minutes for either route once you have a system user token
What Is the Model Context Protocol (MCP) and Why Does It Matter for Ads?
MCP is an open protocol developed by Anthropic that lets AI models connect to external tools and data sources through a standardized interface. Instead of an AI model being limited to its training data, MCP-connected models can read live data, execute actions, and return structured results — all within the same conversation window.
According to Anthropic's documentation, MCP adoption grew over 400% in the six months following its public release, with advertising and marketing data connectors among the top three use categories by developer registrations.
For Meta Ads specifically, MCP means your AI assistant can answer questions like "Which ad sets had the worst cost-per-lead last week?" or "Draft three new headline variations for our best-performing campaign" — using your actual account data, not hypothetical examples.
Agency insight: Most media buyers spend 2–4 hours per week manually pulling data and building client reports. MCP-connected AI models collapse that to 15–20 minutes of prompted queries — not because AI is faster at math, but because it eliminates the copy-paste handoff between Ads Manager, spreadsheets, and reporting docs.
Prerequisites: What You Need Before You Start
Both integration routes share the same prerequisites. Meta's Marketing API documentation covers the full permissions reference if you need to go deeper on any step. Get these right before touching any install commands — skipping them is the most common cause of authentication failures.
1. A Meta Business Account with Admin Access
You need admin-level access to a Meta Business Manager account. If you're an agency, this should be the agency Business Manager, not a client's. You'll create a system user inside this Business Manager and assign it access to the relevant ad accounts.
2. A System User Token
This is the most important step. A system user is a non-human Meta Business user — essentially a service account — that the AI connector authenticates as. Using a personal user token is against Meta's API terms of service and will result in your token being revoked.
To create a system user:
- Go to Meta Business Manager → Settings → Users → System Users
- Click Add and give it a name (e.g., "Claude AI Connector")
- Set role to Admin (required for write operations; Employee works for read-only)
- Click Generate New Token
- Select your app (or create a new one in Meta for Developers)
- Grant permissions:
ads_read,ads_management,business_management - Set token expiry to Never (for automation use cases)
- Copy and store the token securely — it won't be shown again
3. Ad Account Access for the System User
After creating the system user, assign it to the ad accounts you want the AI to access:
- Business Manager → Accounts → Ad Accounts
- Select the ad account → Add People
- Add your system user with Advertiser role (minimum for campaign management)
4. Node.js 18+ (for MCP route) or Python 3.9+ (for CLI route)
The MCP server runs on Node.js. The CLI tool is Python-based. Install whichever matches your route before proceeding.
How Do You Set Up the Meta Ads MCP Integration?
The MCP route connects your Meta Ads account to Claude Desktop, Claude.ai (with MCP support), or any MCP-compatible AI interface. Once set up, you interact with your ad data through natural language — no dashboards, no exports.
Step 1: Install the Meta Ads MCP Server
Meta provides an official MCP server package through npm:
npm install -g @meta/ads-mcp-server
Verify the install:
meta-ads-mcp --version
Step 2: Configure Your System User Token
Create a configuration file at ~/.meta-ads-mcp/config.json:
{
"accessToken": "YOUR_SYSTEM_USER_TOKEN",
"businessId": "YOUR_BUSINESS_MANAGER_ID",
"adAccountIds": ["act_XXXXXXXXX", "act_XXXXXXXXX"]
}
Replace the placeholders with your actual token and IDs. You can find your Business Manager ID in Business Settings → Business Info.
Step 3: Add the MCP Server to Claude Desktop
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%Claudeclaude_desktop_config.json
Add the Meta Ads server under mcpServers:
{
"mcpServers": {
"meta-ads": {
"command": "meta-ads-mcp",
"args": ["--config", "~/.meta-ads-mcp/config.json"],
"env": {}
}
}
}
Step 4: Restart Claude Desktop and Verify
Restart Claude Desktop. You should see a Meta Ads icon appear in the tool tray. Test the connection with a simple query:
"Show me my top 5 campaigns by spend for the last 7 days."
If the connection is healthy, Claude will return a structured table with campaign names, spend, impressions, and results pulled live from your account.
What we found at Bombay Media: The first query after setup almost always surfaces something you didn't know — not because the data changed, but because you're asking in natural language instead of navigating preset dashboard views. We asked "which audiences have the worst cost-per-lead this month?" and found an audience segment we'd forgotten to pause 3 weeks earlier, burning $340/week with zero conversions.
How Do You Set Up the Meta Ads CLI Integration?
The CLI route is a command-line tool that lets you interact with your Meta Ads account via terminal commands and piped outputs. It's built for scripted workflows, cron jobs, and teams that prefer automation pipelines over conversational interfaces.
Step 1: Install the Meta Ads CLI Tool
pip install meta-ads-cli
Or with pipx for isolated installation (recommended):
pipx install meta-ads-cli
Step 2: Authenticate with Your System User Token
meta-ads auth --token YOUR_SYSTEM_USER_TOKEN --business-id YOUR_BUSINESS_ID
The CLI stores credentials in ~/.meta-ads/credentials. Verify authentication:
meta-ads accounts list
This should return a list of ad accounts your system user has access to.
Step 3: Run Your First Query
Pull campaign performance for the last 30 days:
meta-ads campaigns report --account act_XXXXXXXXX --date-range last_30_days --fields campaign_name,spend,impressions,clicks,cpc,cpm,results --format json
Pipe the output to a file or directly into a Python script for further processing:
meta-ads campaigns report --account act_XXXXXXXXX --date-range last_7_days --format json | python3 analyze_campaigns.py
Step 4: Connect CLI Output to an AI Model
The CLI's JSON output can be piped directly into an AI model via the Anthropic or OpenAI CLI. Example using the Anthropic CLI:
meta-ads campaigns report --account act_XXXXXXXXX --date-range last_7_days --format json | claude -p "Analyze this campaign data and identify the top 3 optimization opportunities. Format as bullet points."
This is the pattern that makes the CLI route powerful for automation: pull data, pipe to AI, get structured output, pipe to Slack or a reporting doc.
MCP vs CLI: Which Route Is Right for Your Agency?
Both routes access the same Meta Marketing API data. The difference is interface and workflow integration.
| Factor | MCP Route | CLI Route |
|---|---|---|
| Interface | Conversational (Claude Desktop, GPT) | Terminal / scripts |
| Best for | Ad-hoc analysis, client Q&A, strategy | Scheduled reporting, automation |
| Technical skill needed | Low–Medium (config file setup) | Medium (command line comfort) |
| Output format | Natural language + tables | JSON, CSV, piped to scripts |
| Scheduling | Manual (on-demand queries) | Cron jobs, n8n, Make.com |
| Best AI model pairing | Claude (MCP-native), GPT-4o | Any model via API |
| Write operations | Yes (via MCP tool calls) | Yes (CLI write commands) |
Most mature agency setups end up using both: MCP for the media buyer doing live campaign analysis and client calls, CLI for the operations team running automated Monday morning reports. The two routes complement each other rather than compete. For agencies deciding between ad platforms, our Facebook Ads vs Google Ads guide for coaches covers where Meta fits in a full paid media mix.
What Are Agencies Actually Doing With Meta Ads AI Connectors?
Beyond the setup, the value of Meta Ads AI Connectors comes from the workflows it unlocks. Here are the use cases we've validated at Bombay Media and seen across the agency community.
1. Conversational Campaign Audits
Instead of exporting 90 days of data and building a pivot table, a media buyer opens Claude Desktop and asks:
"Compare our CPL across all active campaigns for the last 90 days. Which campaigns are trending up and which are declining? What's the likely cause?"
Claude pulls the data, runs the trend analysis, and surfaces root causes — ad fatigue, audience saturation, seasonal patterns — in plain English. A 3-hour audit becomes a 10-minute conversation.
2. Automated Weekly Client Reports
With the CLI route, agencies set up a cron job that runs every Monday morning:
# cron: 0 8 * * 1
meta-ads campaigns report --account act_XXXXXXXXX --date-range last_7_days --format json | claude -p "Write a client-facing weekly performance summary. Highlight wins, flag concerns, and suggest 2 action items. Tone: professional but direct." > /reports/weekly-$(date +%Y-%m-%d).md
The output drops into a shared folder, ready for the account manager to review and send. No analyst hours, no template-filling.
3. Creative Brief Generation from Performance Data
Pull your top-performing ad creative data, then ask Claude to reverse-engineer why it worked and generate a brief for the next batch. This pairs directly with a high-ticket coaching funnel strategy — the AI can map creative insights back to funnel stage.
"Here are my top 5 ads by click-through rate this month. Analyze the patterns in the ad copy and creative direction. Then write a brief for 3 new ad variations that apply those patterns to our next offer."
4. Budget Reallocation Recommendations
Ask Claude to analyze spend distribution against results and recommend reallocation:
"I have $15,000/month in total ad spend. Here's the current allocation by campaign. Based on CPL and conversion rate data, how would you redistribute this budget to maximize leads at or below $45 CPL?"
Claude returns a specific allocation table with reasoning — which it could not do reliably before it had access to your live account data.
Troubleshooting Common Setup Issues
Most setup failures fall into three categories. Here's how to resolve each.
Authentication Errors
Error: "Invalid OAuth access token"
- Token was generated for a personal user, not a system user → create a system user token
- Token expired → regenerate with "Never" expiry setting
- Wrong permissions → ensure
ads_readandads_managementare both granted
Error: "User does not have permission to access this ad account"
- System user not added to the ad account → go to Business Manager → Ad Accounts → Add People
- Role too low → system user needs at least Advertiser role for write operations
MCP Connection Failures
Claude Desktop shows no Meta Ads tools in tray
- Config file path is wrong — double-check the claude_desktop_config.json path for your OS
- JSON syntax error in config — validate with a JSON linter before restarting
- MCP server not in PATH — run
which meta-ads-mcpto confirm it's accessible
Queries return empty results
- Ad account ID in config uses wrong format — must include
act_prefix (e.g.,act_123456789) - Date range falls outside account history — try a shorter range first
CLI Data Issues
Report returns fewer fields than expected
- Not all fields are available at all breakdowns — check Meta Marketing API docs for field compatibility
- Some fields require insight-level permissions — add
read_insightspermission to your system user token
How Should You Secure Your Meta Ads API Tokens?
Your system user token has access to your Meta Ads account — treat it with the same security as a password.
- Never commit tokens to git — use environment variables or a secrets manager (1Password, Doppler, AWS Secrets Manager)
- Use environment variables in CLI workflows:
export META_ADS_TOKEN=your_token, then reference$META_ADS_TOKENin scripts - Rotate tokens quarterly even if set to "Never expire" — generate a new one, update configs, revoke the old one
- Create separate system users per integration — one for Claude MCP, one for CLI automation. Easier to audit and revoke individually
- Scope permissions tightly — if a workflow is read-only (reporting), create a system user with only
ads_readandread_insights
What's Coming: Where Meta's AI Integration Is Heading
Meta's April 2026 launch is version 1 of what's clearly a longer roadmap. Based on the API structure and Meta's stated direction in their developer blog, the next likely additions include:
- Creative asset access via MCP — pulling ad creative, video files, and image assets directly through the connector for AI-assisted creative analysis
- Audience segment creation — natural language instructions to build Custom Audiences and Lookalike Audiences from within Claude or GPT
- Cross-platform connectors — Meta has indicated that the connector architecture is designed to support WhatsApp Business API and Instagram organic data in future releases
- Webhook-triggered AI actions — performance thresholds (e.g., CPL exceeds $X) trigger AI analysis and optional automated responses
Our read on the roadmap: The MCP architecture Meta chose is deliberately model-agnostic. This isn't a Claude-exclusive or GPT-exclusive integration — it's an industry standard. That means any AI model that supports MCP can connect to Meta Ads. Agencies that set up the connector now will be positioned to swap or upgrade AI models without rebuilding their workflows.
Frequently Asked Questions
What are Meta Ads AI Connectors?
Meta Ads AI Connectors are a native integration layer launched by Meta on April 29, 2026, that lets AI models like Claude and GPT-4o read and manage your Meta Ads account data directly. There are two routes: MCP (Model Context Protocol), which works inside AI chat interfaces, and CLI, which is a command-line tool for direct ad management tasks.
Do I need to be a developer to use Meta Ads AI Connectors?
The CLI route is accessible to non-developers with some terminal comfort — it's a few install commands and an access token. The MCP route requires slightly more technical setup (running a local MCP server), but Meta's documentation walks through every step. Most agency ops managers and senior media buyers can set it up in under 30 minutes.
Is the Meta Ads MCP integration free?
The Meta Ads AI Connector itself is free — you only pay for the AI model you connect it to (Claude, GPT-4o, etc.). For most agency use cases — campaign analysis, reporting, optimization recommendations — monthly AI costs run $20–$80 depending on usage volume.
What can Claude or GPT actually do inside Meta Ads via MCP?
Via MCP, connected AI models can pull campaign performance data, read audience insights, generate optimization recommendations, draft ad copy variations, create campaigns from natural language instructions, and export structured reports — all without leaving the chat interface. They cannot publish ads without your explicit command.
Which is better: the MCP route or the CLI route?
MCP suits agencies doing ongoing analysis and client reporting — the conversational interface makes it fast for ad-hoc questions. CLI suits teams that want scripted, repeatable workflows integrated into existing automation pipelines. Many agencies use both: MCP for strategic queries, CLI for scheduled reporting.
The Bottom Line for Agency Owners
Meta Ads AI Connectors aren't a feature for AI enthusiasts — they're a workflow upgrade for agencies that bill time on reporting, analysis, and optimization tasks. The setup is 30 minutes. The time savings start immediately.
If your team spends more than 2 hours per week on Meta Ads reporting and campaign analysis, this integration pays for itself in the first week. If you're running ads for coaching clients, course creators, or service businesses where CPL and ROAS are the metrics that matter, having Claude or GPT read your actual account data changes the quality of every strategic conversation you have.
Start with the MCP route if you want to see results fast. Add the CLI route when you're ready to automate.
At Bombay Media, we help coaching businesses and service brands set up AI-powered ad systems — not just as a tool, but as a core part of how campaigns are managed and scaled. If you want to explore what this looks like for your accounts, get in touch with our team.