facebook-ads-library-mcp

作者 proxy-intell已验证

MCP Server for Facebook ADs Library - Get instant answers from FB's ad library

291
Stars
38
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/proxy-intell/facebook-ads-library-mcp

快速入门

使用 facebook-ads-library-mcp 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Proxy — Facebook Ads Library Hosted MCP

Facebook Ads Library MCP Server

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 analyze ad images/text, analyze video ads with comprehensive insights, 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


Hosted Version (Recommended)

The easiest way to use the Facebook Ads Library MCP is the hosted version from Proxy (useproxy.dev). No API keys, no Gemini key, no Python, no server to run — just connect and start querying.

  • Zero setup — nothing to install, configure, or maintain
  • 🔑 No API keys — skip the ScrapeCreators and Gemini keys entirely
  • 🔌 Works everywhere — ChatGPT, Claude, Cursor, Manus, and anywhere else that supports MCP
  • 🚀 Always up to date — new tools and fixes ship automatically

👉 Get started for free at useproxy.dev →

Prefer to run it yourself? The full self-host setup is documented below.

Hosted vs. Self-Host

Hosted — Proxy (useproxy.dev)Self-Host
Setup timeNone — connect and goPython env + config
API keys requiredNoneScrapeCreators + Gemini
InfrastructureFully managedYou run and maintain it
UpdatesAutomaticManual git pull
Works in ChatGPT, Claude, Cursor, Manus
Best forMost users who just want the dataDevelopers who want to customize the code

For most people, the hosted version is the fastest path. Choose self-host if you specifically want to modify or extend the server yourself.


Example Prompts

Single Brand Analysis

How many ads is 'AnthropicAI' running? What's their split across video and image?
What messaging is 'AnthropicAI' running right now in their ads?
Analyze the video ads from 'Nike' and extract their visual storytelling strategy, pacing, and brand messaging techniques.

Batch Analysis (New!)

Compare the current advertising strategies across Nike, Adidas, and Under Armour. Show me their ad volumes, messaging themes, and creative approaches.
Do a deep comparison to the messaging between 'AnthropicAI', 'Perplexity AI' and 'OpenAI'. Give it a nice forwardable summary.
Analyze the holiday campaign strategies for Coca-Cola, Pepsi, Dr Pepper, and Sprite. What themes are they using?
Get the current ads for all major streaming services: Netflix, Disney+, Hulu, HBO Max, Amazon Prime Video, and Apple TV+. Compare their positioning strategies.

Installation

Prerequisites

  • Python 3.12+
  • Anthropic Claude Desktop app (or Cursor)
  • Pip (Python package manager), install with python -m pip install
  • An API key for an ads data provider, set as SCRAPECREATORS_API_KEY (see configuration below)
  • A Google Gemini API key for video analysis (optional, only needed for video ads)

Prefer not to deal with API keys? See the Hosted Version above to skip setup entirely.

Quick Install (Recommended)

  1. Clone and run the install script
 git clone https://github.com/proxy-intell/facebook-ads-library-mcp.git
 cd facebook-ads-library-mcp

 # For macOS/Linux:
 ./install.sh

 # For Windows:
 install.bat

The install script will:

  • Create a virtual environment for dependency isolation
  • Install all required dependencies
  • Set up your configuration files
  1. Configure your API keys Edit the .env file that was created and add your API keys:
  • Set your ads data API key as SCRAPECREATORS_API_KEY
  • Get your Gemini API key at Google AI Studio (optional, for video analysis)
  1. Follow the displayed MCP configuration The install script will show you the exact configuration to add to Claude Desktop or Cursor.

Manual Install

If you prefer to install manually:

  1. Clone this repository
 git clone https://github.com/proxy-intell/facebook-ads-library-mcp.git
 cd facebook-ads-library-mcp
  1. Create a virtual environment and install dependencies
 python3 -m venv venv
 ./venv/bin/pip install -r requirements.txt
  1. Configure API keys Copy the template and configure your API keys: To obtain API keys:
  • Set your ads data API key as SCRAPECREATORS_API_KEY in the .env file
  • Get a Google Gemini API key here (optional, for video analysis)
  1. Connect to the MCP server Add the MCP server configuration to your Claude Desktop or Cursor config: Replace {{PATH_TO_PROJECT}} with the full path to where you cloned this repository. Note: The configuration uses the virtual environment's Python interpreter (venv/bin/python) for better dependency isolation and reliability. Note: API keys are now automatically loaded from the .env file, so you don't need to pass them as command line arguments. For Claude Desktop: Save this as claude_desktop_config.json in your Claude Desktop configuration directory at: For Cursor: Save this as mcp.json in your Cursor configuration directory at:
  2. 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 intelligently batches and optimizes queries to the ads data API
  3. Smart caching reduces redundant API calls and improves performance
  4. Credit monitoring prevents workflow interruption with proactive error handling
  5. Data flows back through the chain to Claude with enhanced batch information

