home / mcp / google ads library mcp server

Google Ads Library MCP Server

MCP Server for Google Ads Library - Get instant answers from Google's ad library

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "talknerdytome-labs-google-ads-library-mcp": {
      "command": "/usr/local/opt/[email protected]/bin/python3",
      "args": [
        "{{PATH_TO_PROJECT}}/google-ads-library-mcp/mcp_server.py"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
        "SCRAPECREATORS_API_KEY": "YOUR_SCRAPECREATORS_API_KEY"
      }
    }
  }
}

You can run the Google Ads Transparency Center as an MCP server to search Google's public ads data, analyze current campaigns, and extract insights from ads across text, image, and video formats. This server lets you query by advertiser domain, retrieve ad details and variations, and leverage tools to analyze media and cached results, all from your preferred MCP client.

How to use

You connect your MCP client to the Google Ads Library MCP Server to start querying Google Ads Transparency Center data. Use your client to search by advertiser domain (for example, a company’s website domain) and retrieve currently running ads, along with their variations and regional statistics. Use the image and video analysis tools to extract visual features, typography, colors, and storytelling techniques, and optionally run video analysis if you have a Gemini API key.

How to install

Prerequisites include Python 3.12 or newer. You also need an API key from Scrape Creators and, optionally, a Google Gemini API key for video analysis.

Quick Install (Recommended)

# 1. Clone the MCP project
git clone https://github.com/trypeggy/google-ads-library-mcp.git
cd google-ads-library-mcp

# 2. Run the install script
./install.sh  # macOS/Linux

# For Windows, run the batch installer
install.bat

How to configure and run the MCP server

After installation, configure your API keys in the created .env file. You need the Scrape Creators API key and, if you plan to analyze videos, a Gemini API key.

If you want to connect via Claude Desktop or Cursor, use the provided MCP configuration snippet in your client configuration. The snippet below shows how to start the MCP server as a local stdio process using Python to run the MCP server script.

{
  "mcpServers": {
    "google_ad_library": {
      "command": "/usr/local/opt/[email protected]/bin/python3",
      "args": [
        "{{PATH_TO_PROJECT}}/google-ads-library-mcp/mcp_server.py"
      ]
    }
  }
}

Available tools

get_google_ads

Retrieves currently running ads for a company from Google Ads Transparency Center by domain or advertiser ID

get_google_ad_details

Fetches detailed information about a specific Google ad, including all variations and regional statistics

analyze_ad_image

Downloads and analyzes ad images for visual elements, text, colors, and composition

analyze_ad_video

Downloads and analyzes ad videos using Gemini AI for comprehensive video insights

get_cache_stats

Provides 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

Removes old cached media files to free disk space