Build a Model Context Protocol (MCP) server that provides access to Facebook's Ad Library through web scraping. The server should allow clients to search for advertisements with various filters and retrieve comprehensive ad data.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"fbadlibrarymcpserver": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server that provides access to Facebook's Ad Library through web scraping. This server exposes a single MCP tool for searching advertisements with comprehensive filtering options.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in marketing / browser
Browser automation with Puppeteer for web scraping and testing
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
MCP Security Weekly
Get CVE alerts and security updates for FbAdLibraryMCPServer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server that provides access to Facebook's Ad Library through web scraping. This server exposes a single MCP tool for searching advertisements with comprehensive filtering options.
git clone <repository-url>
cd FbAdLibraryMCPServer
npm install
npx playwright install
npm run dev
npm run build
npm start
The server will start on port 3000 (configurable via PORT environment variable).
search_adsSearch for Facebook ads with optional filters.
Parameters:
company (string, optional): Company/advertiser name to filter bystart_date (string, optional): Start date in YYYY-MM-DD formatend_date (string, optional): End date in YYYY-MM-DD formatkeywords (array of strings, optional): Keywords to search in ad contentlimit (integer, optional): Maximum ads to return (default: 50, max: 100)order (string, optional): Sort order - "date_desc", "date_asc", or "relevance" (default: "date_desc")Example Tool Call:
{
"tool": "search_ads",
"arguments": {
"company": "Nike",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"keywords": ["running", "shoes"],
"limit": 10,
"order": "date_desc"
}
}
Response Format:
{
"ads": [
{
"id": "unique_ad_identifier",
"advertiser": "Company Name",
"content": "Ad text content",
"start_date": "Jan 15, 2024",
"end_date": "Feb 15, 2024",
"impressions": "1,000-5,000",
"spend": "$100-$500",
"platforms": ["Facebook"],
"creative_url": "https://...",
"demographics": {"targeting": "..."},
"scraped_at": "2024-01-20T10:30:00Z"
}
]
}
Connect to the server using any MCP-compatible client:
HTTP Transport:
http://localhost:3000/mcpContent-Type: application/jsonHealth Check:
http://localhost:3000/healthzsrc/index.ts): Express HTTP server hosting MCP protocolsrc/mcp/searchAdsHandler.ts): Core business logicsrc/scraper/scrapeFacebookAds.ts): Playwright-based Facebook scrapersrc/utils/filters.ts): Date parsing and filtering utilitiesThis server successfully bypasses Facebook's anti-bot detection through: