Skip to main content
Glama
Meta Ads Launch Guard

Meta Ads Launch Guard

by dwadlane

Meta Ads Launch Guard

Launch Meta ads across 30 accounts from one Claude chat, with spend caps, paused-first launches and a human approval before anything goes live.

CI

Current as of Marketing API v27.0. Built on the MCP TypeScript SDK 1.x, protocol 2025-11-25.

flowchart LR
  C[Claude] -->|plan_bulk_launch| P[Dry-run plan]
  P -->|blocked rows| C
  P -->|ready| L[launch_plan: everything PAUSED]
  L --> H{Human approves}
  H -->|confirm + approver name| G[Guard re-checks caps]
  G -->|ok| A[publish: ACTIVE]
  G -->|over a cap| X[Refused, nothing live]
  A --> R[pacing_report and account_health]
  R -->|something wrong| K[pause_campaigns kill switch]

Quick Start

git clone https://github.com/dwadlane/meta-ads-launch-guard
cd meta-ads-launch-guard
npm install && npm run build
npm run demo      # scripted Claude flow on the local mock
npm test          # 43 tests
npm run smoke     # stdio smoke test

Add it to Claude Desktop or Claude Code:

{ "mcpServers": { "meta-ads-launch-guard": { "command": "node", "args": ["/path/to/meta-ads-launch-guard/dist/index.js"] } } }

It runs on a local mock with 30 fictional ad accounts across 3 businesses (Northside Dental, Coastal Moving Co, Peak Fitness Studios). Nothing touches Meta.

Related MCP server: Adako

Tools

Tool

What it does

list_ad_accounts

Every ad account, its business, currency and daily cap.

account_health

Spend today against the cap, disapproved ads, pacing, and what needs a look.

plan_bulk_launch

Takes a launch spec (accounts, template, budgets, creatives, audiences). Returns a dry-run plan with a total daily spend and one row per account. Creates nothing.

launch_plan

Creates the campaigns, ad sets, creatives and ads, all PAUSED, and returns ids. A retry never double-creates.

publish

Flips a launched plan to ACTIVE. Needs confirm=true and an approver name. Refuses if any account or the global total would exceed its cap.

pause_campaigns

Kill switch for one account or all.

pacing_report

Spend against budget from insights, flagging over and under pacing.

adjust_budget

Changes a budget, refusing any move over the per-edit limit (30%) or any raise that breaks a cap.

Guardrails

All in guard.json:

  • Per-account daily spend caps, plus a global cap.

  • Max budget change per edit (30%).

  • Naming convention enforced by regex.

  • Creative check: headline length, body length, missing or non-https URL.

  • Idempotent launch keys, so a retry never double-creates.

  • v27 guards: explicit targeting_automation.individual_setting.device, Product showcase set to OPT_OUT, and a check for the fields v27 rejects (lookalike_spec.country, location_spec).

Demo Excerpt

From examples/demo-output.md, a real run of npm run demo:

Plan plan_16aa9113bd: 12 accounts, total A$960.00 a day, 1 blocked.

Claude: One account is blocked. Northside Dental Parramatta: A$50.00 already live plus A$80.00 new is A$130.00, over the A$120.00 daily cap by A$10.00. The most this account can take is A$70.00.

Result: 0 created, 12 replayed. A retry creates nothing twice.

Result (refused): "Claude" is not a person. publish needs the name of the human who approved this launch.

Result: published. Approved by Sam Rivera, 12 campaigns active, A$940.00 a day.

Six hours later: 30 accounts checked, 2 flagged (Northside Dental Chatswood over at 1.7x, Coastal Moving Co Gold Coast under at 0.3x).

Risk Matrix

What could go wrong, and the guard that stops it: docs/risk-matrix.md.

Going Live

The HTTP client is already in the box. Set these and the same tools run against the real Graph API:

Variable

Meaning

META_ACCESS_TOKEN

A token with ads_management (and ads_read for insights).

META_ALLOW_LIVE

Must be 1. A token alone is not enough.

META_API_VERSION

Defaults to v27.0.

META_GRAPH_BASE_URL

Defaults to https://graph.facebook.com.

META_PAGE_ID

Facebook Page used by ad creatives.

GUARD_FILE

Path to your own guard.json.

Graph endpoints modelled by the mock and the client: GET /me/adaccounts, GET /act_<id>/campaigns, adsets, ads, POST /act_<id>/campaigns, adsets, adcreatives, ads, POST /<id> (status and daily budget) and GET /act_<id>/insights?date_preset=today.

Live use needs a Meta app that has passed app review with the ads_management permission. The live client has not been run against Meta in tests or the demo, so treat the first live run as a supervised one with low caps. Pacing uses UTC days and an even-spread estimate, and it is a flag for a person to look at.

When It Stops

It stops, and says why in plain words, when:

  • a row would put an account over its daily cap, or the plan would put all accounts over the global cap;

  • a name breaks the naming convention, or a creative is missing a link or has a headline that is too long;

  • publish is called without confirm=true, or without the name of a human approver;

  • another launch has used up the headroom since the plan was made;

  • a budget edit is bigger than 30%.

Nothing goes live on a refusal. The kill switch needs no confirmation.

License

MIT. See LICENSE. Report security issues as described in SECURITY.md.

Built by Gaps2Gains. Book a Free Discovery Call

Available Tools

8 tools
account_healthAccount healthA
Read-only

One account: spend today against its cap, disapproved ads, pacing, and a plain list of anything that needs a look.

Inputs: account_id (required).

adjust_budgetAdjust a campaign budgetA

Changes a campaign's daily budget. Refuses a move bigger than the per-edit limit in guard.json, and refuses a raise that would break a cap.

Inputs: account_id (required), campaign_id (required), daily_budget_cents (required).

launch_planLaunch a plan (everything paused)A

Creates the campaigns, ad sets, creatives and ads for a ready plan. Everything is created PAUSED. Safe to retry: a retry never creates anything twice.

Inputs: plan_id (required).

list_ad_accountsList ad accountsA
Read-only

Every ad account this token can see, with its business, currency and daily spend cap. Use the ids in plan_bulk_launch.

Inputs: business.

pacing_reportPacing reportB
Read-only

Spend so far today against what an even spread would have spent, per account, flagging over and under pacing.

Inputs: account_ids.

pause_campaignsKill switchA

Pauses every active campaign in one account, or in all accounts. Needs no confirmation, because pausing is the safe direction.

Inputs: scope (required), account_id.

plan_bulk_launchPlan a bulk launch (dry run)A
Read-only

Checks a launch spec against the guardrails and returns a dry-run plan: total daily spend and one row per account, with blocked rows explained. Creates nothing in Meta.

Inputs: spec (required).

publishPublish a launched plan (goes live)A

Flips a launched plan to ACTIVE. Without confirm=true it only previews. With confirm=true it needs the name of the human approver, and it refuses if any account or the global total would go over its cap.

Inputs: plan_id (required), confirm, approver.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    plan_bulk_launch vs launch_plan is clearly separated as dry-run vs real creation, and publish/pause_campaigns/adjust_budget each target distinct lifecycle actions. The only soft overlap is account_health vs pacing_report, which both report today's spend and pacing, though health is broader and the descriptions hint at the difference.

    Naming Consistency3/5

    Most tools follow verb_noun (list_ad_accounts, launch_plan, plan_bulk_launch, pause_campaigns, adjust_budget), but account_health and pacing_report are noun-first and publish is a bare verb. The set is still readable, but the pattern is not predictable from name alone.

    Tool Count5/5

    Eight tools is well within the healthy range and each maps to a distinct step in the guard-rail workflow: discover accounts, check health, plan, launch, publish, pause, measure pacing, adjust budget. Nothing feels padded or redundant.

    Completeness3/5

    The launch/publish guard flow is well covered, but the lifecycle is asymmetric: pause_campaigns has no corresponding resume/unpause, and there is no tool to list or re-fetch an existing plan/campaign, so publish depends on an implicit plan reference. Agents can work around these, but they are real dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Create and manage Facebook & Instagram (Meta) ad campaigns from Claude, ChatGPT & Cursor — bulk creation, multi-account, and spend guardrails. Hosted, Meta Verified Tech Provider.
      3
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Connects AI assistants to Google Ads, Meta Ads, ChatGPT Ads, TikTok Ads and LinkedIn Ads so users can query live campaign performance, budgets and audiences in the account's own currency and prepare changes as proposals that only take effect after explicit approval. Reads run immediately, while every write is staged as an approvable proposal with before/after values, and newly created campaigns, ad sets and ads start paused.
      1
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Analyze, edit and launch Meta (Facebook and Instagram) ads from Claude, ChatGPT, Cursor or Codex. Query insights and campaign health, change budgets, bids, status and targeting with undo, bulk-launch ads from a live ad's settings, and duplicate by post to keep social proof. Choose per ad account what the agent may do and what waits in the Agent Inbox for approval. Needs a paid Ads Uploader plan.
      1
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to run Meta (Facebook and Instagram) advertising: pull spend, CPA, ROAS and breakdown reports, audit account health, build and boost campaigns, ad sets and ads, and pause or adjust budgets, all starting paused until the user approves going live. Also supports brand memory, change logs and an optional daily spend cap.
      MIT