Ad Library MCP
Searches and analyzes competitor ads and content across Meta, Google, Instagram, TikTok, and YouTube with AI-powered creative analysis and cross-platform brand discovery.
README
Ad Library MCP
MCP server for searching competitor ads and content across Meta Ad Library, Google Ads Transparency Center, and Instagram. Zero auth required — all data sources are public.
Tools
| Tool | Platform | What it does |
|---|---|---|
resolve-company |
Cross-platform | Find a company using 5 parallel strategies: name search, domain lookup, keyword search, website scrape, and active ad count verification. Returns confidence-ranked matches. |
meta-search-ads |
Meta | Search ads by keyword or company page ID. Configurable limit (1-1000). |
meta-get-ad |
Meta | Full ad details: copy, carousel cards (per-card content), caption, video URLs, targeting, transcript, Ad Library link. |
google-search-ads |
List ads by domain or advertiser ID. Optional full details (headlines, descriptions, impressions, regions). | |
google-get-ad |
Full ad details: creative variations, OCR text, impression ranges, regional breakdown, Transparency Center link. | |
analyze-creatives |
Cross-platform | Batch Gemini AI analysis of images and videos: visual descriptions, text overlay extraction, full verbatim transcripts, messaging themes, hooks. |
ig-search-reels |
Search Reels by keyword, ranked by viral ratio (views / followers). BREAKOUT/STRONG/GOOD labels. | |
ig-get-profile |
Creator profile with top Reels sorted by views and viral ratio. | |
ig-get-transcript |
Transcribe a Reel via ScrapeCreators (Gemini AI fallback). | |
tiktok-search-videos |
TikTok | Search videos by keyword or #hashtag, ranked by viral ratio. Auto-detects hashtags. |
tiktok-get-profile |
TikTok | Creator profile with top videos ranked by views and viral ratio. |
tiktok-get-comments |
TikTok | Video comments sorted by likes. Optional keyword filter for finding audience pain points. |
youtube-search-creators |
YouTube | Search creators in a niche, ranked by median views/subscribers across surfaced videos. Returns subs, top videos, and view/like/comment engagement as % of subscribers. |
youtube-get-profile |
YouTube | Channel profile + top videos with views/likes/comments expressed as % of subscribers. Useful for benchmarking against audience size. |
Quick Start
# Clone and install
git clone https://github.com/superpower-growth/ad-library-mcp.git
cd ad-library-mcp
npm install
# Configure
cp .env.example .env
# Edit .env — add your ScrapeCreators API key (required)
# Optionally add Gemini API key for creative analysis
# Run
npm run dev
How resolve-company Works
The most important tool — finds the right brand across platforms using a 2-phase approach that minimizes API credits.
Phase 1 (always runs, ~3 credits):
| Strategy | What it does | Cost |
|---|---|---|
| 1. Name search | Searches Meta companies + Google advertisers by brand name | 2 credits |
| 2. Domain lookup | Infers domain from name, searches Google by domain | 1 credit |
| 4. Website scrape | Fetches homepage, parses for Facebook page link | Free |
Phase 2 (only if Phase 1 result is ambiguous, +1-4 credits):
| Strategy | What it does | Cost |
|---|---|---|
| 3. Keyword search | Searches Meta ads for the domain in ad content — finds partner/influencer pages | 1 credit |
| 5. Ad count verify | Checks active ad count on top Meta pages — strongest signal | 1 credit each (up to 3) |
Caching: Results cached for 10 minutes. Second lookup for the same brand is instant (0 credits).
Credit efficiency by brand type:
| Scenario | Credits | Time |
|---|---|---|
| Well-known brand (e.g. Function Health, 110K likes) | 3 | ~2s |
| Ambiguous brand (e.g. Superpower, generic name) | 7 | ~8s |
| Cached lookup (any brand, within 10 min) | 0 | instant |
Results are confidence-ranked (high/medium/low). Active ad count is the tiebreaker — likes can be misleading (a 17K-like unrelated page vs a 3K-like brand with 240 active ads).
Usage Flow
1. resolve-company query="<brand name>"
→ Confidence-ranked matches with Page IDs, Advertiser IDs, active ad counts
→ Also surfaces related pages (influencer/partner pages running ads to the same domain)
2. meta-search-ads page_id="<page_id>" limit=10
→ Newest ads with copy, format, CTA, carousel card count, and Ad Library links
3. meta-get-ad id="<ad_id>" get_transcript=true
→ Full ad detail: carousel cards with per-card content, caption, video transcript, targeting
4. google-search-ads domain="<domain>" get_ad_details=true
→ Headlines, descriptions, impressions, regions, landing pages, Transparency Center links
5. analyze-creatives creatives=[{url: "<image_or_video_url>", type: "video"}]
→ Batch AI analysis: visual descriptions, full verbatim transcript, messaging themes, hooks
→ Images: ~2-3s each (5 concurrent). Videos: ~15-50s each (2 concurrent). Cached per session.
6. ig-search-reels query="<keyword>"
→ Reels ranked by viral ratio (views / followers)
→ BREAKOUT (10x+), STRONG (3-10x), GOOD (1-3x)
7. ig-get-profile handle="<instagram_handle>"
→ Creator profile + top Reels sorted by views with viral ratio
8. ig-get-transcript url="<reel_url>"
→ Full verbatim transcript of a Reel
9. tiktok-search-videos query="<keyword>" or query="#hashtag"
→ Videos ranked by viral ratio (views / followers)
10. tiktok-get-profile handle="<tiktok_handle>"
→ Creator profile + top videos with viral ratio
11. tiktok-get-comments url="<video_url>" keyword="<optional_filter>"
→ Audience comments sorted by likes, filterable by keyword
12. youtube-search-creators query="<niche>" content_type="videos"
→ Creators ranked by median views/subscribers; top videos with engagement % per creator
13. youtube-get-profile handle="<channel_handle>"
→ Channel + top videos with views/likes/comments as % of subscribers
Add to Claude Code
Once deployed, your team can add it with one command:
claude mcp add ad-library --transport http https://ad-library-mcp.fly.dev/mcp
Or add to .mcp.json:
{
"ad-library": {
"type": "http",
"url": "https://ad-library-mcp.fly.dev/mcp"
}
}
Environment Variables
| Variable | Required | Description |
|---|---|---|
SCRAPECREATORS_API_KEY |
Yes | API key from scrapecreators.com |
GEMINI_API_KEY |
No | Google AI key for analyze-creatives tool. Get at aistudio.google.com |
GEMINI_MODEL |
No | Gemini model (default: gemini-2.5-flash) |
PORT |
No | Server port (default: 3002) |
Deploy to Fly.io
fly launch
fly secrets set SCRAPECREATORS_API_KEY=your-key
fly secrets set GEMINI_API_KEY=your-key # optional
fly deploy
Data Sources
- Meta Ad Library — via ScrapeCreators API. Ad copy, images, video URLs, CTA, impressions, spend, targeting, carousel cards, transcripts.
- Google Ads Transparency Center — via ScrapeCreators API. Headlines, descriptions, impressions, regions, creative variations, OCR text.
- Instagram — via ScrapeCreators API. Reels search, profile data, user reels with play counts, built-in transcription. Viral ratio ranking (views / followers) for identifying breakout content.
- TikTok — via ScrapeCreators API. Keyword and hashtag video search, creator profiles, video comments with keyword filtering. Viral ratio ranking for identifying breakout content.
- YouTube — via ScrapeCreators API. Niche search across videos and shorts, channel details with subscriber counts, top videos with views/likes/comments, all engagement signals expressed as % of subscribers. Note: YouTube does not expose share count.
- Gemini AI — optional. Batch image/video analysis with visual descriptions, full verbatim transcripts, and messaging theme classification (social-proof, pain-agitate-solve, benefit-driven, etc.).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。