gomarble-ai/google-ads-mcp-server

Community
gomarble-ai

MCP server for Google Ads API with automatic OAuth 2.0 authentication.

Connects Google Ads API to Claude Desktop and other MCP clients. It provides automatic OAuth 2.0 authentication, token refresh, GAQL querying, and keyword research capabilities.

124Updated 4mo ago68/100

What it does

  • Connects Google Ads API to Claude Desktop and other MCP clients.
  • It provides automatic OAuth 2.0 authentication, token refresh, GAQL querying, and keyword research capabilities.

Best for

Listing Google Ads accountsExecuting GAQL queriesGenerating keyword ideasAnalyzing campaign performance
About gomarble-ai/google-ads-mcp-server

gomarble-ai/google-ads-mcp-server is a MCP server categorised under cloud service, api integration, keyword research, google ads. Connects Google Ads API to Claude Desktop and other MCP clients. It provides automatic OAuth 2.0 authentication, token refresh, GAQL querying, and keyword research capabilities.

How to install

Pick your MCP client from the Install panel on this page to get a one-click install link (Cursor, VS Code) or a ready-to-paste configuration for Claude Desktop, Claude Code, Gemini, Codex, Windsurf, and other MCP-compatible clients. No local setup required for remote servers.

License

gomarble-ai/google-ads-mcp-server is released under the MIT license. This is a permissive open-source license, so you can freely use, modify, and distribute it โ€” subject to its terms.

No reviews yet

Be the first to leave a review after using this server in production.

README

Refreshed 4h ago

Google Ads MCP Server ๐Ÿš€

License: MIT Python 3.10+ FastMCP

A FastMCP-powered Model Context Protocol server for Google Ads API integration with automatic OAuth 2.0 authentication

Connect Google Ads API directly to Claude Desktop and other MCP clients with seamless OAuth 2.0 authentication, automatic token refresh, GAQL querying, and keyword research capabilities.

Your browser does not support the video tag.

Easy One-Click Setup

For a simpler setup experience, we offer ready-to-use installers:

๐Ÿ‘‰ Download installer - https://gomarble.ai/mcp

Join our community for help and updates

๐Ÿ‘‰ Slack Community - AI in Ads

Try Facebook ads mcp server also

๐Ÿ‘‰ Facebook Ads MCP - Facebook Ads MCP

โœจ Features

  • ๐Ÿ” Automatic OAuth 2.0 - One-time browser authentication with auto-refresh
  • ๐Ÿ”„ Smart Token Management - Handles expired tokens automatically
  • ๐Ÿ“Š GAQL Query Execution - Run any Google Ads Query Language queries
  • ๐Ÿข Account Management - List and manage Google Ads accounts
  • ๐Ÿ” Keyword Research - Generate keyword ideas with search volume data
  • ๐Ÿš€ FastMCP Framework - Built on the modern MCP standard
  • ๐Ÿ–ฅ๏ธ Claude Desktop Ready - Direct integration with Claude Desktop
  • ๐Ÿ›ก๏ธ Secure Local Storage - Tokens stored locally, never exposed

๐Ÿ“‹ Available Tools

ToolDescriptionParametersExample Usage
list_accountsList all accessible Google Ads accountsNone"List all my Google Ads accounts"
run_gaqlExecute GAQL queries with custom formattingcustomer_id, query, manager_id (optional)"Show me campaign performance for account 1234567890"
run_keyword_plannerGenerate keyword ideas with metricscustomer_id, keywords, manager_id, page_url, date range options"Generate keyword ideas for 'digital marketing'"

Note: All tools automatically handle authentication - no token parameters required!

๐Ÿš€ Quick Start

Prerequisites

Before setting up the MCP server, you'll need:

  • Python 3.10+ installed
  • A Google Cloud Platform account
  • A Google Ads account with API access

๐Ÿ”ง Step 1: Google Cloud Platform Setup

1.1 Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project:
    • Click "Select a project" โ†’ "New Project"
    • Enter project name (e.g., "Google Ads MCP")
    • Click "Create"

1.2 Enable Google Ads API

  1. In your Google Cloud Console:
    • Go to "APIs & Services" โ†’ "Library"
    • Search for "Google Ads API"
    • Click on it and press "Enable"

