Bridge Facebook Ads Mcp
Enterprise-grade mcp for project, provides, server, acting. Includes structured workflows, validation checks, and reusable patterns for marketing.
Bridge Facebook Ads Mcp
Bridge Facebook Ads Mcp is an MCP server that provides AI assistants with programmatic access to Meta's advertising platform, enabling management and analysis of Facebook and Instagram ad campaigns, ad sets, audiences, and performance metrics. This MCP bridge connects language models to the Meta Ads API, allowing conversational campaign management, budget optimization, audience analysis, and performance reporting through natural language commands.
When to Use This MCP Server
Connect this server when...
- You manage Facebook or Instagram advertising campaigns and want AI assistance with performance analysis and optimization
- Your marketing team needs conversational access to ad campaign metrics, spend data, and audience insights
- You are building automated reporting workflows that pull Meta Ads performance data for stakeholder dashboards
- You need to manage campaign budgets, targeting, and creative assets through natural language commands
- You want AI-driven recommendations for ad optimization based on real-time campaign performance data
Consider alternatives when...
- Your advertising is exclusively on Google Ads, LinkedIn, or TikTok without Meta Ads involvement
- You only need to view ad performance in the Meta Ads Manager dashboard without programmatic access
- You require real-time bidding or programmatic ad buying capabilities beyond the Meta Ads API
Quick Start
# .mcp.json configuration { "mcpServers": { "facebook-ads": { "command": "python", "args": [ "/path/to/fb-ads-mcp-server/server.py", "--fb-token", "YOUR_META_ACCESS_TOKEN" ] } } }
Connection setup:
- Create a Meta Business account and set up a Meta App at developers.facebook.com
- Generate a long-lived access token with ads_management and ads_read permissions
- Install the Python server:
pip install fb-ads-mcp-server - Add the configuration above to your
.mcp.jsonwith your access token - Restart your MCP client to connect to Meta Ads
Example tool usage:
# Analyze campaign performance
> Show me the top 5 performing ad campaigns by ROAS in the last 30 days
# Manage budgets
> Increase the daily budget for the "Summer Sale" campaign by 20%
# Audience insights
> What are the top-performing audience segments for our lead generation campaigns?
Core Concepts
| Concept | Purpose | Details |
|---|---|---|
| Campaigns | Top-level ad organization | Containers for ad sets that define the advertising objective (awareness, conversions, traffic) |
| Ad Sets | Targeting and budget groups | Configure audience targeting, placement, schedule, and budget within a campaign |
| Ads | Creative units | Individual ad creatives with copy, images/videos, and call-to-action linked to ad sets |
| Audiences | Targeting definitions | Custom, lookalike, and saved audience segments used for ad targeting across campaigns |
| Access Token | API authentication | Meta platform token with ads_management scope for authenticated API access |
Architecture:
+------------------+ +------------------+ +------------------+
| Meta Ads | | FB Ads MCP | | AI Assistant |
| Marketing API |<----->| Server (Python) |<----->| (Claude, etc.) |
| graph.facebook | HTTPS | stdio transport | stdio | |
+------------------+ +------------------+ +------------------+
|
v
+------------------------------------------------------+
| Campaigns > Ad Sets > Ads > Audiences > Insights |
+------------------------------------------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| --fb-token | string | (required) | Meta Marketing API access token with ads_management permissions |
| --account-id | string | (auto-detect) | Specific ad account ID when managing multiple Meta ad accounts |
| --date-range | string | last_30_days | Default date range for performance queries (today, last_7_days, last_30_days) |
| --currency | string | USD | Currency for monetary values in reports and budget operations |
| --read-only | flag | false | Restrict the server to read-only operations, preventing campaign modifications |
Best Practices
-
Use read-only mode for analytics and reporting. When the primary use case is querying campaign performance and generating reports, enable read-only mode. This prevents the AI from accidentally modifying campaign budgets, pausing ads, or changing targeting settings during data exploration.
-
Generate long-lived tokens for stable access. Meta access tokens have varying lifespans. Generate a long-lived token (60-day) or set up a system user token for uninterrupted access. Short-lived tokens expire quickly and will cause connection failures.
-
Filter queries by date range and campaign for performance. Meta Ads accounts can contain years of historical data across many campaigns. Always specify date ranges and campaign filters to get relevant, performant results rather than querying the entire account history.
-
Review AI budget recommendations before applying. When the AI suggests budget changes or campaign optimizations, review the recommendations against your business objectives before confirming. The AI optimizes for metrics, but business context (seasonal events, brand guidelines) may override pure metric optimization.
-
Monitor API rate limits and quota usage. The Meta Marketing API has rate limits based on your app's tier. Track API usage to avoid hitting limits during intensive reporting sessions. Batch related queries together rather than making many individual requests.
Common Issues
"Invalid OAuth access token" error. Meta access tokens expire and need regular renewal. Generate a new long-lived token from the Meta Developer portal. Ensure the token has ads_management and ads_read permissions. System user tokens provide the most stable long-term access.
Campaign data appears incomplete or missing. Check that the ad account ID is correct and the access token has permissions for that specific account. If you manage multiple ad accounts, specify the account ID explicitly to avoid querying the wrong account.
Budget changes not reflecting in Meta Ads Manager. Some budget changes require time to propagate through Meta's systems. Changes made through the API should appear within minutes. If changes are not reflected after 15 minutes, verify the API response confirmed the update was successful and check for any campaign-level budget limits that may override ad set budgets.
Reviews
No reviews yet. Be the first to review this template!