Connect Meta Ads to Claude Code

Meta Ads in Claude Code

Claude Code reaches the Meta Ads accounts of one Adrails workspace through the MCP server, from the terminal, in the project you are working in. It reads ad accounts, campaigns, ad sets, ads and their results, with the Pages and pixels an ad needs. Every launch, pause or budget change it prepares is a proposal you apply in Adrails, never something Claude Code does on its own.

Reviewed Oct 4, 2026

Meta Ads tools

What Claude Code can ask Adrails about Meta Ads

What Claude Code can ask Adrails about Meta Ads
ToolWhat it returnsExample question
reporting_overviewSpend, attributed revenue and named conversion events for the connected accounts, each in its latest synchronized window or over an exact period of at most 93 daysWhat did every account spend last month, and what did it return?
performance_periodOne account's spend, results, revenue, ROAS, CPA, CTR, CPC, CPM, reach and frequency over an exact date range, at the account, campaign, ad set or ad level, with a second range to compareCompare last week with the week before at the ad set level on the main account.
performance_diagnoseTwo equal past periods of one Meta account compared from its saved snapshot: coverage, changes, facts, unknowns and what to verify nextWhy did CPA rise in September compared with August?
campaigns_structureHow the account is built from the last sync: campaigns with status, budget and bidding, their ad sets, and ads with format, copy, final URL and reviewShow me the Prospecting campaign with its ad sets and ads.
creative_insightsMeta ads grouped by the image or video they use, across ads and accounts: performance, winners, fatigue, repeated use and missing metadataWhich creatives are fatiguing across my accounts?
budget_recommendMaintain, increase, reduce or investigate for each campaign or ad set that owns a budget, from the latest two complete seven-day windows, with no amount suggestedWhich budgets should I raise or cut this week?
findings_reviewWhat the rule engine found on the selected campaigns, each finding with its evidence, snapshot date, objective, currency and severityWhat did the rules flag on my campaigns since the last sync?
launch_briefWhat a clean Meta launch still needs, as questions with options: account, objective, pixel and event, countries, budget, dates, Page, link and copy; Adrails keeps the answers for this connectionI want a Sales campaign for France from this Drive folder: what is still missing?

From the Adrails MCP tools reference and the Meta Ads integration documentation on 4 October 2026.

01

What Claude Code reads from Meta Ads

Meta Ads is connected once in Adrails, under Ad accounts, by signing in with the Facebook profile that can access your Business Portfolio and switching on the ad accounts to work with. Adrails reads ad accounts, campaigns, ad sets, ads and their results, with the Pages and pixels an ad needs, and Claude Code reaches the same data through the MCP server, with your sign-in and inside the one workspace you chose.

In Claude Code, the Meta Ads reads come from 8 tools: reporting_overview, performance_period, performance_diagnose, campaigns_structure, creative_insights, budget_recommend, findings_review and launch_brief. The table above says what each one returns and gives a question to type as it is. Every result comes back twice, as exact data for the model and as a readable table for you, so a figure Claude Code states can be traced to the call that produced it.

02

Connect Claude Code

Claude Code adds remote MCP servers from the command line. By default the server is added for the current project only; --scope user adds it for every project, and --scope project writes it to a .mcp.json file at the project root that your team can share through version control. If the browser does not open for the sign-in, copy the address Claude Code prints and open it yourself.

Every client uses the same server URL, https://adrails.ai/api/mcp, and the same sign-in: Claude Code registers itself, you sign in to Adrails, then choose the workspace and the permissions on the consent screen. Meta Ads needs nothing on the Claude Code side, since it is already connected in that workspace under Ad accounts.

  • 1. From your project directory, run claude mcp add --transport http adrails https://adrails.ai/api/mcp
  • 2. In Claude Code, run /mcp, select adrails and authenticate
  • 3. Your browser opens Adrails: sign in, choose the workspace and the permissions, and choose Allow access
  • 4. Return to Claude Code and ask your first question

03

Three questions to start with

Ask in your own words: Claude Code picks the tool, Adrails returns the figures, and Claude Code's model does the reasoning, so a tool call uses no agent credit. Each result carries the exact data in structuredContent.result and the same figures as readable tables.

A question can be narrowed to some of the workspace's ad accounts with accountIds, never widened to accounts outside it. A result is at most 256,000 bytes, so a long period at the ad level is asked for in shorter ranges or one campaign at a time.

  • How did my Meta accounts do last week compared with the week before?
  • Which ads have run the longest on the same creative, and are they fatiguing?
  • Prepare a 20% budget increase on my best campaign, with the figures behind it.

04

What happens when you ask for a change

No tool creates, edits, pauses, switches on or rebudgets a campaign, ad set or ad by itself. In Claude Code, campaigns_launch builds the campaign, ad sets and ads of a complete launch_brief, all paused; campaigns_change_budget raises or lowers a daily budget by an amount or a percentage, at most 30% in one change; campaigns_pause pauses a campaign, ad group or ad by the ID an earlier read returned.

Then campaigns_set_status pauses or resumes one entity and measures the result after 24 hours, 3 days and 7 days; campaigns_duplicate_to_draft duplicates a campaign paused, replacing one source ad with 3 to 5 copy variants if you ask; campaigns_split_test creates a split test from a running ad set or ad, with one to three new variants that change one variable, paused. Each of them returns a proposal: a preview of the exact change and a link to the Review advertising change page in Adrails, where you, signed in as an owner or admin of the workspace, apply it or decline it. Adrails reads Meta Ads again first and applies the change once, or blocks it if the entity moved in the meantime.

A launch is built paused, switching it on is a second proposal that lists every budget that starts spending, an applied change can be undone while the platform still matches what Adrails wrote, and a proposal expires 30 minutes after it is prepared. Allowing the tool call in Claude Code is Claude Code's own permission, not a decision on the change: the proposal waits on its page in Adrails until an owner or admin applies or declines it.

05

Permissions, cadence and limits

Read workspace data is required and covers every ad account of the workspace; Prepare advertising changes is a separate permission that only an owner or admin can grant, and a permission never goes beyond your role. A member who connects Claude Code reads Meta Ads but sees no write tool.

Structure, findings and overviews come from the account's last synchronization, and performance_period reads an exact date range from Meta. accounts_list shows each account's last snapshot, and an owner or admin who granted Manage integrations can queue a refresh with meta_sync. If a change is refused for a missing permission, reconnect Meta from Ad accounts so it asks again for ads_management.

Calls on one connection run one at a time, at most 60 a minute per access token, and a connection works in the one workspace you chose at consent: to work in another, connect Claude Code again and choose it. Revoke Claude Code under Your connections on the MCP page in Adrails; removing the server in Claude Code does not revoke it there.

FAQ

Common questions

Does Claude Code need an API key for Meta Ads?

No. Meta Ads is connected once in Adrails, under Ad accounts, by signing in with the Facebook profile that can access your Business Portfolio and switching on the ad accounts to work with. Claude Code signs in to Adrails with OAuth, with no client ID or secret to copy, and tool results never contain provider credentials or Adrails tokens.

Can Claude Code change my Meta Ads data?

Not by itself. Claude Code prepares the exact change, and an owner or admin signed in to Adrails applies it from the Review advertising change page; the prompt Claude Code shows in the terminal before a tool call is its own setting and applies nothing.

How fresh is the Meta Ads data?

Structure, findings and overviews come from the account's last synchronization, and performance_period reads an exact date range from Meta. accounts_list shows each account's last snapshot, and an owner or admin who granted Manage integrations can queue a refresh with meta_sync.

Can I connect several Meta Ads accounts?

Yes. You can connect several Facebook profiles and choose which ad accounts enter the workspace; a Claude Code connection covers every one of them, and accountIds narrows a call to some.