MCP Directory

How to add Facebook Ads Library MCP Server to Windsurf

Search and analyze any brand's public Facebook ads — images, videos, messaging, and competitor strategy. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 243 · stdio · apikey

Windsurf config for Facebook Ads Library MCP Server

git clone https://github.com/proxy-intell/facebook-ads-library-mcp.git && cd facebook-ads-library-mcp && ./install.sh
{
  "mcpServers": {
    "facebook-ads-library-mcp-server": {
      "command": "{{PATH_TO_PROJECT}}/venv/bin/python",
      "args": [
        "{{PATH_TO_PROJECT}}/mcp_server.py"
      ]
    }
  }
}

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Facebook Ads Library MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Facebook Ads Library MCP Server's tools become available to Cascade.

Before you start

  • Python 3.12+
  • pip (Python package manager)
  • Claude Desktop or Cursor
  • A ScrapeCreators API key (SCRAPECREATORS_API_KEY) for ads data
  • Optional: a Google Gemini API key (GEMINI_API_KEY) for video analysis

What Facebook Ads Library MCP Server can do in Windsurf

get_meta_platform_id

Returns the Meta platform ID given one or many brand names (supports multiple brands in a batch).

get_meta_ads

Retrieves ads for specific page(s) by platform ID (supports multiple platform IDs in a batch).

analyze_ad_image

Analyzes ad images for visual elements, text, colors, and composition (enhanced caching).

analyze_ad_video

Analyzes a single ad video using Gemini AI for comprehensive insights (enhanced caching).

analyze_ad_videos_batch

Analyzes multiple videos in a single API call for token efficiency (~88% token savings).

get_cache_stats

Gets statistics about cached media (images and videos) and storage usage.

search_cached_media

Searches previously analyzed media by brand, colors, people, or media type.

cleanup_media_cache

Cleans up old cached media files to free disk space.

Security

Requires a ScrapeCreators API key (SCRAPECREATORS_API_KEY) and, optionally for video analysis, a Google Gemini API key (GEMINI_API_KEY). Keys are stored in a local .env file in the project root and loaded automatically at runtime — they are not passed on the command line. Only public Facebook Ads Library data is queried.

Facebook Ads Library MCP Server + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Facebook Ads Library MCP Server config there under the "mcpServers" key and restart the client.

Is Facebook Ads Library MCP Server safe to use with Windsurf?

Requires a ScrapeCreators API key (SCRAPECREATORS_API_KEY) and, optionally for video analysis, a Google Gemini API key (GEMINI_API_KEY). Keys are stored in a local .env file in the project root and loaded automatically at runtime — they are not passed on the command line. Only public Facebook Ads Library data is queried.

Do I need to self-host?

No. Proxy (useproxy.dev) offers a fully hosted version of this MCP that works out of the box in ChatGPT, Claude, Manus, and other MCP clients with nothing to install or configure. Self-hosting via the steps above is optional.

What API keys do I need?

A ScrapeCreators API key (SCRAPECREATORS_API_KEY) is required for ads data. A Google Gemini API key (GEMINI_API_KEY) is optional and only needed for video ad analysis. Both are stored in a local .env file.

Which clients are supported for self-hosting?

The README documents an mcpServers config block for both Claude Desktop and Cursor; the server runs over stdio using the project's virtualenv Python.

View repo Full Facebook Ads Library MCP Server page