About Facebook Ads MCP Server
Facebook Ads MCP Server provides tools for managing Facebook advertising through Claude AI. It covers campaigns, audiences, conversions, and performance analysis, with OAuth sign-in and automatic token management; it also supports page posts.
Key features
- 01Create, update, and delete campaigns
- 02Manage ad sets, ads, and creatives
- 03View ad performance and insights
- 04Create custom and lookalike audiences
- 05Manage conversions, pixels, and page posts
- 06OAuth sign-in and token management
Use cases
- 01Review campaign and ad performance
- 02Create and adjust advertising campaigns
- 03Build audiences for ad targeting
- 04Publish page content and manage lead forms
MCP support
The MCP server exposes Facebook advertising, analytics, audience, conversion, and page-content tools to clients such as Claude.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEFacebook Ads MCP Server
🇨🇿 Česká verze
MCP server for managing Facebook ads straight from Claude AI. No manual token hunting — sign in with Facebook once and you're done.
Features
- Campaign management (create, update, delete)
- Ad sets and individual ads
- Analytics and insights
- Custom and lookalike audiences
- Page posts
- Automatic token management (page tokens are permanent)
Installation
Requirements
- Node.js 18+
- Claude Desktop
1. Clone the repository
git clone https://github.com/Tisik79/MCP-Facebook.git
cd MCP-Facebook
npm install
npm run build
2. Add to Claude Desktop
Open the Claude Desktop config file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add:
{
"mcpServers": {
"facebook-ads": {
"command": "node",
"args": ["/PATH/TO/MCP-Facebook/dist/index.js"]
}
}
}
3. First run — 5-minute setup
On first start, a wizard walks you through creating your own Facebook App:
Steps:
1. Click "Create App"
2. Choose type: "Business"
3. Enter any name (e.g. "My Ads")
4. After creation, go to Settings → Basic
5. Copy the App ID and App Secret
6. Add the "Facebook Login" product and set:
Valid OAuth Redirect URIs: http://localhost:3456/auth/callback
7. In Basic settings, add "localhost" to App Domains
After entering the App ID and Secret, a browser opens automatically → sign in with Facebook → done.
Re-login / adding pages
node dist/index.js login
Usage in Claude
"Show my active campaigns"
"Create a campaign for MyBrand with a $20 daily budget"
"How did my ads perform last month?"
"Post an update to page XY"
Available Tools
| Tool | Description |
|---|---|
connect_facebook_account / set_facebook_token | Sign in via OAuth / store a token from Graph API Explorer |
list_connected_accounts / set_active_account | Show connected pages & accounts / switch the active one |
facebook_setup_help | Step-by-step connection guide |
get_campaigns | List campaigns |
create_campaign | Create a new campaign |
update_campaign | Update a campaign (incl. bidStrategy) — read-after-write |
get_campaign_details | Campaign detail (budget, bid_strategy, spend today) |
delete_campaign | Delete a campaign |
get_campaign_insights | Campaign analytics |
get_adset_insights / get_ad_insights | Ad set / ad level analytics |
get_adsets | List ad sets |
create_ad_set | Create an ad set (incl. lead fields promotedObject / destinationType) |
update_adset | Update an ad set (name / status) — real write + read-after-write verification |
get_ads | List ads (filtered via adSetId/campaignId edge + status) |
get_ad | Ad detail incl. creative (link, CTA, copy, video/image) |
upload_ad_media | Upload an image (image_hash) or video (video_id) |
create_adcreative | Create a creative from object_story_spec |
create_ad | Create an ad (defaults to PAUSED) |
update_ad | Update an ad (name/status/creative) — read-after-write |
delete_ad | Delete an ad |
create_lead_form | Create an instant lead form on a page |
get_lead_forms | List lead forms (id, name, status, leads_count) |
get_pixels | Account pixels (id, name) for promoted_object |
create_pixel / update_pixel / get_pixel | Pixel management (detail incl. last_fired_time) |
get_pixel_stats | Pixel event statistics (verify events are flowing) |
search_interests / get_interest_suggestions | Interest search & suggestions for targeting |
search_behaviors | Behavior categories for targeting |
search_geo_locations | Geo keys (region/city/zip) for targeting.geo_locations |
estimate_audience_size | Audience size estimate for a given targeting spec |
send_conversion_event / send_conversion_events_batch | Conversions API — server-side events (auto SHA-256 PII hashing) |
get_custom_conversions / get_custom_conversion | List / detail of custom conversions |
create_custom_conversion / update_custom_conversion / delete_custom_conversion | Custom conversions (custom_conversion_id for lead campaigns) |
get_offline_conversion_sets / create_offline_conversion_set / upload_offline_conversions | Offline conversions from your CRM |
update_adcreative | Update a creative (name/status — content is immutable) |
get_audiences | Custom audiences |
create_custom_audience | Create an audience |
create_lookalike_audience | Lookalike audience |
create_post | Page post |
create_video_post | Video page post (resumable upload, unpublished by default) |
The scope of the targeting/conversion tool set was inspired by Draivix/aidvertaiser (David Strejc, MIT) — thanks!
Lead Campaigns (OUTCOME_LEADS)
Lead collection has two paths; both require promotedObject + destinationType on the ad set:
- Website conversions —
optimizationGoal=OFFSITE_CONVERSIONS,destinationType=WEBSITE,promotedObject={ pixel_id, custom_event_type: "LEAD" }(find your Pixel ID viaget_pixels). - Instant form —
optimizationGoal=LEAD_GENERATION,destinationType=ON_AD,promotedObject={ page_id }, creative withcall_to_action.value.lead_gen_form_id(create the form viacreate_lead_form).
Without promotedObject + destinationType, Meta returns "Invalid parameter". For accounts
with campaign-level budget (CBO), do not set a budget on the ad set — it inherits from the
campaign. If the campaign uses a cap bid strategy (LOWEST_COST_WITH_BID_CAP), the ad set
requires bidAmount; otherwise set the campaign to bidStrategy=LOWEST_COST_WITHOUT_CAP.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.