Facebook Ads Library
Enables searching and analyzing Facebook's public ads library to see what companies are currently running, including ad images/text, video links, and campaign insights.
What is Facebook Ads Library?
Facebook Ads Library is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables searching and analyzing facebook's public ads library to see what companies are currently running, including ad images/text, video links, and campaign insights.
Enables searching and analyzing Facebook's public ads library to see what companies are currently running, including ad images/text, video links, and campaign insights.
This server falls under the Marketing & SEO category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables searching and analyzing Facebook's public ads librar
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx facebook-ads-library-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Facebook Ads Library
The Facebook Ads Library MCP Server connects AI assistants to Meta's public ads data, allowing you to search and analyze active ad campaigns across Facebook, Instagram, and other Meta platforms. It uses the ScrapeCreators API to fetch real ad creatives, copy, images, and video links, and optionally leverages Google Gemini to analyze video ad content. Marketers, growth teams, and competitive researchers can use it to benchmark competitor ad strategies, track campaign messaging, and surface visual storytelling patterns at scale.
Prerequisites
- Python 3.9+ installed on your system
- A ScrapeCreators API key (required) — sign up at scrapecreators.com
- A Google Gemini API key (optional, only needed for video ad analysis)
- An MCP-compatible client such as Claude Desktop or Cursor
- Git installed to clone the repository
Clone the repository
Clone the Facebook Ads Library MCP Server repository to your local machine.
git clone https://github.com/proxy-intell/facebook-ads-library-mcp.git
cd facebook-ads-library-mcpCreate a virtual environment and install dependencies
Set up a Python virtual environment and install all required packages. On macOS/Linux you can also run the provided install script.
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
# Or on macOS/Linux: ./install.shConfigure environment variables
Create a .env file in the project root with your API credentials. SCRAPECREATORS_API_KEY is required; GEMINI_API_KEY is only needed if you want to analyze video ads.
SCRAPECREATORS_API_KEY=your_scrapecreators_api_key_here
GEMINI_API_KEY=your_gemini_api_key_hereNote the path to your virtual environment Python binary
The MCP client config must point to the venv Python interpreter, not the system Python, to ensure all dependencies are available.
# On macOS/Linux:
which ./venv/bin/python
# Example output: /Users/yourname/facebook-ads-library-mcp/venv/bin/pythonAdd the server to your MCP client configuration
Edit your claude_desktop_config.json (or equivalent) to register the server using the virtual environment Python path.
{
"mcpServers": {
"facebook-ads-library": {
"command": "/absolute/path/to/facebook-ads-library-mcp/venv/bin/python",
"args": ["-m", "server"],
"env": {
"SCRAPECREATORS_API_KEY": "your_scrapecreators_api_key_here",
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}Restart your MCP client
Restart Claude Desktop or your MCP client so it picks up the new server. The tools get_meta_platform_id, get_meta_ads, analyze_ad_image, and analyze_ad_video will become available.
Facebook Ads Library Examples
Client configuration
Full claude_desktop_config.json entry for the Facebook Ads Library MCP server using a virtual environment Python interpreter.
{
"mcpServers": {
"facebook-ads-library": {
"command": "/Users/yourname/facebook-ads-library-mcp/venv/bin/python",
"args": ["-m", "server"],
"env": {
"SCRAPECREATORS_API_KEY": "your_scrapecreators_api_key_here",
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}Prompts to try
Example prompts for competitive ad research and campaign analysis using the Facebook Ads Library tools.
- "How many active ads is Nike currently running on Meta platforms?"
- "Fetch the latest 10 ads from Anthropic and summarize their messaging strategy."
- "Compare the advertising approaches of OpenAI, Anthropic, and Perplexity side by side."
- "Analyze the visual composition and color palette used in Adidas's recent ad images."
- "What call-to-action phrases appear most frequently in competitor ads for project management software?"Troubleshooting Facebook Ads Library
Server fails to start with 'ModuleNotFoundError'
Ensure your MCP client config uses the absolute path to the venv Python binary (e.g., /Users/yourname/facebook-ads-library-mcp/venv/bin/python), not the system Python, so all installed dependencies are found.
get_meta_ads returns no results or rate limit errors
Verify your SCRAPECREATORS_API_KEY is valid and has sufficient quota. The key is required for all ad fetching operations — without it the tools will fail silently or return errors.
analyze_ad_video fails or returns an error about missing API key
Video analysis requires a valid GEMINI_API_KEY set in your .env file or MCP env config. If you don't need video analysis, you can leave this key empty and only use analyze_ad_image instead.
Frequently Asked Questions about Facebook Ads Library
What is Facebook Ads Library?
Facebook Ads Library is a Model Context Protocol (MCP) server that enables searching and analyzing facebook's public ads library to see what companies are currently running, including ad images/text, video links, and campaign insights. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Facebook Ads Library?
Follow the installation instructions on the Facebook Ads Library GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Facebook Ads Library?
Facebook Ads Library works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Facebook Ads Library free to use?
Yes, Facebook Ads Library is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Facebook Ads Library Alternatives — Similar Marketing & SEO Servers
Looking for alternatives to Facebook Ads Library? 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 Library 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 Library?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.