TikTok Ads Library MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GEMINI_API_KEY | Yes | Your Google Gemini API key for video analysis. Effectively required since most TikTok ads are video. | |
| SCRAPECREATORS_API_KEY | Yes | Your API key for the ads data provider (ScrapeCreators). Required to query TikTok Ad Library data. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server provides access to TikTok's public Ad Library data through the ScrapeCreators API. It allows you to search for advertisers and retrieve the ads they are running on TikTok.
Workflow:
Use search_tiktok_ads with the registered advertiser name (exact, case-sensitive — e.g. "Anysphere", not "Cursor"). It cannot search by topic or keyword; find advertisers elsewhere first.
Use get_tiktok_ad_details with an ad id from the search results for full creative, landing page, and country targeting data
Use analyze_ad_image/analyze_ad_video for comprehensive media analysis
TikTok CDN media URLs are signed and expire quickly. Always pass ad_id to analyze_ad_video so the server can fetch a fresh URL instead of reusing a stale one from an earlier search.
Re-running search_tiktok_ads for an advertiser 24h+ later reports which ads are new and how many dropped out since the last fetch. For a research job (video scripts, competitor teardown, weekly competitor tracking) call get_playbook first and follow it.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_tiktok_adsA | Search TikTok's public Ad Library for the ads an advertiser is running. Use the registered advertiser name (exact, case-sensitive — e.g. 'Anysphere', not 'Cursor'). Advertiser names only: topic or keyword queries return nothing. Returns ad ids, run dates, spend/impression bands and media URLs. The result's changes block lists ads first shown in the last 7 days and, when the same advertiser was fetched 24h+ ago, which ads are new since then and how many dropped out. For complete analysis of visual elements, colors, design, or creative content, you MUST also use analyze_ad_video (passing ad_id) or analyze_ad_image on the media returned by each ad. |
| get_tiktok_ad_detailsA | Get detailed information about a specific TikTok ad including the full creative, landing page, country targeting, engagement metrics and a fresh playable video URL. Use this with an ad_id from search_tiktok_ads. Essential for analyzing ad content and extracting media URLs for visual analysis. |
| analyze_ad_imageA | Analyze a TikTok ad image (cover frame or static creative): returns the image itself so you can see it, plus a checklist (text, hooks, people, brand elements, composition, safe zones, colors). Pass one cover_images or image_urls entry from search_tiktok_ads. Downloads are cached locally. |
| get_cache_statsA | REQUIRED for checking media cache status and storage usage. Use this tool when users ask about cache statistics, storage space used by cached media (images and videos), or how many files have been analyzed and cached. Essential for cache management and monitoring. |
| search_cached_mediaA | REQUIRED for finding previously analyzed ad media (images and videos) in cache. Use this tool when users want to search for cached media by brand name, find media with people, search by colors, or filter by media type. Essential for retrieving past analysis results without re-downloading media. |
| cleanup_media_cacheB | REQUIRED for cleaning up old cached media files (images and videos) and freeing disk space. Use this tool when users want to remove old cached media, clean up storage space, or when cache becomes too large. Essential for cache maintenance and storage management. |
| analyze_ad_videoA | REQUIRED for analyzing video ads from TikTok. Downloads and analyzes ad videos using Gemini's video understanding to extract the hook, scene-by-scene storytelling, on-screen text, audio/voiceover, pacing and brand messaging. ALWAYS pass ad_id — TikTok CDN URLs are signed and expire within minutes, and ad_id lets the server fetch a fresh URL and cache results stably across sessions. Uses intelligent caching for efficiency. |
| get_playbookA | Load a playbook: the step-by-step method for an ad research job (which tool calls, what to look for, output format). Call it BEFORE starting when the request matches a job, then follow it. Jobs:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| script_writing | Playbook for TikTok video ad scripts, hooks to film, UGC briefs, modelling or recreating a winning ad. |
| competitor_teardown | Playbook for competitors' TikTok hooks, offers, angles and creative formats. |
| competitor_watch | Playbook for tracking competitors on TikTok, what's new since last time, weekly updates. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Most tools have clearly distinct purposes: video vs image analysis, live ad search vs ad detail retrieval, and separate cache stats/search/cleanup operations. The only mild overlap is between search_tiktok_ads and search_cached_media (both 'search'), but the live-API vs cache distinction is made clear in the descriptions.
All tools use snake_case with a verb-first pattern (analyze_*, get_*, search_*, cleanup_*), which is predictable overall. Minor deviations exist in noun ordering, e.g. search_tiktok_ads vs search_cached_media and cleanup_media_cache, but nothing confusing.
Eight tools is well within the sweet spot and each earns its place: search, detail, two media analyzers, three cache operations, and a playbook loader. No redundancy or bloat.
The surface covers the full research lifecycle: discover ads (search_tiktok_ads), inspect one (get_tiktok_ad_details), analyze creative (video/image), plus cache management and guided playbooks. Minor gaps remain—no keyword/topic search and no bulk export—but core workflows are covered.