Meta Ad Library MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| META_ADS_CHANNEL | No | Browser channel; set "" to use Playwright's bundled Chromium | chrome |
| META_ADS_HEADFUL | No | 1 to show the browser window (default headless) | |
| META_ADS_PROFILE | No | Persistent browser profile dir (keeps the warm session) | ~/.meta-ads-profile |
| RESIDENTIAL_PROXY_URL | No | http://user:pass@host:port — route Meta traffic through a residential proxy (required on datacenter hosts) |
Capabilities
Features and capabilities supported by this server
| 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_adsA | Search the Meta Ad Library by keyword — returns the advertiser + description for each ad (supports loading 50+). Fast by default. Args: keyword: free-text query (e.g. "dental implants"). country: ISO-2 country code (e.g. "DE", "AE"); use an EU country to find ads with EU-reach data. "ALL" = no country filter. limit: max ads to return (paginates by scrolling; 50 is fine). fetch_reach: if True, also clicks each result in one warm session to add eu_total_reach + breakdown (slower: ~3-4s/ad; use for ≤50). Returns: {keyword, country, count, ads:[{library_id, page_name, status, body_text, cta, link_url, start_date, end_date, versions, eu_total_reach?, uk_total_reach?, reach_breakdown?}]}. Ads not delivered in the EU have eu_total_reach=null (Meta's design). For a single ad's reach later, use get_ad_details(keyword, library_id, country). |
| get_ad_detailsA | Fetch one ad's EU/UK reach + per-country/age/gender breakdown. Args: keyword: the same keyword you searched (reach only loads from the keyword-search page, so we re-find the ad there). library_id: the ad's Library ID (from search_ads). country: ISO-2 country code, or "ALL". Returns: {library_id, eu_total_reach, uk_total_reach, gender_audience, age_audience, location_audience, reach_breakdown:[{country, age_gender:[...]}]}. Note: ads not delivered in the EU have eu_total_reach=null (Meta's design). |
| session_statusA | Health check: is the browser ready, what egress IP, any recent challenge? |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/konstantin-tradient/meta-ad-library-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server