meta-ad-library-mcp
从 Meta Ad Library(Facebook 和 Instagram)搜索正在投放的广告。允许 Claude 和 Cursor 中的 AI 模型查看竞争对手的广告创意、提取营销钩子并识别效果出色的广告。
文档
meta-ad-library-mcp
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
| Tool | What it does | Inputs |
|---|---|---|
search_meta_ads | Search 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_ads | Summarise 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_url | Build 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.