by trypeggy
facebook-ads-library-mcp is a Model Context Protocol (MCP) server that allows users to search Facebook's public ad library. It enables analysis of advertising strategies, ad content, and competitive landscapes for companies and brands.
This project is a Model Context Protocol (MCP) server specifically designed for the Facebook Ads Library. It allows users to search Facebook's public ad library to analyze advertising strategies of companies and brands.
To use this project, you need Python 3.12+, Anthropic Claude Desktop app (or Cursor), Pip, and an access token from Scrape Creators. The installation involves cloning the repository, obtaining an API token, and connecting to the MCP server by configuring Claude Desktop or Cursor with the provided JSON. Alternatively, you can use Smithery for automatic installation.
get_meta_platform_id
to return platform IDs and get_meta_ads
to retrieve ads for a specific page.This is a Model Context Protocol (MCP) server for the Facebook Ads Library.
With this you can search Facebook's public ads library for any company or brand, see what they're currently running and analyze their advertising. You can analyse ad images/text, get video links, compare companies' strategies, and get insights into what's working in their campaigns.
Here's an example of what you can do when it's connected to Claude.
https://github.com/user-attachments/assets/a47aa689-e89d-4d4b-9df7-6eb3a81937ee
To get updates on this and other projects we work on enter your email here
PS: Join our Twitter community for all things MCP
How many ads is 'AnthropicAI' running? What’s their split across video and image?
What messaging is 'AnthropicAI' running right now in their ads?
Do a deep comparison to the messaging between 'AnthropicAI', 'Perplexity AI' and 'OpenAI'. Give it a nice forwardable summary.
Don't want to deal with code? Try our no-code version
python -m pip install
Clone this repository
git clone https://github.com/trypeggy/facebook-ads-library-mcp.git
cd facebook-ads-library-mcp
Obtain an API token from Scrape Creators
Sign up here
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
Restart Claude Desktop / Cursor
Open Claude Desktop and you should now see the Facebook Ads Library as an available integration.
Or restart Cursor.
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) |
For additional Claude Desktop integration troubleshooting, see the MCP documentation. The documentation includes helpful tips for checking logs and resolving common issues.
Your feedback will be massively appreciated. Please tell us which features on that list you like to see next or request entirely new ones.
This project is licensed under the MIT License.
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by open-strategy-partners
A Model Context Protocol (MCP) server that empowers LLMs to use some of Open Srategy Partners' core writing and product marketing techniques.
by gomarble-ai
Facebook Ads MCP Server is an interface that provides programmatic access to Facebook Ads data and management features. It allows users to automate interaction with their Facebook advertising campaigns and integrate ad data into other systems.
by fetchSERP
Provides access to all FetchSERP API endpoints for SEO analysis, keyword research, SERP retrieval, and web scraping through an MCP server.
by AudienseCo
mcp-audiense-insights is a tool that connects AI agents to the Audiense Insights platform. It enables AI agents to access and analyze marketing insights and audience data for various use cases like market research and content strategy.
by data-skunks
Provides keyword research capabilities—including People Also Ask questions, Google autocomplete suggestions, Reddit and Quora queries, and semantic keyword extraction—through a Model Context Protocol (MCP) server that integrates with KeywordsPeopleUse.
by MarketplaceAdPros
amazon-ads-mcp-server is a server that facilitates interaction with Amazon Advertising data. It allows users to connect their Amazon Advertising accounts to access various advertising resources and reports, enabling automated ad management, custom reporting, and integration with AI/ML models.
by universal-mcp
Braze is a Universal MCP (Model Context Protocol) server that provides a standardized interface for interacting with Braze's tools and services through a unified API. It is designed for managing customer engagement, user profiles, and messaging campaigns.
by netdata
Real-time, per‑second infrastructure monitoring platform that provides instant insights, auto‑discovery, edge‑based machine‑learning anomaly detection, and lightweight visualizations without requiring complex configuration.
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.