MCP Server

Connect ScrapeAdLibrary to Claude, ChatGPT, Cursor and Claude Code through the Model Context Protocol.

Connect from Claude or ChatGPT (no install)

Add ScrapeAdLibrary as a custom connector with this URL, then sign in with your ScrapeAdLibrary account and allow access. It works on the web, desktop and mobile apps of the same account, with no API key to copy and nothing to install.

https://api.scrapeadlibrary.com/mcp

Tool calls use your credits exactly like the API: lists cost 1 credit per 10 results (an empty result is free), an ad detail 2 credits, an advertiser page 1; failed calls are free. See or disconnect your connected apps in Dashboard → Connected apps.

Claude (claude.ai, Desktop, mobile)

  1. Open Customize → Connectors.
  2. Click + Add, then Add custom connector.
  3. Name it ScrapeAdLibrary, paste the URL above as the remote MCP server URL, click Continue.
  4. Keep the authentication Claude detects (OAuth sign-in) and click Add.
  5. Sign in with your ScrapeAdLibrary account and click Allow.
  6. In a chat, open + → Connectors and turn ScrapeAdLibrary on.

The Free plan allows one custom connector. On Team and Enterprise an owner adds it in Organization settings → Connectors, then each member connects their own account.

ChatGPT

  1. Open chatgpt.com/plugins on the web.
  2. Click the plus button, then Add custom MCP server.
  3. Name it ScrapeAdLibrary and paste the URL above as the Server URL under Connection.
  4. Choose OAuth as authentication, confirm I understand and want to continue, then Create as a plugin.
  5. Install it, sign in with your ScrapeAdLibrary account and click Allow.
  6. In a new chat, type @ and pick ScrapeAdLibrary.

Your account or workspace must allow custom MCP servers; workspace admins can restrict them.

Claude Code and other MCP clients

Any client that supports remote MCP servers with OAuth (Streamable HTTP) can use the same URL. In Claude Code, add it and then run /mcp to sign in:

claude mcp add --transport http scrapeadlibrary https://api.scrapeadlibrary.com/mcp

What is MCP?

The Model Context Protocol (MCP) lets AI assistants call external tools. With the ScrapeAdLibrary MCP server, your assistant can search the Meta Ad Library, read ad details with EU transparency data and look up advertisers by itself. Tool calls cost the same credits as API calls, through the connector above (your account) or the local server below (your API key).

Local server with an API key (for developers)

Prefer to run the server on your machine? The open-source package scrapeadlibrary-mcp runs with uvx and uses an API key from your dashboard. Same tools as the connector. Choose your AI assistant:

// claude_desktop_config.json
{
  "mcpServers": {
    "scrapeadlibrary": {
      "command": "uvx",
      "args": ["scrapeadlibrary-mcp"],
      "env": {
        "SCRAPEADLIBRARY_API_KEY": "sal_your_api_key"
      }
    }
  }
}

Available Tools

Once connected, your AI assistant can use these 5 tools:

search_adsSearch ads by keyword or page, country, status, media type, platform and dates
get_adFull ad detail with EU transparency data (reach, age, gender, countries)
get_pageAdvertiser page profile: category, likes, Instagram, active ads
get_page_adsAll the ads of one advertiser page
search_pagesFind advertisers that ran ads matching a keyword

Example Prompts

Once the MCP server is connected, try asking your AI:

“Find the active video ads about running shoes in Italy and summarize their hooks”

“Which advertisers ran ads for "solar panels" in Germany this month?”

“Show me the ads Nike is running on Instagram right now”

“What EU audience did ad 1550534860016399 reach, by age and gender?”

“Compare the calls to action of the top 30 ads for "meal kit" in the US”

Credits, Limits and Privacy

Every tool call is a normal API call made with your key: it costs the same credits (1 credit per 10 ads or advertisers in a list, 2 credits for an ad with its details, 1 for an advertiser page) and shows up in the usage page of your dashboard. Errors are never billed. The tools ask for small pages of results by default, so an assistant that explores a topic does not burn through your balance; ask it explicitly when you want more ads.

The server runs on your machine and only talks to the ScrapeAdLibrary API. Your prompts are not sent to us: we only see the API requests the assistant decides to make, the same way we see requests from your own code. Image and video links in the results point to Meta's CDN and expire after a few days.

Troubleshooting

  • The tools do not appear: make sure uvx is installed (it comes with uv) and restart the assistant after editing its configuration file.
  • 401 errors: the key in SCRAPEADLIBRARY_API_KEY is missing or revoked; create a new one in the dashboard.
  • 402 errors: the account is out of credits. Top up from the billing page or wait for next month's free credits.

Next Steps