Facebook Ads Library

v1.0.0Marketing & SEOstable

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.

aianalyticsapifacebookfacebook-api
Share:
229
Stars
0
Downloads
0
Weekly
0/5

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

Search Facebook ad library
Analyze competitor ads
Research marketing campaigns
trypeggy

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx facebook-ads-library-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-mcp
2

Create 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.sh
3

Configure 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_here
4

Note 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/python
5

Add 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"
      }
    }
  }
}
6

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.

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.

Quick Config Preview

{ "mcpServers": { "facebook-ads-library-mcp-server": { "command": "npx", "args": ["-y", "facebook-ads-library-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides