FA

Facebook Ads Library

Created 5 months ago

MCP server for the Facebook Ads Library to analyze advertising strategies.

development location documentation public ads

What is Facebook Ads Library?

Get any answer from the Facebook Ads Library, conduct deep research including messaging, creative testing and comparisons in seconds.

Documentation

Installation# Prerequisites

  • Python 3.12+
  • Anthropic Claude Desktop app (or Cursor)
  • Pip (Python package manager), install with python -m pip install
  • An access token for Scrape Creators

Steps

  1. Clone this repository
git clone https://github.com/trypeggy/facebook-ads-library-mcp.git
cd facebook-ads-library-mcp
  1. Obtain an API token from Scrape Creators Sign up here
  2. Connect to the MCP server Copy the below json with the appropriate {{PATH}} values and {{API KEY}}:
{
  "mcpServers": {
    "fb_ad_library": {
      "command": "python",
      "args": [
        "{{PATH_TO_SRC}}/fb_ad_library_mcp/src/mcp_server.py",
        "--scrapecreators-api-key",
        "{{YOUR_SCRAPECREATORS_API_KEY}}"
      ]
    }
  }
}

For Claude Desktop: Save this as claude_desktop_config.json in your Claude Desktop configuration directory at:

~/Library/Application Support/Claude/claude_desktop_config.json

For Cursor: Save this as mcp.json in your Cursor configuration directory at:

~/.cursor/mcp.json

For Smithery: To install Facebook Ads Library for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @trypeggy/facebook-ads-library-mcp --client claude
  1. Restart Claude Desktop / Cursor Open Claude Desktop and you should now see the Facebook Ads Library as an available integration. Or restart Cursor.

Technical Details

  1. Claude sends requests to the Python MCP server
  2. The MCP server queries the ScrapeCreator API through tools
  3. Data flows back through the chain to Claude

Available MCP Tools

This MCP server provides tools for interacting with Facebook Ads library objects:

Tool Name Description
get_meta_platform_id Returns platform ID given one or many brand names
get_meta_ads Retrieves ads for a specific page (platform ID)

Troubleshooting

For additional Claude Desktop integration troubleshooting, see the MCP documentation. The documentation includes helpful tips for checking logs and resolving common issues.

Server Config

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

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: No

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: trypeggy
Category: community
License: MIT License
Tags:
development location documentation