
MCP server pro zadávání a vyhodnocování reklamních kampaní na Facebooku pomocí Claude AI
概览
MCP server for managing Facebook ads straight from Claude AI. No manual token hunting — sign in with Facebook once and you're done. - 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) Open the Claude Desktop config file: - : ~/Library/Application Support/Claude/claude_desktop_config.json - : %APPDATA%\Claude\claude_desktop_config.json On first start, a wizard walks you through creating your own Facebook App: After entering the App ID and Secret, a browser opens automatically → sign in with Facebook → done. The scope of the targeting/conversion tool set was inspired by Draivix/aidvertaiser (David Strejc, MIT) — thanks!
README
以下为原文 README 节选,完整内容请查看原文。
Facebook 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) |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"facebook-ads": {
"command": "node",
"args": ["/PATH/TO/MCP-Facebook/dist/index.js"]
}
}
}