Meta Ads MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "META_ADS_ACCESS_TOKEN=${META_ADS_ACCESS_TOKEN}" -e "META_AD_ACCOUNT_ID=${META_AD_ACCOUNT_ID}" meta-ads -- npx -y @mikusnuz/meta-ads-mcp
Required:META_ADS_ACCESS_TOKENMETA_AD_ACCOUNT_ID+ 4 optional
README.md

MCP server for Meta Marketing API v25.0

meta-ads-mcp

MCP server for the Meta Marketing API v25.0 — 123 tools for managing Facebook & Instagram ad campaigns, audiences, creatives, insights, catalogs, and more.

When to Use

Use this MCP when you need to:

  • "Create a new Facebook ad campaign" — use create_campaign, create_adset, create_ad, and create_creative to build a full funnel
  • "Check how my ads are performing today" — use get_account_insights or get_campaign_insights with today's date range
  • "Pause all campaigns with ROAS below 2" — use list_campaigns + get_campaign_insights to find underperformers, then update_campaign to pause
  • "Set up A/B test between two ad creatives" — use create_experiment to run a controlled test between ad sets
  • "Create a lookalike audience from my customers" — use create_custom_audience, add_users_to_audience, then create_lookalike_audience
  • "Upload ad images and create a carousel ad" — use upload_image for each image, then create_creative with carousel format
  • "Get a detailed performance report for last 30 days" — use create_async_report for large date ranges, then get_async_report to retrieve
  • "Search the Facebook Ad Library for competitor ads" — use search_ad_library to find public ad data
  • "Set up automated rules to pause underperforming ads" — use create_rule with conditions like CPA > threshold
  • "Manage my product catalog for dynamic ads" — use create_catalog, create_feed, and upload_feed to set up dynamic product ads

Installation

{
  "mcpServers": {
    "meta-ads": {
      "command": "npx",
      "args": ["-y", "@mikusnuz/meta-ads-mcp"],
      "env": {
        "META_ADS_ACCESS_TOKEN": "your-access-token",
        "META_AD_ACCOUNT_ID": "123456789",
        "META_APP_ID": "your-app-id",
        "META_APP_SECRET": "your-app-secret",
        "META_BUSINESS_ID": "your-business-id",
        "META_PIXEL_ID": "your-pixel-id"
      }
    }
  }
}

Environment Variables

Variable Required Description
META_ADS_ACCESS_TOKEN Yes Meta Marketing API access token
META_AD_ACCOUNT_ID Yes Ad account ID (numeric, without act_ prefix)
META_APP_ID Optional App ID — required for token exchange/debug
META_APP_SECRET Optional App secret — required for token exchange/debug
META_BUSINESS_ID Optional Business Manager ID — required for business tools
META_PIXEL_ID Optional Pixel ID — required for conversion tools

Tools (123)

Campaign Management (22)

Tool Description
list_campaigns List campaigns with filtering and pagination
get_campaign Get campaign details by ID
create_campaign Create a new campaign
update_campaign Update campaign settings
delete_campaign Delete a campaign
get_campaign_adsets List ad sets within a campaign
get_campaign_ads List ads within a campaign
get_campaign_leads Get leads from a campaign
list_adsets List ad sets with filtering
get_adset Get ad set details by ID
create_adset Create a new ad set
update_adset Update ad set settings
delete_adset Delete an ad set
get_adset_ads List ads within an ad set
get_adset_leads Get leads from an ad set
list_ads List ads with filtering
get_ad Get ad details by ID
create_ad Create a new ad
update_ad Update ad settings
delete_ad Delete an ad
get_ad_preview Generate ad preview HTML
get_delivery_estimate Get delivery estimate for an ad

Creatives (5)

Tool Description
list_creatives List ad creatives
get_creative Get creative details
create_creative Create a new ad creative
update_creative Update an ad creative
create_dynamic_creative Create a dynamic creative

Media Assets (12)

