meta-ad-library-mcp

Search live active ads from the Meta Ad Library (Facebook & Instagram). Allows AI models in Claude and Cursor to inspect competitor ad creatives, extract marketing hooks, and identify winning ads.

Документация

meta-ad-library-mcp

Glama

Searches the official Meta Ad Library API with your own access token. Free and open source.

Status: experimental. The live API request has not been tested with a real token.

Install

This package is not on npm. Do not use npx meta-ad-library-mcp: a package of that name on npm would not be this project.

git clone https://github.com/Abdul-Basit-Zahid/meta-ad-library-mcp.git
cd meta-ad-library-mcp
npm install
npm run build

Then add it to your MCP client's config, using the full path to the folder:

{
  "mcpServers": {
    "meta-ad-library-mcp": {
      "command": "node",
      "args": ["/full/path/to/meta-ad-library-mcp/dist/index.js"],
      "env": { "META_ACCESS_TOKEN": "your own token" }
    }
  }
}

Tools

ToolWhat it doesInputs
search_meta_adsSearch the official Meta Ad Library API with your own access token. Which ads Meta returns depends on country and ad type.keyword, countryCode, minDaysActive, mediaType, maxAds
analyze_competitor_adsSummarise the ads Meta returns for a search: how many, how long they have run, and the longest-running one. Needs your token.brandName, countryCode, sampleSize
get_ad_library_urlBuild a Meta Ad Library web link to open and check by hand. Needs no token and reads no data.keyword, countryCode

Limits

  • You need a Meta developer account, access to the Ad Library API, and your own token. Meta may require identity confirmation.
  • Third-party guides report that outside the EU and UK the API returns only ads about social issues, elections or politics, not ordinary commercial ads. Check Meta's current Ad Library API documentation before relying on it.
  • Follow Meta's terms. Without a token, searches return an error.
  • Never share your token or paste it into a chat.

License

MIT © 2026 Abdul-Basit-Zahid. The license covers this code, not the data it reads.