Available MCP Tools (Enhanced)

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

Tool NameDescriptionBatch Support
get_meta_platform_idReturns platform ID given one or many brand names✅ Multiple brands
get_meta_adsRetrieves ads for specific page(s) (platform ID)✅ Multiple platform IDs
analyze_ad_imageAnalyzes ad images for visual elements, text, colors, and composition⚡ Enhanced caching
analyze_ad_videoAnalyzes single ad video using Gemini AI for comprehensive insights⚡ Enhanced caching
analyze_ad_videos_batchNEW - Analyzes multiple videos in single API call for token efficiency🎬 ~88% token savings
get_cache_statsGets statistics about cached media (images and videos) and storage usage-
search_cached_mediaSearches previously analyzed media by brand, colors, people, or media type-
cleanup_media_cacheCleans up old cached media files to free disk space-

Troubleshooting

Common Issues

🆕 API Credits Exhausted:

  • When you see an "API credits exhausted" message, you need to top up your account
  • The error message includes a direct link to your provider's dashboard
  • You can check your current credit balance and purchase more credits there
  • The server will automatically resume working once credits are available

🆕 Rate Limit Exceeded:

  • If you hit rate limits, the server will tell you how long to wait
  • Batch operations help reduce the chance of hitting rate limits
  • Consider spacing out large batch requests if you frequently hit limits

API Key Not Found Error:

  • Ensure your .env file is in the project root directory
  • If you don't have a .env file, copy it from the template: cp .env.template .env
  • Check that your API keys are correctly formatted without quotes
  • Verify the .env file contains SCRAPECREATORS_API_KEY=your_key_here
  • For video analysis, ensure GEMINI_API_KEY=your_key_here is also added

Video Analysis Not Working:

  • Confirm you have a valid Google Gemini API key in your .env file
  • Video analysis requires the GEMINI_API_KEY environment variable

MCP Server Connection Issues:

  • Verify the path in your MCP configuration points to the correct location
  • Make sure you've created a virtual environment and installed dependencies with python3 -m venv venv && ./venv/bin/pip install -r requirements.txt
  • Ensure your MCP configuration uses the virtual environment Python path (ending with /venv/bin/python)
  • Restart Claude Desktop/Cursor after configuration changes

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


FAQ

What is the easiest way to use the Facebook Ads Library MCP? The easiest way is the hosted version from Proxy (useproxy.dev). It requires no API keys, no installation, and no server — you connect it to ChatGPT, Claude, Cursor, or any MCP client and start querying immediately. You can start for free.

Do I need an API key to use this MCP? Only if you self-host. The hosted version at useproxy.dev handles all data access for you, so no ScrapeCreators or Gemini keys are needed. Self-hosting requires a SCRAPECREATORS_API_KEY (and a Gemini key for video analysis).

Which MCP clients does it work with? Both the hosted and self-hosted versions work with ChatGPT, Claude (Desktop and web), Cursor, Manus, and any other client that supports the Model Context Protocol.

Is there a free version? Yes — the hosted version from Proxy offers a free tier so you can start analyzing ads without any setup.

Should I self-host or use the hosted version? Use the hosted version if you just want fast, reliable access to Facebook Ads Library data with zero maintenance — this fits most users. Self-host only if you want to modify or extend the server code yourself.


Feedback

Your feedback will be massively appreciated. Please tell us which features on that list you like to see next or request entirely new ones.


License

This project is licensed under the MIT License.


Made with ❤️ by the team at Proxy. MseeP.ai Security Assessment Badge

常见问题

What is facebook-ads-library-mcp?

facebook-ads-library-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by proxy-intell. MCP Server for Facebook ADs Library - Get instant answers from FB's ad library. It has 291 GitHub stars.

Is facebook-ads-library-mcp safe to use?

Yes. facebook-ads-library-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install facebook-ads-library-mcp?

Clone the repository with "git clone https://github.com/proxy-intell/facebook-ads-library-mcp" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is facebook-ads-library-mcp written in?

facebook-ads-library-mcp is primarily written in Python. It is open-source under proxy-intell on GitHub, so you can review or fork the full source.

Are there alternatives to facebook-ads-library-mcp?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh facebook-ads-library-mcp against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情