Skip to main content
Glama
konstantin-tradient

Meta Ad Library MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
META_ADS_CHANNELNoBrowser channel; set "" to use Playwright's bundled Chromiumchrome
META_ADS_HEADFULNo1 to show the browser window (default headless)
META_ADS_PROFILENoPersistent browser profile dir (keeps the warm session)~/.meta-ads-profile
RESIDENTIAL_PROXY_URLNohttp://user:pass@host:port — route Meta traffic through a residential proxy (required on datacenter hosts)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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