meta-ads-mcp-patched
Provides tools for interacting with Meta's Marketing API, enabling management of ad campaigns, ad sets, lead forms, and asset uploads.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meta-ads-mcp-patched Create a new ad set with promoted object for lead generation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
meta-ads-mcp-patched
Patched fork of @mikusnuz/meta-ads-mcp
v1.3.0 (MIT, upstream author mikusnuz — original docs in
README.upstream.md). The fork exists because the upstream tool schemas lag
behind what the Meta Marketing API v25 actually requires; every gap below was reproduced with a
live API call before patching.
Patches over upstream 1.3.0
Tool | Change |
| + |
| + |
| + |
| + |
| + |
| Page-scoped calls now resolve the Page Access Token internally (derived from the configured token via |
| + optional |
| + |
| + |
|
|
Everything else is upstream dist/ output, byte-identical. Patches are applied directly to the
unminified ESM in dist/ (upstream ships no source in the npm tarball).
Related MCP server: facebook-ads-mcp-server
Usage
Same contract as upstream — stdio MCP server, env-configured:
META_ADS_ACCESS_TOKEN (required)
META_AD_ACCOUNT_ID (required, numeric — no act_ prefix)
META_APP_ID / META_APP_SECRET / META_BUSINESS_ID / META_PIXEL_ID (optional)Run: npx -y github:Green-pep/meta-ads-mcp-patched#v1.3.1
Release procedure
Apply the change in
dist/, bumpversioninpackage.json(keep the1.3.xbase to track the upstream pin).Update the patch table above.
Commit, tag
v1.3.x, push with tags.Repoint the consumer (MCP catalog
args) at the new tag.
Upstream status
Fork base pinned at upstream 1.3.0. The intent is to offer these patches upstream (mikusnuz/meta-ads-mcp) and retire this fork if they land.
Available Tools
134 toolsadd_business_userA
Add a user to the configured business by email. Requires META_BUSINESS_ID env var.
Inputs: role (required), email (required).
add_to_block_listA
Add publisher URLs to an existing block list.
Inputs: urls (required), list_id (required).
add_users_to_audienceA
Add users to a custom audience. Payload must be a JSON string containing hashed user data with a schema array defining the data types (e.g. EMAIL, PHONE, FN, LN).
Inputs: payload (required), audience_id (required).
batch_productsA
Batch create, update, or delete products in a catalog. Supports up to 5,000 items per request. Update operations support upsert.
Inputs: requests (required), catalog_id (required), allow_upsert.
copy_adA
Copy an existing ad. Creates a duplicate within the same or different ad set.
Inputs: ad_id (required), name, status, adset_id.
copy_adsetA
Copy an existing ad set. Creates a duplicate within the same or different campaign.
Inputs: adset_id (required), name, status, deep_copy, +1 more.
copy_campaignA
Copy an existing campaign. Creates a duplicate with optional name override. Copies structure including ad sets and ads.
Inputs: campaign_id (required), name, status, deep_copy.
create_adA
Create a new ad. Requires name, adset_id, and creative (JSON object_story_spec). Defaults to PAUSED status.
Inputs: name (required), adset_id (required), creative (required), status, +1 more.
create_adsetC
Create a new ad set. Requires name, campaign_id, budget, optimization_goal, billing_event, and targeting. Defaults to PAUSED status.
Inputs: name (required), targeting (required), campaign_id (required), billing_event (required), +11 more.
create_async_reportA
Create an async insight report for large data queries. Returns a report_run_id to poll with get_async_report.
Inputs: level, fields, filtering, breakdowns, +3 more.
create_block_listB
Create a new publisher block list for the ad account.
Inputs: name (required).
create_budget_scheduleA
Create a new ad budget schedule for the ad account.
Inputs: time_end (required), time_start (required), budget_value (required), budget_value_type (required).
create_campaignA
Create a new ad campaign. Defaults to PAUSED status. Requires name and objective. Budget can be set at campaign or ad set level.
Inputs: name (required), objective (required), status, stop_time, +7 more.
create_canvasB
Create a new Instant Experience (Canvas) on a Facebook Page. Requires page_id and body_elements JSON array defining the canvas layout.
Inputs: page_id (required), body_elements (required), name.
create_catalogA
Create a new product catalog for the ad account.
Inputs: name (required), vertical.
create_creativeB
Create a new ad creative with object_story_spec. The spec defines the ad content (link, photo, or video) and the associated Facebook Page.
Inputs: name (required), object_story_spec (required), url_tags, asset_feed_spec.
create_custom_audienceB
Create a new custom audience. Subtype determines the audience source (CUSTOM, WEBSITE, APP, OFFLINE_CONVERSION, LOOKALIKE, ENGAGEMENT, etc.).
Inputs: name (required), subtype (required), description, customer_file_source.
create_dynamic_creativeA
Create a dynamic creative with asset_feed_spec. Meta automatically combines different images, videos, titles, bodies, and CTAs to find the best performing combinations.
Inputs: name (required), asset_feed_spec (required).
create_experimentB
Create a new A/B test experiment (ad study).
Inputs: name (required), cells (required), end_time (required), start_time (required), +2 more.
create_feedB
Create a new product feed for a catalog.
Inputs: name (required), catalog_id (required), file_url, schedule.
create_lead_formA
Create a new lead generation form on a Facebook Page. Requires pages_manage_ads permission.
Inputs: name (required), page_id (required), questions (required), privacy_policy_url (required), +5 more.
create_lookalike_audienceA
Create a lookalike audience based on an existing custom audience. Ratio (1-10) determines how closely the new audience resembles the source.
Inputs: name (required), lookalike_spec (required), origin_audience_id (required).
create_offline_event_setB
Create a new offline conversion data set.
Inputs: name (required), description.
create_product_setB
Create a new product set within a catalog.
Inputs: name (required), catalog_id (required), filter.
create_rf_predictionB
Create a new reach & frequency prediction. Provide targeting spec as JSON string, budget in cents, and scheduling info.
Inputs: budget (required), stop_time (required), start_time (required), target_spec (required), +2 more.
create_ruleB
Create a new automated rule for the ad account.
Inputs: name (required), execution_spec (required), evaluation_spec (required), schedule_spec.
create_system_userB
Create a new system user in the configured business. Requires META_BUSINESS_ID env var.
Inputs: name (required), role (required).
debug_tokenA
Debug an access token to inspect its properties, permissions, expiration, and validity. Requires META_APP_ID and META_APP_SECRET.
Inputs: input_token (required).
delete_adA
Delete an ad. This action is irreversible.
Inputs: ad_id (required).
delete_adsetA
Delete an ad set. This action is irreversible.
Inputs: adset_id (required).
delete_audienceA
Delete a custom audience. This action is irreversible.
Inputs: audience_id (required).
delete_block_listA
Delete a publisher block list. This action is irreversible.
Inputs: list_id (required).
delete_budget_scheduleA
Delete a budget schedule. This action is irreversible.
Inputs: schedule_id (required).
delete_campaignA
Delete a campaign. This action is irreversible.
Inputs: campaign_id (required).
delete_canvasA
Delete an Instant Experience (Canvas). This action is irreversible.
Inputs: canvas_id (required).
delete_imageA
Delete an ad image by hash. This action is irreversible.
Inputs: hash (required).
delete_rf_predictionA
Delete a reach & frequency prediction. This action is irreversible.
Inputs: prediction_id (required).
delete_ruleB
Delete an automated rule.
Inputs: rule_id (required).
delete_videoA
Delete an ad video. This action is irreversible.
Inputs: video_id (required).
exchange_tokenA
Exchange a short-lived access token for a long-lived token. Requires META_APP_ID and META_APP_SECRET to be configured.
Inputs: short_lived_token (required).
generate_previewA
Generate an ad preview without needing an existing ad. Provide creative spec directly to see how it would look.
Inputs: creative (required), ad_format (required).
get_account_activitiesA
Get activity log for the ad account. Shows changes made to campaigns, ad sets, ads, etc.
Inputs: after, limit, fields.
get_account_insightsC
Get performance insights for the ad account. Returns metrics like impressions, clicks, spend, reach, etc.
Inputs: level, fields, filtering, breakdowns, +3 more.
get_adA
Get details of a specific ad by ID.
Inputs: ad_id (required), fields.
get_ad_accountA
Get details of the configured ad account including status, balance, currency, timezone, and spend info.
Inputs: fields.
get_ad_insightsB
Get performance insights for a specific ad.
Inputs: ad_id (required), level, fields, filtering, +4 more.
get_ad_previewB
Get a preview of an ad in a specific format. Returns HTML iframe for rendering.
Inputs: ad_id (required), ad_format (required).
get_adsetC
Get details of a specific ad set by ID.
Inputs: adset_id (required), fields.
get_adset_adsA
Get all ads belonging to a specific ad set.
Inputs: adset_id (required), after, limit, fields.
get_adset_insightsC
Get performance insights for a specific ad set.
Inputs: adset_id (required), level, fields, filtering, +4 more.
get_adset_leadsA
Get leads generated by a specific ad set. Requires leads_retrieval permission.
Inputs: adset_id (required), after, limit, fields.
get_adset_targeting_sentenceB
Get human-readable targeting description for an ad set. Converts targeting spec into readable sentences.
Inputs: adset_id (required).
get_async_reportB
Check status and retrieve results of an async insight report.
Inputs: report_run_id (required), fields.
get_audienceA
Get details of a specific custom audience by ID.
Inputs: audience_id (required), fields.
get_audience_healthA
Get health status and delivery readiness of a custom audience. Shows match rate, size, and operation status.
Inputs: audience_id (required).
get_batch_statusC
Check the status of a catalog batch operation.
Inputs: handle (required), catalog_id (required).
get_businessB
Get details of a specific business by ID.
Inputs: business_id (required), fields.
get_campaignA
Get details of a specific campaign by ID.
Inputs: campaign_id (required), fields.
get_campaign_adsA
Get all ads belonging to a specific campaign.
Inputs: campaign_id (required), after, limit, fields.
get_campaign_adsetsA
Get all ad sets belonging to a specific campaign.
Inputs: campaign_id (required), after, limit, fields.
get_campaign_insightsC
Get performance insights for a specific campaign.
Inputs: campaign_id (required), level, fields, filtering, +4 more.
get_campaign_leadsA
Get leads generated by a specific campaign. Requires leads_retrieval permission.
Inputs: campaign_id (required), after, limit, fields.
get_canvasA
Get details of a specific Instant Experience (Canvas) by ID.
Inputs: canvas_id (required), fields.
get_catalogB
Get details of a specific product catalog.
Inputs: catalog_id (required), fields.
get_creativeA
Get details of a specific ad creative by ID.
Inputs: creative_id (required), fields.
get_delivery_estimateB
Get delivery estimate for an ad including estimated daily reach and cost.
Inputs: ad_id (required), optimization_goal.
get_experimentB
Get details of a specific experiment (ad study).
Inputs: experiment_id (required), fields.
get_experiment_resultsB
Get results/cells of an experiment (ad study).
Inputs: experiment_id (required), fields.
get_feed_uploadsB
Get upload history for a product feed.
Inputs: feed_id (required), after, limit, fields.
get_form_leadsC
Get leads submitted through a lead generation form.
Inputs: form_id (required), after, limit, fields, +1 more.
get_imageA
Get details of a specific ad image by ID.
Inputs: image_id (required), fields.
get_leadA
Get details of a specific lead by ID.
Inputs: lead_id (required), fields.
get_lead_formC
Get details of a specific lead generation form.
Inputs: form_id (required), fields, page_id.
get_productA
Get details of a specific product.
Inputs: product_id (required), fields.
get_product_setA
Get details of a specific product set.
Inputs: set_id (required), fields.
get_reach_estimateA
Get estimated audience reach for a given targeting specification. Useful for planning campaigns before creating them.
Inputs: targeting_spec (required).
get_rf_predictionA
Get details of a specific reach & frequency prediction by ID.
Inputs: prediction_id (required), fields.
get_ruleB
Get details of a specific automated rule.
Inputs: rule_id (required), fields.
get_saved_audienceA
Get details of a specific saved audience by ID.
Inputs: audience_id (required), fields.
get_targeting_suggestionsA
Get targeting suggestions based on existing targeting criteria. Meta suggests related interests, behaviors, and demographics.
Inputs: targeting_list (required).
get_videoA
Get details of a specific ad video by ID.
Inputs: video_id (required), fields.
list_account_usersB
List users who have access to the ad account with their roles and permissions.
Inputs: after, limit, fields.
list_ad_accountsA
List all ad accounts accessible by the current user. Returns paginated results.
Inputs: after, limit, fields.
list_adsA
List ads in the ad account. Optionally filter by campaign, ad set, or status.
Inputs: after, limit, fields, status, +2 more.
list_adsetsA
List ad sets in the ad account. Optionally filter by campaign or status.
Inputs: after, limit, fields, status, +1 more.
list_block_listsA
List publisher block lists for the ad account. Returns paginated results.
Inputs: after, limit, fields.
list_budget_schedulesA
List ad budget schedules for the ad account. Returns paginated results.
Inputs: after, limit, fields.
list_business_ad_accountsA
List ad accounts owned by the configured business. Requires META_BUSINESS_ID env var.
Inputs: after, limit, fields.
list_businessesA
List all businesses accessible by the current user. Returns paginated results.
Inputs: after, limit, fields.
list_business_instagram_accountsA
List Instagram accounts owned by the configured business. Requires META_BUSINESS_ID env var.
Inputs: after, limit, fields.
list_business_pagesA
List Facebook Pages owned by the configured business. Requires META_BUSINESS_ID env var.
Inputs: after, limit, fields.
list_business_usersA
List users of the configured business. Requires META_BUSINESS_ID env var.
Inputs: after, limit, fields.
list_campaignsA
List campaigns in the ad account. Supports filtering by status and objective. Returns paginated results.
Inputs: after, limit, before, fields, +2 more.
list_canvasesB
List Instant Experience (Canvas) creatives in the ad account.
Inputs: after, limit, fields.
list_catalogsA
List product catalogs for the ad account.
Inputs: after, limit, fields.
list_creativesB
List ad creatives in the ad account.
Inputs: after, limit, fields.
list_custom_audiencesB
List custom audiences in the ad account.
Inputs: after, limit, fields.
list_experimentsA
List A/B test experiments (ad studies) for the ad account.
Inputs: after, limit, fields.
list_feedsA
List product feeds for a catalog.
Inputs: catalog_id (required), after, limit, fields.
list_imagesB
List ad images uploaded to the ad account.
Inputs: after, limit, fields.
list_lead_formsB
List lead generation forms for a Facebook Page.
Inputs: page_id (required), after, limit, fields.
list_offline_event_setsB
List offline conversion data sets for the ad account.
Inputs: after, limit, fields.
list_productsB
List products within a catalog.
Inputs: catalog_id (required), after, limit, fields, +1 more.
list_product_setsB
List product sets within a catalog.
Inputs: catalog_id (required), after, limit, fields.
list_rf_predictionsA
List reach & frequency predictions for the ad account. Returns paginated results.
Inputs: after, limit, fields.
list_rulesB
List automated rules for the ad account.
Inputs: after, limit, fields.
list_saved_audiencesA
List saved audiences in the ad account. Saved audiences are reusable targeting presets.
Inputs: after, limit, fields.
list_system_usersA
List system users of the configured business. Requires META_BUSINESS_ID env var.
Inputs: after, limit, fields.
list_videosA
List ad videos uploaded to the ad account.
Inputs: after, limit, fields.
refresh_tokenA
Refresh a long-lived access token to extend its expiration. Returns a new long-lived token.
Inputs: long_lived_token (required).
remove_business_userA
Remove a user from the configured business. Requires META_BUSINESS_ID env var.
Inputs: user_id (required).
remove_from_block_listA
Remove publisher URLs from an existing block list.
Inputs: urls (required), list_id (required).
remove_users_from_audienceB
Remove users from a custom audience. Payload format is the same as add_users_to_audience.
Inputs: payload (required), audience_id (required).
search_ad_libraryB
Search the Meta Ad Library for ads. Allows searching by keywords, countries, and ad type. Useful for competitive research and transparency.
Inputs: search_terms (required), ad_reached_countries (required), after, limit, +3 more.
search_locationsB
Search for geographic locations (countries, regions, cities, zip codes) for ad targeting.
Inputs: q (required), limit, location_types.
search_targetingA
Search for targeting options (interests, behaviors, demographics, etc.) by keyword. Use this to find valid targeting IDs for ad set targeting specs.
Inputs: q (required), type, limit.
search_targeting_mapA
Map targeting IDs to their full details (names, types, paths). Useful for resolving IDs obtained from other endpoints.
Inputs: targeting_list (required).
send_conversion_eventA
Send a server-side conversion event via the Conversions API (pixel).
Inputs: events (required).
send_offline_eventB
Send an offline conversion event to an offline event set.
Inputs: events (required), event_set_id (required).
update_adA
Update an existing ad. Only provided fields will be modified.
Inputs: ad_id (required), name, status, creative, +1 more.
update_ad_accountA
Update the configured ad account settings. Only provided fields will be modified.
Inputs: name, spend_cap, timezone_name.
update_adsetA
Update an existing ad set. Only provided fields will be modified.
Inputs: adset_id (required), name, status, end_time, +7 more.
update_audienceA
Update an existing custom audience. Only provided fields will be modified.
Inputs: audience_id (required), name, description.
update_budget_scheduleA
Update an existing budget schedule. Only provided fields will be modified.
Inputs: schedule_id (required), time_end, time_start, budget_value.
update_campaignA
Update an existing campaign. Only provided fields will be modified.
Inputs: campaign_id (required), name, status, stop_time, +5 more.
update_catalogC
Update an existing product catalog.
Inputs: catalog_id (required), name.
update_creativeA
Update an existing ad creative. Only name and url_tags can be modified after creation.
Inputs: creative_id (required), name, url_tags.
update_experimentA
Update an existing experiment (ad study).
Inputs: experiment_id (required), name, description.
update_productB
Update an existing product in a catalog.
Inputs: product_id (required), url, name, price, +3 more.
update_product_setC
Update an existing product set.
Inputs: set_id (required), name, filter.
update_ruleC
Update an existing automated rule.
Inputs: rule_id (required), name, status, schedule_spec, +2 more.
upload_feedC
Upload/trigger a feed file upload for a product feed.
Inputs: url (required), feed_id (required).
upload_imageA
Upload an ad image from a public URL or a local file path. Returns image hash for use in ad creatives.
Inputs: url, name, file_path.
upload_videoA
Upload an ad video from a public URL or a local file path. Returns video ID for use in ad creatives.
Inputs: title, file_url, file_path, description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 134 tools
Most tools have clear, distinct purposes, but there is overlap among lead-related tools (get_campaign_leads, get_adset_leads, get_form_leads, get_lead) and between get_creative vs create_creative vs update_creative. Descriptions help disambiguate, but the sheer number of tools increases the chance of selecting the wrong one.
The naming generally follows a consistent verb_noun pattern (list_, get_, create_, update_, delete_). Minor deviations exist, such as get_campaign_adsets vs list_adsets, and add_to_block_list vs add_users_to_audience, but these are understandable and do not significantly hinder predictability.
With 134 tools, this server is massively over-scoped. The rubric states that 50+ tools is an extreme mismatch, and this server far exceeds that threshold. The tool count alone makes the server difficult to navigate and operate.
The server covers a very broad range of Meta Ads operations, including campaigns, ad sets, ads, creatives, audiences, catalogs, leads, insights, business management, and more. Minor gaps exist (e.g., no delete_catalog, no delete_feed, no get_block_list), but overall the surface is impressively complete for the domain.
Maintenance
Related MCP Connectors
Meta Ads MCP server: run Facebook and Instagram campaigns, ad sets, ads and reports from AI.
Meta Ads MCP server: 10 tools for Facebook and Instagram reports, ads, Ad Library. Ads start paused.
Meta Ads MCP server with 47 tools for campaigns, creatives, audiences, and insights.
Hosted Meta Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for programmatic management of Meta (Facebook/Instagram) advertising campaigns through AI assistants. It enables campaign creation, ad set management, creative upload, analytics, audience management, and conversion tracking.4MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Meta/Facebook Marketing API allowing you to view and manage ad accounts, campaigns, ad sets, ads, and creatives, as well as fetch insights and upload ad images.MIT
- AlicenseBqualityDmaintenanceMCP server for Meta Ads providing 30 tools for account discovery, campaign management, targeting research, and insights. Designed with LLM-friendly outputs and productivity features like cloning and bulk operations.311MIT
- AlicenseCqualityDmaintenanceMCP server for the Meta Marketing API with 118 typed tools across ads, insights, pixels/CAPI, pages, Instagram, WhatsApp, catalogs, audiences, leads, and billing, featuring secure token storage and a confirmation gate on destructive calls.1001MIT