G

Google Ads Mcp Server

Battle-tested mcp for fastmcp, powered, model, context. Includes structured workflows, validation checks, and reusable patterns for marketing.

MCPClipticsmarketingv1.0.0MIT
0 views0 copies

Google Ads Mcp Server

Google Ads Mcp Server is an MCP server that provides AI assistants with access to the Google Ads API through FastMCP, enabling automated campaign management, performance analysis, and advertising optimization with built-in OAuth 2.0 authentication. This MCP bridge allows language models to query Google Ads campaign data, manage bidding strategies, analyze keyword performance, and generate advertising reports through conversational commands.

When to Use This MCP Server

Connect this server when...

  • You manage Google Ads campaigns and want AI assistance with performance analysis, keyword research, and bid optimization
  • Your marketing team needs conversational access to search, display, and video campaign metrics and spend data
  • You are building automated reporting workflows that pull Google Ads data for performance dashboards
  • You need to analyze keyword performance, search term reports, and quality scores through natural language
  • You want AI-driven recommendations for campaign structure, bidding strategies, and budget allocation

Consider alternatives when...

  • Your advertising is exclusively on Meta, LinkedIn, or Amazon without Google Ads involvement
  • You only need the Google Ads web interface without programmatic API access
  • You require Google Analytics data rather than Google Ads campaign management

Quick Start

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

Connection setup:

  1. Set up a Google Ads developer token at ads.google.com/aw/apicenter
  2. Create OAuth 2.0 credentials in the Google Cloud Console
  3. Clone the server repository and install dependencies in a virtual environment
  4. Configure your credentials in the server's environment file
  5. Add the configuration above to your .mcp.json and restart your MCP client

Example tool usage:

# Analyze campaign performance
> Show me the top 10 keywords by conversion rate in the Search campaign last month

# Review ad group performance
> Compare the CTR and CPA across all ad groups in the "Brand" campaign

# Budget optimization
> Which campaigns have the highest cost per conversion and should have budgets reduced?

Core Concepts

ConceptPurposeDetails
CampaignsAd organizationTop-level containers defining advertising goals, networks (Search, Display, Video), and budgets
Ad GroupsKeyword groupingGroups of related keywords and ads within a campaign sharing targeting and bid settings
KeywordsSearch targetingSearch terms and match types that trigger ad display on Google Search results
Quality ScoreAd relevance metricGoogle's rating of keyword, ad, and landing page relevance that affects cost and ad position
OAuth 2.0Secure authenticationAutomatic OAuth authentication flow for secure access to Google Ads API endpoints
Architecture:

+------------------+       +------------------+       +------------------+
|  Google Ads      |       |  Google Ads MCP  |       |  AI Assistant    |
|  API             |<----->|  Server (Python)  |<----->|  (Claude, etc.)  |
|  FastMCP + OAuth | HTTPS |  stdio transport  | stdio |                  |
+------------------+       +------------------+       +------------------+
        |
        v
+------------------------------------------------------+
|  Campaigns > Ad Groups > Keywords > Ads > Reports     |
+------------------------------------------------------+

Configuration

ParameterTypeDefaultDescription
GOOGLE_ADS_DEVELOPER_TOKENstring(required)Google Ads API developer token from your MCC account
GOOGLE_ADS_CLIENT_IDstring(required)OAuth 2.0 client ID from Google Cloud Console
GOOGLE_ADS_CLIENT_SECRETstring(required)OAuth 2.0 client secret for authentication
GOOGLE_ADS_REFRESH_TOKENstring(required)Long-lived OAuth refresh token for persistent API access
GOOGLE_ADS_CUSTOMER_IDstring(required)Google Ads customer ID (without dashes) for the target account

Best Practices

  1. Use the manager account (MCC) for multi-account access. If you manage multiple Google Ads accounts, authenticate through your MCC account. This provides a single authentication point for accessing all linked customer accounts without separate credentials per account.

  2. Specify date ranges for all performance queries. Google Ads contains historical data spanning years. Always include date range filters when querying performance metrics to get relevant, fast results. Use standard date ranges (LAST_7_DAYS, LAST_30_DAYS) for consistency.

  3. Monitor Quality Score trends alongside performance. When analyzing keyword performance, include Quality Score metrics. Low Quality Scores increase costs and reduce ad position. Ask the AI to identify keywords with declining Quality Scores for proactive optimization.

  4. Use GAQL for complex queries. The Google Ads Query Language (GAQL) enables precise data retrieval. When simple filters are not sufficient, ask the AI to construct GAQL queries for complex multi-dimensional performance analysis with custom segmentation.

  5. Test changes on a small scale before broad application. When the AI suggests bid adjustments, keyword additions, or budget changes, apply them to a small subset first. Monitor performance for a few days before rolling changes out across the entire account structure.

Common Issues

OAuth authentication flow fails or token expired. The refresh token used for API access can become invalid if the OAuth consent is revoked or the credentials are regenerated. Re-run the authentication flow to generate a new refresh token. Ensure the OAuth consent screen is configured with the correct API scopes.

"Developer token not approved" error. New Google Ads developer tokens start in test mode with limited functionality. Apply for basic or standard access through the Google Ads API Center to enable full API capabilities including reporting and management operations.

Queries return "Customer not found" for valid account IDs. Ensure the customer ID is formatted without dashes (e.g., 1234567890 not 123-456-7890). Verify the account is linked to your MCC account if using manager-level authentication. Check that the developer token has access to the specified customer account.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates