ArmaVita Meta Ads MCP
The ArmaVita Meta Ads MCP server provides a comprehensive suite of tools to manage Meta Ads (Facebook, Instagram, Threads) campaigns, creatives, audiences, analytics, and more via AI clients like Claude, Cursor, or Codex.
Account Management: List/read ad accounts, manage account controls, list and search associated pages.
Campaign Management: List, read, create, update, and clone campaigns; set budgets, bid controls, special ad categories, and campaign budget schedules.
Ad Set Management: List, read, create, update, and clone ad sets with targeting, bidding, budgeting, and optimization settings.
Ads, Creatives & Media: List, read, create, update, and clone ads and ad creatives (images, video, carousel, dynamic, lead forms); upload image/video assets; generate ad previews.
Insights & Reporting: Fetch performance insights (sync/async) for any level (account, campaign, ad set, ad) with breakdowns and attribution windows; create downloadable reports (PDF/CSV); MMM CSV exports.
Targeting Research: Search interests, behaviors, demographics, and geo-locations; suggest related interests; estimate audience size.
Custom Audiences: List, create, update, delete custom and lookalike audiences; manage audience user lists.
Catalogs & Products: List and manage product catalogs, product sets, and individual products (upsert/batch operations).
Ads Library: Search Meta's public Ads Archive by country, ad type, and other filters.
Conversions API (CAPI): Send server-side events, list business datasets, read dataset quality.
Custom Conversions: List, create, update, and delete custom conversion events.
Reach & Frequency: Create and read reach/frequency predictions for campaign planning.
Recommendations: List and apply Meta optimization recommendations.
Threads: Create and get Threads accounts.
Branded Content: Manage branded content ad permissions.
Web Research: Crawl and read web content for competitive research.
Authentication: Supports Meta access token auth or a local OAuth flow, with configurable API version, pagination (cursor-based), and other environment settings.
Provides comprehensive tools for managing Meta Ads via the Marketing API, including managing ad accounts, campaigns, ad sets, and creatives, as well as generating insights reports and searching the Meta Ads Library.
Click on "Install 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., "@ArmaVita Meta Ads MCPList my active campaigns and show performance insights for the last 30 days"
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, Instagram, Facebook Ads MCP
armavita-meta-ads-mcp is a local Model Context Protocol server for Meta Ads.
It is built for local MCP clients (Claude Code, Cursor, Codex) and supports:
Meta access token auth (
META_ACCESS_TOKEN)Local OAuth flow (
META_APP_ID+META_APP_SECRET)stdio MCP transport only
Python
3.11+mcp[cli]==1.27.2Meta Marketing API
v25.0by default (META_GRAPH_API_VERSIONoverride supported)
Current contract version: 1.2.0 (78 tools).
The default OAuth scope (META_AUTH_SCOPE) requests ads_management, ads_read, business_management, public_profile, pages_show_list, pages_read_engagement, instagram_basic, and threads_business_basic. The catalog tools additionally require catalog_management — add it to META_AUTH_SCOPE if you use them.
Install
From PyPI (once published):
pip install armavita-meta-ads-mcpFrom source (recommended during development):
uv syncRelated MCP server: Meta Ads MCP
Run
armavita-meta-ads-mcpModule entrypoint:
python -m armavita_meta_ads_mcpLogin flow:
armavita-meta-ads-mcp --loginQuick MCP Client Config
Minimal MCP server registration (JSON format used by many clients):
{
"mcpServers": {
"meta-ads-armavita": {
"command": "armavita-meta-ads-mcp",
"env": {
"META_ACCESS_TOKEN": "EA...",
"META_GRAPH_API_VERSION": "v25.0"
}
}
}
}OAuth mode (no direct token in config):
{
"mcpServers": {
"meta-ads-armavita": {
"command": "armavita-meta-ads-mcp",
"env": {
"META_APP_ID": "YOUR_APP_ID",
"META_APP_SECRET": "YOUR_APP_SECRET"
}
}
}
}Then run once to complete login:
armavita-meta-ads-mcp --loginAdvanced Environment Variables
Beyond the core auth variables above, the server reads four optional knobs:
Variable | Default | Effect |
| unset | Facebook Login for Business configuration ID appended to the OAuth authorization URL. |
| unset | Set to any value to disable the local OAuth callback server (token/OAuth login flows will error instead of opening a port). |
|
| Number of ad accounts whose campaigns are scanned by |
|
| Set to |
Tool Coverage (78 tools)
Accounts & controls
list_ad_accounts,read_ad_account,get_account_controls,update_account_controls,list_account_pages,search_pages
Campaigns
list_campaigns,read_campaign,create_campaign,update_campaign,create_campaign_budget_schedule
Ad sets
list_ad_sets,read_ad_set,create_ad_set,update_ad_set
Ads, creatives & media
list_ads,read_ad,create_ad,update_ad,list_ad_previewslist_ad_creatives,read_ad_creative,create_ad_creative,update_ad_creativeupload_ad_image_asset,upload_ad_video_asset,read_ad_image,export_ad_image_filelist_ad_images,list_ad_videos
Insights & reporting
list_insights,create_reportAsync insights:
create_insights_job,read_insights_job,read_insights_job_resultslist_ad_custom_derived_metrics
Custom conversions
list_custom_conversions,read_custom_conversion,create_custom_conversion,update_custom_conversion,delete_custom_conversion
Targeting research
search_interests,suggest_interests,estimate_audience_size,search_behaviors,search_demographics,search_geo_locations
Audiences
list_custom_audiences,read_custom_audience,create_custom_audience,update_custom_audience,delete_custom_audiencecreate_lookalike_audience,manage_custom_audience_users
Catalogs & products
list_product_catalogs,list_product_sets,list_products,upsert_product,batch_products
Duplication
clone_campaign,clone_ad_set,clone_ad,clone_ad_creative
Ads Library & research helpers
search_ads_archivesearch_web_content,read_web_content
Conversions API (CAPI)
send_capi_events,list_business_datasets,read_dataset_quality
Partnership & branded content
list_branded_content_ad_permissions,grant_branded_content_ad_permission
Reach & frequency
list_reach_frequency_predictions,create_reach_frequency_prediction,read_reach_frequency_prediction
Recommendations
list_recommendations,apply_recommendation
Threads
create_threads_account,get_threads_account
Pagination
Cursor-based pagination is supported on list/read streams that expose page_cursor:
Accounts:
list_ad_accountsCampaigns:
list_campaignsAd sets:
list_ad_setsAds:
list_ads,list_ad_creativesMedia library:
list_ad_images,list_ad_videosInsights:
list_insights,read_insights_job_resultsTargeting:
search_interests,suggest_interests,search_behaviors,search_demographics,search_geo_locationsAudiences:
list_custom_audiencesCustom conversions:
list_custom_conversionsCatalogs:
list_product_catalogs,list_product_sets,list_productsDerived metrics:
list_ad_custom_derived_metricsPartnership:
list_branded_content_ad_permissionsReach & frequency:
list_reach_frequency_predictionsCAPI datasets:
list_business_datasetsAds Library:
search_ads_archive
Use page_cursor with the paging.cursors.after value from the previous response.
Responses preserve Meta's native paging object.
Insights Query Notes
list_insightsaccepts an optionalfieldsparameter (defaults to a standard KPI set). Custom derived metric names fromlist_ad_custom_derived_metricscan be passed infields.list_insightsandcreate_reportsupport either:date_rangeas{ "since": "YYYY-MM-DD", "until": "YYYY-MM-DD" }, ordate_rangeas a preset (for examplelast_30d,maximum).
create_report.comparison_perioduses the same format and validation asdate_range.list_insights,create_report, and async insights acceptaction_attribution_windows. Deprecated windows (7d_view,28d_view) return warnings and may yield empty data under v25.previous_30dis normalized tolast_30d.For action metrics, use
action_breakdowns(and optionalsummary_action_breakdowns) instead of mixing action keys intobreakdowns.
Async insights workflow (including MMM CSV)
create_insights_job(object_id, breakdowns=["mmm"], export_format="csv", ...)→report_run_idPoll
read_insights_job(report_run_id)untilasync_statusisJob Completed(also returnsasync_percent_completionandasync_report_urlwhen available)Fetch rows via
read_insights_job_results(report_run_id)or downloadasync_report_url
v25 behavior notes
API version: default
v25.0— the current latest Marketing/Graph API version (released Feb 18, 2026). SetMETA_GRAPH_API_VERSIONto override. Watch the Meta changelog before adopting a future version as the default.Campaign budgets:
create_campaignno longer silently appliesdaily_budget=1000. Providedaily_budget/lifetime_budget, setuse_ad_set_level_budgets=True, or passapply_default_budget=Trueto opt in to the MCP default.Special ad categories: when
special_ad_categoriesincludes HOUSING, EMPLOYMENT, or FINANCIAL_PRODUCTS_SERVICES,special_ad_category_countryis required on create/update.Ad set placement opt-out:
placement_soft_opt_outmust be an object keyed by placement group, for example:{ "facebook_positions": ["marketplace"], "instagram_positions": ["stream"] }Allowed keys:
facebook_positions,instagram_positions,audience_network_positions,messenger_positions,threads_positions.Advantage+ duplication/create guard: deprecated Advantage+ Shopping/App campaign signatures are blocked on
create_campaign(whensmart_promotion_typeis set) and onclone_campaign/clone_ad_set/clone_adpreflight. Usemigrate_to_advantage_plusonupdate_campaign/clone_campaignwhere supported.Carousel & catalog creatives:
create_ad_creativesupportscarousel_cards,product_set_id(seelist_product_sets), andurl_tags.create_adsupportsconversion_domain.Video upload:
upload_ad_video_assetacceptsvideo_source_urlor localvideo_file_path(multipart).Ads Library:
search_ads_archiveexposes v25 filters includingad_active_status, delivery date bounds,search_page_ids,search_type,languages,media_type, andpublisher_platforms.
Security
Access tokens are redacted from URL fields returned by the server (including nested
paging.nextURLs).
Docs
Scope
This repository is an OSS local MCP server.
Transport mode is local
stdioonly.Tool aliases are intentionally not exposed.
License
GNU Affero General Public License v3.0 (AGPLv3). See LICENSE.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/EfrainTorres/armavita-meta-ads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server