Connect Meta Ads to Claude Code

Read Meta ad accounts, campaigns, ad sets, ads, audiences and insights, and pause a campaign. Add Toolspoke to Claude Code once and it can use 10 Meta Ads actions. Your Meta Ads credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Meta Ads and connect it

    Add Meta Ads to a project in your Toolspoke workspace.

    Press connect and sign in to Meta Ads. Toolspoke keeps the token encrypted and refreshes it when it expires, so there is nothing to copy and nothing to rotate by hand.

  3. Choose what Claude Code may do

    All 10 actions start on. Switch off the one action that changes something in Meta Ads, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Meta Ads actions that only read, so they are safe to try first.

  • List the ad accounts the signed-in user can reach, with their status, currency, time zone and lifetime spend
  • Fetch one ad account's configuration, name, status, currency, time zone and owning business
  • List an ad account's campaigns with their objective, status, budget and bid strategy
  • Fetch one campaign by ID, with its objective, budget, bid strategy, schedule and special ad categories

What Claude Code can do in Meta Ads

9 actions read and one deletes or permanently changes something.

Reads

  • List ad accounts

    List the ad accounts the signed-in user can reach, with their status, currency, time zone and lifetime spend. Call this first when you do not know which account to report on, the `id` it returns (act_1234567890) is what every other action here wants.

  • Get ad account

    Fetch one ad account's configuration, name, status, currency, time zone and owning business. Read the currency and time zone from here before interpreting any spend figure or date range, because insights are reported in the account's own currency and cut on its own time zone.

  • Get account spend

    Read an ad account's billing position: lifetime amount spent, the account spend cap, the outstanding balance and how it is funded, all in the account's own currency. This answers "how much has this account spent and how much room is left", which the insights actions cannot, they report delivery over a window, not the account's ledger. Amounts come back as minor units (cents) in the account currency.

  • List campaigns

    List an ad account's campaigns with their objective, status, budget and bid strategy. Filter by effective_status to see only what is live, note that effective_status is Meta's resolved state (a campaign can read ACTIVE while every ad set under it is paused), whereas status is what was set on the campaign itself.

  • Get campaign

    Fetch one campaign by ID, with its objective, budget, bid strategy, schedule and special ad categories. Budgets are minor units (cents) of the ad account's currency, and start_time and stop_time are read-only here, scheduling lives on the ad sets.

  • List ad sets

    List an ad account's ad sets, the layer that carries the budget, the schedule, the optimisation goal and the targeting. Pass campaign_only_fields false only if you actually need the full targeting object, which is large.

  • List ads

    List an ad account's individual ads with the ad set and campaign each belongs to, plus its review state. Use effective_status to find ads that are DISAPPROVED or WITH_ISSUES, which is the usual reason a live campaign stops delivering.

  • Get insights

    The reporting action. Run a delivery report against an ad account, a campaign, an ad set or a single ad, and break it down however you need. Pass the object's own ID as object_id, act_1234567890 for a whole account, or a campaign, ad set or ad ID. `level` decides how rows are grouped, not what is queried: object_id=act_… with level=campaign gives one row per campaign in that account. Choose a window with either date_preset or start_date and end_date together; supply neither and Meta reports its own default of the last 30 days. start_date without end_date sends no window at all, because half a range is not a range. Common metrics: impressions, clicks, spend, reach, frequency, cpc, cpm, ctr, actions, cost_per_action_type, purchase_roas. Only documented breakdown combinations are accepted; Meta rejects arbitrary ones, and video metrics cannot be combined with region or hourly breakdowns.

  • List custom audiences

    List the custom audiences on an ad account by name, with their approximate size band, how they were built and whether they are ready to use. Deliberately names only: this returns the audience definitions and counts, never the people in them, and Meta does not expose audience membership through this edge at all. operation_status tells you whether an audience is still building; delivery_status tells you whether it is large enough to deliver against.

Deletes or permanently changes

  • Pause campaign

    Pause a campaign. Delivery stops and spend stops with it, immediately and for real people who were mid-funnel, an audience that was being retargeted simply stops seeing the ads. It is reversible in the Ads Manager by setting the campaign back to ACTIVE, which this connector deliberately cannot do: nothing here can start spend, only stop it. Confirm the campaign ID with get_campaign before calling.

Meta Ads in Claude Code: questions

Does Claude Code see my Meta Ads credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Meta Ads?

Yes. Each of the 10 actions can be switched off for a project. Turn off the one that changes something and Claude Code can only read.

Will 10 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Meta Ads action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Meta Ads call does not run in a sandbox, so it bills nothing.

Try Meta Ads in Claude Code

Free to start, and tool calls cost nothing on any plan.