All integrations

Meta Ads

Connect Claude, ChatGPT or Cursor to Meta Ads via MCP. OAuth setup, 36 campaign and insights tools, and a governed private gateway — not generic Meta Marketing API docs.

OAuth 36 tools

Overview

Connect Meta Ads to give AI clients access to your Facebook and Instagram advertising through the Meta Marketing API. This is the hosted Meta Ads MCP integration for Claude, ChatGPT, Cursor, and other MCP clients — manage campaigns, ad sets, ads, creatives, audiences, and performance insights without building a custom Meta Ads API connector.

Common use cases

  • Meta Ads MCP for agencies — list ad accounts, inspect campaign structure, and pull insights across client accounts from one governed gateway.
  • Campaign operations — create or update campaigns, ad sets, creatives, and ads; pause underperformers or scale budgets from chat.
  • Audience and targeting research — search geo locations and interests, estimate reach, and manage custom audiences.
  • Cross-channel reporting — combine get-*-insights-tool output with Google Analytics or Search Console in private-gateway workflows.

Prerequisites

  • A Meta Business Manager account with admin access to at least one ad account
  • A Meta Developer App with the Marketing API product and ads_management permissions
  • A stackgate.ai account

Getting credentials

  1. Sign in to stackgate.ai.
  2. Go to Integrations and open Meta Ads.
  3. Click Activate, then Connect Meta Ads.
  4. Approve the requested OAuth permissions — stackgate.ai stores a long-lived access token securely.
  5. Choose which ad accounts AI clients can access and set a default ad account on the integration page.

Add https://stackgate.ai/oauth/meta-ads/callback as a valid OAuth redirect URI in your Meta Developer App Facebook Login for Business settings.

Create a Facebook Login for Business configuration (Configurations → Create configuration → User access token) with these permissions: ads_management, ads_read, business_management, pages_show_list, pages_read_engagement, pages_manage_ads, instagram_basic, and email. Copy the configuration ID into META_ADS_CONFIG_ID in your stackgate.ai environment — Business Login apps cannot request those permissions via a plain OAuth scope string.

No manual API keys are required for the standard connect flow.

Using with AI clients

  • Dedicated endpoint: POST /mcp/meta-ads with a Sanctum bearer token
  • Private gateway: one config for all integrations — use meta-ads__* namespaced tools

Example prompts:

  • List my Meta ad accounts and show spend for the default account this month.
  • Which campaigns are active on ad account act_123?
  • Create a paused traffic campaign called "MCP test" with a daily budget of $20.
  • Pull ad set insights for the last 7 days and summarize top performers.
  • Search targeting interests related to "SaaS founders" and estimate reach in Denmark.

Key tools: get_connection_info, list_ad_accounts, list_campaigns, get_campaign_insights, create_campaign, search_targeting_interests.

See Documentation for HTTP authentication and private gateway setup.

Troubleshooting

  • Invalid Scopes on Facebook login — your Meta app uses Facebook Login for Business. Create a Business Login configuration with the permissions above and set META_ADS_CONFIG_ID; do not rely on scope-only OAuth.
  • 422 integration not configured — complete the OAuth connect flow in My Integrations.
  • Auth errors after connecting — disconnect and reconnect Meta Ads from the integration page.
  • 429 rate limit errors — Meta enforces per-ad-account API limits. Reduce request volume or spread calls over time.
  • Instagram creatives fail — ensure the Facebook Page is linked to an Instagram professional account and pass instagram_user_id (Marketing API v22+) on creatives.
  • Missing ad accounts — confirm you have admin access in Business Manager and reconnect to refresh the account list.

Available tools

  • create_ad_creative

    Create a Meta ad creative.

  • create_ad_set

    Create a Meta ad set (defaults to PAUSED).

  • create_ad

    Create a Meta ad (defaults to PAUSED).

  • create_campaign

    Create a Meta campaign (defaults to PAUSED).

  • create_custom_audience

    Create a Meta custom audience.

  • delete_ad_set

    Archive a Meta ad set (status DELETED).

  • delete_ad

    Archive a Meta ad (status DELETED).

  • delete_campaign

    Archive a Meta campaign (status DELETED).

  • get_account_insights

    Get performance insights for a Meta ad account.

  • get_ad_account

    Get details for a Meta ad account.

  • get_ad_creative

    Get a Meta ad creative by ID.

  • get_ad_insights

    Get performance insights for a Meta ad.

  • get_ad_preview

    Generate a preview for a Meta ad or creative.

  • get_ad_set_insights

    Get performance insights for a Meta ad set.

  • get_ad_set

    Get a Meta ad set by ID.

  • get_ad

    Get a Meta ad by ID.

  • get_campaign_insights

    Get performance insights for a Meta campaign.

  • get_campaign

    Get a Meta campaign by ID.

  • get_connection_info

    Confirm connected Meta user and default ad account.

  • get_custom_audience

    Get a Meta custom audience by ID.

  • get_reach_estimate

    Estimate audience reach for a targeting spec.

  • list_ad_accounts

    List ad accounts accessible to the connected Meta user.

  • list_ad_creatives

    List ad creatives on a Meta ad account.

  • list_ad_sets

    List ad sets on a Meta ad account.

  • list_ads

    List ads on a Meta ad account.

  • list_campaigns

    List campaigns on a Meta ad account.

  • list_custom_audiences

    List custom audiences on a Meta ad account.

  • list_pages

    List Facebook Pages the connected user manages.

  • list_pixels

    List Meta pixels on an ad account.

  • search_geo_locations

    Search Meta geo targeting locations.

  • search_targeting_interests

    Search Meta ad interest targeting options.

  • update_ad_creative

    Update a Meta ad creative.

  • update_ad_set

    Update a Meta ad set.

  • update_ad

    Update a Meta ad.

  • update_campaign

    Update a Meta campaign.

  • update_custom_audience

    Update a Meta custom audience.

MCP endpoint: https://stackgate.ai/mcp/meta-ads (HTTP) or via the private gateway.