Tool Description
list_images List ad images
upload_image Upload an image from URL
get_image Get image details
delete_image Delete an image
list_videos List ad videos
upload_video Upload a video from URL
get_video Get video details
delete_video Delete a video
list_canvases List Instant Experience canvases
get_canvas Get canvas details
create_canvas Create a canvas
delete_canvas Delete a canvas

Audiences & Targeting (15)

Tool Description
list_custom_audiences List custom audiences
get_audience Get audience details
create_custom_audience Create a custom audience
update_audience Update audience settings
delete_audience Delete an audience

Tools (44)

list_campaignsList campaigns with filtering and pagination
get_campaignGet campaign details by ID
create_campaignCreate a new campaign
update_campaignUpdate campaign settings
delete_campaignDelete a campaign
get_campaign_adsetsList ad sets within a campaign
get_campaign_adsList ads within a campaign
get_campaign_leadsGet leads from a campaign
list_adsetsList ad sets with filtering
get_adsetGet ad set details by ID
create_adsetCreate a new ad set
update_adsetUpdate ad set settings
delete_adsetDelete an ad set
get_adset_adsList ads within an ad set
get_adset_leadsGet leads from an ad set
list_adsList ads with filtering
get_adGet ad details by ID
create_adCreate a new ad
update_adUpdate ad settings
delete_adDelete an ad
get_ad_previewGenerate ad preview HTML
get_delivery_estimateGet delivery estimate for an ad
list_creativesList ad creatives
get_creativeGet creative details
create_creativeCreate a new ad creative
update_creativeUpdate an ad creative
create_dynamic_creativeCreate a dynamic creative
list_imagesList ad images
upload_imageUpload an image from URL
get_imageGet image details
delete_imageDelete an image
list_videosList ad videos
upload_videoUpload a video from URL
get_videoGet video details
delete_videoDelete a video
list_canvasesList Instant Experience canvases
get_canvasGet canvas details
create_canvasCreate a canvas
delete_canvasDelete a canvas
list_custom_audiencesList custom audiences
get_audienceGet audience details
create_custom_audienceCreate a custom audience
update_audienceUpdate audience settings
delete_audienceDelete an audience

Environment Variables

META_ADS_ACCESS_TOKENrequiredMeta Marketing API access token
META_AD_ACCOUNT_IDrequiredAd account ID (numeric, without act_ prefix)
META_APP_IDApp ID — required for token exchange/debug
META_APP_SECRETApp secret — required for token exchange/debug
META_BUSINESS_IDBusiness Manager ID — required for business tools
META_PIXEL_IDPixel ID — required for conversion tools

Configuration

claude_desktop_config.json
{"mcpServers": {"meta-ads": {"command": "npx", "args": ["-y", "@mikusnuz/meta-ads-mcp"], "env": {"META_ADS_ACCESS_TOKEN": "your-access-token", "META_AD_ACCOUNT_ID": "123456789", "META_APP_ID": "your-app-id", "META_APP_SECRET": "your-app-secret", "META_BUSINESS_ID": "your-business-id", "META_PIXEL_ID": "your-pixel-id"}}}}

Try it

Create a new Facebook ad campaign with a daily budget of $50.
Check how my ads are performing today and list any campaigns with low ROAS.
Pause all campaigns that have a ROAS below 2.
Upload this image URL to my ad account and create a new creative.
Get a detailed performance report for the last 30 days.

Frequently Asked Questions

What are the key features of Meta Ads?

Full lifecycle management for Facebook and Instagram ad campaigns. Support for ad creatives, dynamic creatives, and media asset management. Advanced audience targeting and custom audience creation. Performance reporting and delivery estimation tools. Integration with Facebook Ad Library for competitor research.

What can I use Meta Ads for?

Automating the pause of underperforming ad campaigns based on ROAS thresholds. Streamlining the creation of complex ad funnels including campaigns, ad sets, and creatives. Managing product catalogs and feeds for dynamic product ads. Generating performance reports for large date ranges using asynchronous reporting. Building lookalike audiences from existing customer data.

How do I install Meta Ads?

Install Meta Ads by running: npx -y @mikusnuz/meta-ads-mcp

What MCP clients work with Meta Ads?

Meta Ads works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Meta Ads docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare