Facebook Ads
Connects AI assistants to Facebook's Ads API to enable natural language queries for campaign data, insights, and performance metrics. It allows users to manage ad accounts and retrieve detailed analytics like impressions, clicks, and spend through MC
What is Facebook Ads?
Facebook Ads is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects ai assistants to facebook's ads api to enable natural language queries for campaign data, insights, and performance metrics. it allows users to manage ad accounts and retrieve detailed analyt...
Connects AI assistants to Facebook's Ads API to enable natural language queries for campaign data, insights, and performance metrics. It allows users to manage ad accounts and retrieve detailed analytics like impressions, clicks, and spend through MC
This server falls under the Marketing & SEO category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Connects AI assistants to Facebook's Ads API to enable natur
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx facebook-ads-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Facebook Ads
The Facebook Ads MCP Server connects AI assistants to Meta's Ads API through fourteen structured tools that cover ad account management, campaign and ad set retrieval, individual ad and creative lookup, performance insights at every level of the campaign hierarchy, and activity history. Authenticated via a Meta User Access Token with ads_read permission, it allows natural language queries like 'show me last week's spend by campaign' or 'which ad creatives had the highest CTR this month' without writing any API code. Marketing analysts and growth teams use it to speed up reporting, monitor campaign performance in real time, and let AI identify optimization opportunities across their Facebook ad accounts.
Prerequisites
- Python 3.8 or higher with pip
- A Meta (Facebook) developer account with an app that has the ads_read permission
- A Meta User Access Token with ads_read scope — generate one at https://developers.facebook.com/tools/explorer/
- An MCP-compatible client such as Claude Desktop
Clone the repository
Download the Facebook Ads MCP Server source code from GitHub.
git clone https://github.com/gomarble-ai/facebook-ads-mcp-server.git
cd facebook-ads-mcp-serverCreate a virtual environment and install dependencies
Isolate the server's Python dependencies in a virtual environment before installing from requirements.txt.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtObtain a Meta User Access Token
Go to https://developers.facebook.com/tools/explorer/, select your app, add the ads_read permission, and generate a token. Copy the token — it will be passed as a command-line argument. The token is stored locally only and is not sent anywhere except the Meta API.
Test the server manually
Run the server directly with your token to confirm it starts without errors before wiring it to Claude Desktop.
python server.py --fb-token YOUR_META_ACCESS_TOKENAdd the server to Claude Desktop configuration
Edit claude_desktop_config.json to launch the server via the virtual environment's Python binary, passing your token as an argument. Use the absolute paths to the Python binary and server.py.
{
"mcpServers": {
"facebook-ads": {
"command": "/path/to/facebook-ads-mcp-server/venv/bin/python",
"args": [
"/path/to/facebook-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Facebook Ads Examples
Client configuration
Claude Desktop configuration using the local virtual environment to run the Facebook Ads MCP Server with a Meta access token.
{
"mcpServers": {
"facebook-ads": {
"command": "/Users/yourname/facebook-ads-mcp-server/venv/bin/python",
"args": [
"/Users/yourname/facebook-ads-mcp-server/server.py",
"--fb-token",
"EAAxxxxxxxxxxxxxxxxx"
]
}
}
}Prompts to try
Example prompts using the Facebook Ads MCP Server's campaign and insight tools.
- "List all my Facebook ad accounts and show their spend limits."
- "Get all campaigns in ad account act_123456789 and show their status and budget."
- "Show me last week's performance insights for campaign ID 987654321 — impressions, clicks, and CPM."
- "Which ad creative had the highest click-through rate in my top campaign this month?"
- "Get the activity log for ad account act_123456789 from the past 7 days."Troubleshooting Facebook Ads
Error: Invalid OAuth access token — permissions missing
Regenerate your token in the Meta Graph API Explorer and explicitly add the ads_read permission before generating. Long-lived tokens expire — generate a new one if the existing token is older than 60 days.
list_ad_accounts returns an empty list
Ensure the Facebook account associated with your token has access to at least one ad account. Business Manager admins can grant access at business.facebook.com. The token must belong to a user who is listed as an admin or advertiser on the ad account.
Server starts but get_campaign_insights returns no data for a date range
Facebook Ads insights may have a processing delay of up to 48 hours. Try a date range ending two days before today. Also confirm the campaign was active during the specified period using get_campaigns_by_adaccount first.
Frequently Asked Questions about Facebook Ads
What is Facebook Ads?
Facebook Ads is a Model Context Protocol (MCP) server that connects ai assistants to facebook's ads api to enable natural language queries for campaign data, insights, and performance metrics. it allows users to manage ad accounts and retrieve detailed analytics like impressions, clicks, and spend through mc It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Facebook Ads?
Follow the installation instructions on the Facebook Ads GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Facebook Ads?
Facebook Ads works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Facebook Ads free to use?
Yes, Facebook Ads is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Facebook Ads Alternatives — Similar Marketing & SEO Servers
Looking for alternatives to Facebook Ads? Here are other popular marketing & seo servers you can use with Claude, Cursor, and VS Code.
TopRank
★ 2.6kGoogle Ads analysis and operations — read performance, manage keywords, bids, and campaigns.
Open SEO
★ 2.1kOpen source alternative to Semrush and Ahrefs
ASO Skills
★ 1.4kAI agent skills for App Store Optimization (ASO) and app marketing. Built for indie developers, app marketers, and growth teams who want Cursor, Claude Code, or any Agent Skills-compatible AI assistant to help with keyword research, metadata optimiza
Google Meta Ads GA4
★ 994MCP server for Google Ads, Meta Ads & GA4 — works with ChatGPT, Claude, Cursor, n8n, Windsurf & more. 250+ tools for campaign management, analytics & optimization.
Meta Ads
★ 923A Model Context Protocol server that allows AI models to access, analyze, and manage Meta advertising campaigns, enabling LLMs to retrieve performance data, visualize ad creatives, and provide strategic insights for Facebook and Instagram platforms.
Google Search Console
★ 882Connects Google Search Console with Claude AI to enable SEO professionals to analyze their SEO data through natural language conversations, providing access to property information, search analytics, URL inspection, and sitemap management.
Browse More Marketing & SEO MCP Servers
Explore all marketing & seo servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Facebook Ads in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Facebook Ads?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.