Google Ads

v1.0.0Marketing & SEOstable

A FastMCP-powered Model Context Protocol server for Google Ads API integration with automatic OAuth 2.0 authentication Connect Google Ads API directly to MCP Clients with seamless OAuth 2.0 authentication, automatic token refresh, GAQL querying, and

ai-agentsgeminigooglegoogle-adsgoogle-ads-api
Share:
206
Stars
0
Downloads
0
Weekly
0/5

What is Google Ads?

Google Ads is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to fastmcp-powered model context protocol server for google ads api integration with automatic oauth 2.0 authentication connect google ads api directly to mcp clients with seamless oauth 2.0 authenticati...

A FastMCP-powered Model Context Protocol server for Google Ads API integration with automatic OAuth 2.0 authentication Connect Google Ads API directly to MCP Clients with seamless OAuth 2.0 authentication, automatic token refresh, GAQL querying, and

This server falls under the Marketing & SEO category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A FastMCP-powered Model Context Protocol server for Google A

Use Cases

Connect to Google Ads API with OAuth 2.0 authentication.
Query and manage advertising campaigns programmatically.
Analyze ad performance with GAQL queries.
ZLeventer

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y google-ads

Manual Installation

npx -y google-ads

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Google Ads

The Google Ads MCP server is a FastMCP-powered bridge that connects AI assistants directly to the Google Ads API, exposing 22 tools covering campaigns, ad groups, keywords, RSA assets, audiences, budgets, and competitive insights. It handles OAuth 2.0 authentication and automatic token refresh so that you can query campaign performance, analyse keyword quality scores, inspect asset strength ratings, and run arbitrary GAQL queries — all through natural language in Claude or another MCP client. This is particularly useful for PPC analysts who want to surface actionable insights without writing custom reporting scripts.

Prerequisites

  • Node.js 18+ or Docker installed
  • A Google Ads account with API access enabled and a Developer Token obtained from the Google Ads API Centre
  • OAuth 2.0 credentials (Client ID, Client Secret, and a Refresh Token) from Google Cloud Console
  • Your Google Ads Customer ID (no dashes, e.g. 1234567890)
  • An MCP client such as Claude Desktop or Cursor
1

Obtain Google Ads API credentials

In Google Cloud Console, create an OAuth 2.0 client ID of type 'Desktop app'. Use the OAuth Playground or a local script to exchange your authorization code for a refresh token scoped to https://www.googleapis.com/auth/adwords. Also retrieve your Developer Token from the Google Ads UI under Tools > API Centre.

2

Note your Customer ID

Find your Google Ads Customer ID in the top-right of the Google Ads UI. Remove all dashes — for example, 123-456-7890 becomes 1234567890. If you use a Manager (MCC) account, also note the MCC Customer ID for GOOGLE_ADS_LOGIN_CUSTOMER_ID.

3

Run the server with npx

The easiest way to start the server is via npx. Pass all required credentials as environment variables on the command line or in your shell profile.

GOOGLE_ADS_DEVELOPER_TOKEN=your_dev_token \
GOOGLE_ADS_CLIENT_ID=your_client_id \
GOOGLE_ADS_CLIENT_SECRET=your_client_secret \
GOOGLE_ADS_REFRESH_TOKEN=your_refresh_token \
GOOGLE_ADS_CUSTOMER_ID=1234567890 \
npx -y google-ads-mcp
4

Configure Claude Desktop

Add the server to claude_desktop_config.json so Claude Desktop launches it automatically on startup. All credentials are supplied as environment variables under the env key.

{
  "mcpServers": {
    "google-ads": {
      "command": "npx",
      "args": ["-y", "google-ads-mcp"],
      "env": {
        "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN",
        "GOOGLE_ADS_CLIENT_ID": "YOUR_CLIENT_ID",
        "GOOGLE_ADS_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "GOOGLE_ADS_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN",
        "GOOGLE_ADS_CUSTOMER_ID": "1234567890",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "MCC_CUSTOMER_ID"
      }
    }
  }
}
5

Restart Claude Desktop and test

Restart Claude Desktop so it picks up the new configuration. Ask Claude to list your campaigns or pull keyword performance data to confirm the connection works.

Google Ads Examples

Client configuration

Full claude_desktop_config.json entry for the Google Ads MCP server with all required environment variables.

{
  "mcpServers": {
    "google-ads": {
      "command": "npx",
      "args": ["-y", "google-ads-mcp"],
      "env": {
        "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN",
        "GOOGLE_ADS_CLIENT_ID": "YOUR_CLIENT_ID",
        "GOOGLE_ADS_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "GOOGLE_ADS_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN",
        "GOOGLE_ADS_CUSTOMER_ID": "1234567890"
      }
    }
  }
}

Prompts to try

Representative prompts that exercise the 22 available Google Ads tools.

- "Show me the top 10 keywords by cost in my Search campaigns this month."
- "Which RSA assets are rated LOW and should be replaced?"
- "Compare mobile vs desktop CPA for Campaign XYZ over the last 30 days."
- "List all campaigns with impression share loss due to budget."
- "Run a GAQL query: SELECT campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_30_DAYS"

Troubleshooting Google Ads

Authentication errors or 'Developer token not approved'

Ensure your Developer Token has at least Basic Access approved in Google Ads API Centre. Test access level is restricted to test accounts only. Also confirm GOOGLE_ADS_CUSTOMER_ID has no dashes.

Refresh token expiry or 'invalid_grant' errors

OAuth refresh tokens can expire if unused for 6 months or if you revoke access. Re-run the OAuth flow to generate a new refresh token and update GOOGLE_ADS_REFRESH_TOKEN in your config.

MCC accounts returning data for wrong customer

Set GOOGLE_ADS_LOGIN_CUSTOMER_ID to your MCC account's Customer ID and GOOGLE_ADS_CUSTOMER_ID to the specific child account you want to query. Both values must have no dashes.

Frequently Asked Questions about Google Ads

What is Google Ads?

Google Ads is a Model Context Protocol (MCP) server that fastmcp-powered model context protocol server for google ads api integration with automatic oauth 2.0 authentication connect google ads api directly to mcp clients with seamless oauth 2.0 authentication, automatic token refresh, gaql querying, and It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Google Ads?

Install via npm with the command: npx -y google-ads. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Google Ads?

Google Ads works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Google Ads free to use?

Yes, Google Ads is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Marketing & SEO MCP Servers

Explore all marketing & seo servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "google-ads": { "command": "npx", "args": ["-y", "google-ads"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Google Ads?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides