Facebook Ad Library MCP CLI logo

Facebook Ad Library MCP CLI

by @thenavidm

Searches Meta’s public Ad Library for advertiser research, creative analysis, EU transparency data, and ad comparisons.

Install Facebook Ad Library MCP CLI

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "thenavidm-facebook-ad-library-mcp-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@thenavidm/facebook-ad-library-mcp-cli"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

@thenavidm/facebook-ad-library-mcp-cli exposes Facebook Ad Library data through both an MCP server and a command-line interface. Its nine tools search ads, resolve advertiser Page IDs, inspect creatives, transcribe videos, compare advertiser activity, retrieve EU transparency data, generate public library URLs, and check backend status. The archive covers ads on Facebook, Instagram, Messenger, Threads, and Audience Network across countries, without an API key. Use the MCP surface in compatible AI applications or the CLI from terminals, scripts, cron jobs, and CI.

Use cases

  • Search competitor ads by advertiser or keyword
  • Compare which ads an advertiser started or stopped
  • Inspect images and transcribe video creatives
  • Retrieve EU ad spend, reach, and demographic data
  • Export selected ad fields to scripts or CI jobs

Key features

  • Nine shared MCP tools and CLI commands
  • Facebook Ad Library search across Meta placements
  • Advertiser Page ID lookup
  • Ad creative inspection and video transcription
  • Advertiser activity diffs and EU transparency data
  • JSON, compact, field-selection, and schema output modes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 32d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · @thenavidm/facebook-ad-library-mcp-cli (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars15Stargazers on the source repository.
npm downloads945Package downloads in the last 30 days.
Last commit24d agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Facebook Ad Library MCP CLI works

What @thenavidm/facebook-ad-library-mcp-cli does

@thenavidm/facebook-ad-library-mcp-cli makes Meta’s public Facebook Ad Library available to AI agents and command-line workflows. It can search ads by keyword or advertiser, identify a brand’s Facebook Page ID, retrieve an individual ad, inspect its images, and transcribe video creative.

The server also supports advertiser activity comparisons, EU-specific transparency data, and links that people can open directly in the Ad Library. Its archive covers advertising shown on Facebook, Instagram, Messenger, Threads, and Audience Network, with searches available for advertisers in any country.

The package provides nine capabilities through two interfaces: an MCP server for AI applications and a CLI for shell users. Both interfaces use the same tool definitions and names, so an operation available through one surface is available through the other.

How it works

The MCP entry point is launched by an MCP client, for example with npx -y @thenavidm/facebook-ad-library-mcp-cli. The client receives the server’s tool definitions and can call the Ad Library operations during a conversation. The CLI exposes the same operations as commands such as search-ads, list-advertisers, and get-ad.

The implementation is built on Slipway, which generates the MCP server and CLI from a shared definition for each tool. This keeps command behavior and MCP behavior aligned. The data comes from a public advertising archive, so normal searches do not require an account, API key, or confirmation flag.

For shell automation, commands can return JSON with --json, reduce output to one line with --compact, and select particular fields with --select. The --agent option produces compact JSON without prompts. schema <command> prints the JSON Schema for a CLI command’s corresponding MCP tool.

Setup and configuration

Install and launch the package through npx when configuring an MCP client. A Claude Code configuration can be added with:

Terminal
claude mcp add facebook-ad-library -- npx -y @thenavidm/facebook-ad-library-mcp-cli

Claude Desktop can install the packaged .mcpb extension from the project’s latest GitHub release. The MCP process is normally started by the client rather than run manually.

For terminal or automation use, install the package so that facebook-ad-library-cli is available, then invoke a command directly:

bash
facebook-ad-library-cli list-advertisers --query ridge
facebook-ad-library-cli search-ads --page-id 123456789 --country US

Use facebook-ad-library-cli <command> --help for command-specific arguments. The public archive does not require an API key. The doctor command, exposed as the backend_status MCP tool, checks whether the setup is working.

Tools and capabilities

The nine shared tools are:

  • search_ads: Find ads using a keyword or advertiser, with options such as Page ID and country.
  • list_advertisers: Locate a brand and obtain its Facebook Page ID.
  • get_ad: Read an individual ad in detail.
  • view_ad_creative: Examine an ad’s images or other creative view.
  • transcribe_ad: Produce a transcription for a video ad.
  • diff_advertiser: Compare what an advertiser has started or stopped running.
  • get_eu_transparency: Retrieve EU ad spend, reach, and demographic information.
  • ad_library_url: Create a link that a person can open in the Ad Library.
  • backend_status: Check the tool’s setup and backend status; the CLI equivalent is doctor.

The CLI uses dashed command names, while MCP uses underscored tool names. For example, search-ads is the CLI form of search_ads, and get-eu-transparency maps to get_eu_transparency.

These capabilities fit competitor research, creative monitoring, advertiser activity reviews, and workflows that need to pass structured ad data to scripts or other agent tools.

Limitations and notes

The MCP server and CLI are alternative access surfaces over the same nine tools. An MCP client is needed for the server interface; a terminal, script, cron job, or CI environment uses the CLI instead. Applications that load MCP tool definitions on every message may incur model input-token usage, while the CLI avoids loading the server’s tools until a command is run.

The CLI returns documented exit codes for successful execution, usage errors, missing results, rejected keys, upstream failures, exhausted credits, and an unavailable backend. Scripts can use those codes to branch instead of parsing human-readable output.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Facebook Ad Library MCP CLI

@thenavidm/facebook-ad-library-mcp-cli is an MCP server that connects AI applications to Meta’s public Facebook Ad Library. Its main tools search ads, find advertiser Page IDs, retrieve and inspect creatives, transcribe videos, compare advertiser activity, get EU transparency data, create library URLs, and check backend status.

Install it through an MCP client with `npx -y @thenavidm/facebook-ad-library-mcp-cli`. For Claude Code, run `claude mcp add facebook-ad-library -- npx -y @thenavidm/facebook-ad-library-mcp-cli`; Claude Desktop can install the packaged `.mcpb` extension.

Yes, Cursor is listed as a supported MCP client for this package. Configure Cursor to launch the package’s MCP entry point with `npx -y @thenavidm/facebook-ad-library-mcp-cli`.

No, the public Ad Library operations do not require an API key. The same data access is available through the MCP server or through the `facebook-ad-library-cli` command-line interface.

Run the CLI commands directly, such as `facebook-ad-library-cli search-ads --query "wallet" --country GB`. Use `--json` for structured output, `--compact` for one-line output, `--select` to keep named fields, and `--help` to inspect a command.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFacebook Ad Library MCP CLI AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/thenavidm-facebook-ad-library-mcp-cli?style=directory)](https://allmcps.com/mcp/thenavidm-facebook-ad-library-mcp-cli)
HTML Embed
<a href="https://allmcps.com/mcp/thenavidm-facebook-ad-library-mcp-cli"><img src="https://allmcps.com/api/badge/thenavidm-facebook-ad-library-mcp-cli?style=directory" alt="Facebook Ad Library MCP CLI on AllMCPs" /></a>