1.3 Create OAuth 2.0 Credentials

  1. Go to "APIs & Services" โ†’ "Credentials"
  2. Click "+ CREATE CREDENTIALS" โ†’ "OAuth 2.0 Client ID"
  3. Configure consent screen (if first time):
    • Click "Configure Consent Screen"
    • Choose "External" (unless you have Google Workspace)
    • Fill required fields:
      • App name: "Google Ads MCP"
      • User support email: Your email
      • Developer contact: Your email
    • Click "Save and Continue" through all steps
  4. Create OAuth Client:
    • Application type: "Desktop application"
    • Name: "Google Ads MCP Client"
    • Click "Create"
  5. Download credentials:
    • Click "Download JSON" button
    • Save file as client_secret_[long-string].json in your project directory

๐Ÿ”ง Step 2: Google Ads API Setup

2.1 Get Developer Token

  1. Sign in to Google Ads
  2. Go to Tools & Settings (wrench icon in top navigation)
  3. Under "Setup", click "API Center"
  4. Accept Terms of Service if prompted
  5. Click "Apply for token"
  6. Fill out application form:
    • Describe your use case (e.g., "MCP integration for campaign analysis")
    • Provide technical details about your implementation
  7. Submit and wait for approval (usually 1-3 business days)

Note: You'll initially get a test token with limited functionality. After testing, you can apply for production access.

2.2 Find Your Developer Token

Once approved:

  1. Return to API Center in Google Ads
  2. Copy your Developer Token (format: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)

๐Ÿ”ง Step 3: Installation & Setup

3.1 Clone and Install

# Clone the repository
git clone https://github.com/yourusername/google-ads-mcp-server.git
cd google-ads-mcp-server

# Create virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

3.2 Environment Configuration

Create a .env file in your project directory:

# Copy the example file
cp .env.example .env

Edit .env with your credentials:

# Required: Google Ads API Developer Token
GOOGLE_ADS_DEVELOPER_TOKEN=your_developer_token_here

# Required: Path to OAuth credentials JSON file (downloaded from Google Cloud)
GOOGLE_ADS_OAUTH_CONFIG_PATH=/full/path/to/your/client_secret_file.json

Example .env file:

GOOGLE_ADS_DEVELOPER_TOKEN=ABCDEFG1234567890
GOOGLE_ADS_OAUTH_CONFIG_PATH=/Users/john/google-ads-mcp/client_secret_138737274875-abc123.apps.googleusercontent.com.json

๐Ÿ–ฅ๏ธ Step 4: Claude Desktop Integration

4.1 Locate Claude Configuration

Find your Claude Desktop configuration file:

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

4.2 Add MCP Server Configuration

Edit the configuration file and add your Google Ads MCP server:

{
  "mcpServers": {
    "google-ads": {
      "command": "/full/path/to/your/project/.venv/bin/python",
      "args": [
        "/full/path/to/your/project/server.py"
      ]
    }
  }
}

Real Example:

{
  "mcpServers": {
    "google-ads": {
      "command": "/Users/marble-dev-01/workspace/google_ads_with_fastmcp/.venv/bin/python",
      "args": [
        "/Users/marble-dev-01/workspace/google_ads_with_fastmcp/server.py"
      ]
    }
  }
}

Important:

  • Use absolute paths for all file locations
  • On Windows, use forward slashes / or double backslashes \\ in paths
  • Replace your_developer_token_here with your actual developer token

4.3 Restart Claude Desktop

Close and restart Claude Desktop to load the new configuration.

๐Ÿ” Step 5: First-Time Authentication

5.1 Trigger OAuth Flow

  1. Open Claude Desktop
  2. Try any Google Ads command, for example:
    "List all my Google Ads accounts"
    

5.2 Complete Authentication

  1. Browser opens automatically to Google OAuth page
  2. Sign in with your Google account (the one with Google Ads access)
  3. Grant permissions by clicking "Allow"
  4. Browser shows success page
  5. Return to Claude - your command will complete automatically!

5.3 Verify Setup

After authentication, you should see:

  • A google_ads_token.json file created in your project directory
  • Your Google Ads accounts listed in Claude's response

๐Ÿ“– Usage Examples

Basic Account Operations

"List all my Google Ads accounts"

"Show me the account details and which ones have active campaigns"

Campaign Analysis

"Show me campaign performance for account 1234567890 in the last 30 days"

"Get conversion data for all campaigns in the last week"

"Which campaigns have the highest cost per conversion?"

Keyword Research

Alternatives

free

MCP server for the Meta Marketing API

ad creativesaudience managementad campaigns
75/100โ˜… 13javascript

An MCP server to automate Google Ad Manager operations using AI assistants.

creative managementcampaign managementad management
67/100โ˜… 12python
Google Drive
cloud storage
free

This MCP server integrates with Google Drive for file management and Google Shee

officialgoogle drivecloud
9/100โ˜… 274typescript