In simple English
This tool lets your AI assistant search and read public Facebook ads directly. It looks at the same web page you see in your browser. You do not need a Facebook account or a paid subscription to an ad spy tool. It pulls the ad copy, the destination web page and the button labels. The AI can then group the ads by advertiser and summarize their marketing angles.
What it is
A Model Context Protocol (MCP) server written in Python that automates a headless browser to scrape the public Facebook Ad Library. It parses the page markup to extract structured ad records without relying on Meta's restricted commercial API.
What it is good for
Solo builders and marketers who want to research competitor ads and landing pages from inside their AI coding assistant or desktop chat app.
- Free and open-source under the MIT licence with no API keys required.
- Extracts structured data including ad copy, button labels and destination links.
- Integrates directly into AI clients like Claude Code and Claude Desktop.
- Requires Python, a headless browser installation and manual configuration files.
- Subject to breaking if Facebook changes its web page layout.
- Does not provide spend or impression data, which Meta hides for commercial ads.
Paid ad library scrapers like Apify actors or manual browser research
Claude Desktop
- unclecode/crawl4ai86k stars
The underlying open-source web crawler used to fetch and render JavaScript pages for AI agents.
- modelcontextprotocol/servers91k stars
A collection of official server integrations for the Model Context Protocol ecosystem.
- PrefectHQ/prefect24k stars
Adds scheduling, retries and a run history to Python functions you already have.
- alirezamika/autoscraper8.1k stars
A Python scraper that learns what to extract from one example you give it.
git clone https://github.com/RamsesAguirre777/facebook-ads-library-mcp.git cd facebook-ads-library-mcp python -m venv venv && source venv/bin/activate pip install -r requirements.txt python -m playwright install chromium