Skip to content

Connect Google Ads to Claude: Automate Ads and Keyword Planning

Yuvraj Muley Yuvraj Muley 10 min read AI & Agents
Elaichi from the team behind Truto

Google Ads in Claude, in about a minute.

The best way to connect Google Ads to Claude is Elaichi: connect Google Ads to Elaichi once, then add Elaichi to Claude as a connector. Two steps, about a minute, with a 14‑day free trial and no credit card required.

  • No credit card required
  • 500+ connectors
  • Credentials vaulted, never read back
  1. Start your free trial

    14 days free, no credit card required.

  2. Connect Google Ads

    Once, in Elaichi. Claude never gets more access than you have.

  3. Add Elaichi to Claude

    In Claude, open Customize, then Connectors, press Add and paste the URL. Sign in and approve.

    https://api.elaichi.ai/mcp
TrutoFor product teams

Building Google Ads into your own product? This guide is for you.

Connect Google Ads to Claude using Truto's MCP servers to automate campaign creation, GAQL searches, and keyword planning without building custom API integration infrastructure.

The developer guide

Learn how to connect Google Ads to Claude using Truto's managed MCP server. Automate GAQL queries, campaign generation, and keyword planning with AI.

If you need to connect Google Ads to Claude to automate campaign generation, orchestrate keyword research, or dynamically query performance metrics using GAQL, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's JSON-RPC tool calls and the highly complex Google Ads REST API. You can either build, host, and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses ChatGPT, check out our guide on connecting Google Ads to ChatGPT or explore our broader architectural overview on connecting Google Ads to AI Agents.

Giving a Large Language Model (LLM) read and write access to a sprawling, finance-impacting ecosystem like Google Ads is a serious engineering challenge. You are not dealing with simple CRUD operations. You have to handle hierarchical manager-client account routing, Google Ads Query Language (GAQL) schemas, massive batch mutation payloads, and strict rate limits. Every time Google Ads rolls over its API version (which happens multiple times a year), you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Google Ads, connect it natively to Claude Desktop, and execute complex ad management workflows using natural language.

The Engineering Reality of the Google Ads API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover and invoke tools, the reality of implementing it against the Google Ads API is notoriously painful. The Google Ads API is designed for heavy-duty, atomic batch processing, not lightweight LLM interactions.

If you decide to build a custom Google Ads MCP server, here are the specific integration challenges you will face:

The GAQL Paradigm

Most APIs follow standard REST conventions (GET /campaigns, GET /ad-groups). Google Ads does not. To read data, you must use the Google Ads Query Language (GAQL). You issue complex, SQL-like queries to the search or searchStream endpoints. An LLM needs to know exactly how to construct valid GAQL strings, handle the SELECT, FROM, WHERE, and DURING clauses, and understand which of the 188+ resources can actually be joined together in a single query. If the LLM hallucinates a field that isn't selectable with a specific resource, the API throws an immediate PROHIBITED_FIELD error.

Mutate Operations and Temporary IDs

Writing data to Google Ads is heavily batched. If an LLM needs to create a campaign, an ad group, and an ad, it cannot simply make three sequential HTTP requests without risking state inconsistency. The API expects a single mutateOperations payload. Because the ad group depends on the campaign's ID, and the ad depends on the ad group's ID, you must use temporary resource names (e.g., customers/{customer_id}/campaigns/-1) in the payload to link entities before they are persisted. Teaching an LLM this specific topological sorting and temporary ID assignment logic requires extensive system prompt engineering.

The MCC (Manager Account) Routing Matrix

Google Ads utilizes a strict hierarchy. A Manager Account (MCC) sits above individual client accounts. When making an API request, you authenticate using the OAuth token associated with the user, but you must pass the exact login-customer-id header of the manager account while targeting the specific customer_id in the URL path. If an LLM attempts to call an endpoint without understanding this cross-account routing header matrix, every request will fail with an authorization error, even if the OAuth token is perfectly valid.

Strict Quotas and Rate Limit Handling

Google Ads enforces tight daily API operation limits and strict concurrency controls. Factual note on rate limits: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Google Ads API returns an HTTP 429 (Too Many Requests), Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller (your LLM framework or agent loop) is entirely responsible for detecting these 429s and executing the necessary retry/backoff logic.

How to Generate a Google Ads MCP Server with Truto

Instead of building a proxy server from scratch to handle GAQL schemas, MCC routing, and OAuth token refreshes, you can use Truto to dynamically generate a Google Ads MCP server.

Truto derives MCP tools directly from the underlying API documentation and schemas. The MCP server is fully self-contained; the URL contains a cryptographic token that encodes the target Google Ads account, the tools to expose, and the expiration time.

You can create this MCP server in two ways: via the Truto UI or programmatically via the API.

Method 1: Via the Truto UI

For ad-hoc tasks or local Claude Desktop usage, the UI is the fastest path.

  1. Log into your Truto dashboard and navigate to the Integrated Accounts page for your connected Google Ads instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration. You can restrict the server to specific HTTP methods (e.g., read only) or specific tags (e.g., campaigns).
  5. Click create, and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...).

Method 2: Via the Truto API

For production workflows, you can programmatically provision MCP servers for your end-users. This issues a POST request to Truto, returning a ready-to-use URL.

Endpoint: POST /integrated-account/:id/mcp

{
  "name": "Google Ads Planning Agent",
  "config": {
    "methods": ["read", "write", "custom"]
  },
  "expires_at": "2026-12-31T23:59:59Z"
}

The Truto API provisions the server at the edge and returns the connection details:

{
  "id": "mcp_8f7e6d5c",
  "name": "Google Ads Planning Agent",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": "2026-12-31T23:59:59Z",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

How to Connect the MCP Server to Claude

Once you have the Truto MCP URL, you need to register it with Claude. Because the URL is fully self-contained (handling account routing and authentication inherently), configuration is minimal.

Method A: Via the Claude UI (Web/Enterprise)

If you are using Claude for Work (Team or Enterprise) or ChatGPT:

  1. Navigate to Settings → Integrations (or Connectors in ChatGPT).
  2. Click Add MCP Server (or Add Custom Connector).
  3. Name the connector (e.g., "Google Ads Production").
  4. Paste the Truto MCP URL into the Server URL field.
  5. Click Add. Claude will immediately handshake with the endpoint, pull the Google Ads schemas, and register the tools.

Method B: Via Manual Config File (Claude Desktop)

If you are running Claude Desktop locally or using a custom agent loop (like Cursor), you configure the server using your claude_desktop_config.json file.

Truto MCP servers utilize Server-Sent Events (SSE) as the transport layer. You use the official @modelcontextprotocol/server-sse package to connect.

{
  "mcpServers": {
    "google_ads": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}

Restart Claude Desktop. The model now has direct access to the Google Ads account.

Security and Access Control

Exposing an ad account with a massive daily budget to an LLM requires strict governance. Truto MCP servers enforce security at the edge configuration level:

  • Method Filtering: You can configure the config.methods array during creation. Setting it to ["read"] ensures the LLM can only query data (GAQL searches, forecasting) but physically cannot invoke create or update mutations.
  • Tag Filtering: By using config.tags, you can restrict the LLM to specific functional areas. For example, tagging ["reporting"] limits the AI strictly to analytics endpoints, hiding billing and customer creation tools.
  • Require API Token Auth: Setting require_api_token_auth: true adds a second layer of security. The caller must possess the MCP URL and pass a valid Truto API token in the Authorization header to execute a tool.
  • Automatic Expiry: The expires_at field automatically schedules the server for destruction. Once the timestamp passes, the cryptographic token is purged from the distributed key-value store, immediately invalidating the URL.

Hero Tools for Google Ads

When Claude connects to the Truto MCP server, it receives dynamically generated tools mapped directly to the Google Ads integration. Here are the highest-leverage tools for agentic automation.

This is the ultimate read tool. It allows the LLM to execute arbitrary Google Ads Query Language (GAQL) queries against the account. The LLM can request campaigns, ad groups, metrics, and segments by joining the resources in the GAQL string.

"Write a GAQL query to fetch the campaign name, status, and total impressions over the last 30 days for customer ID 1234567890. Use the google_ads_google_ads_search tool to execute the query and format the results in a markdown table."

This tool allows the agent to conduct real-time keyword research. It hooks into Google's forecasting engine to return historical search volume, competition metrics, and suggested CPC bids based on seed keywords or a target URL.

"I need to run a B2B SaaS campaign. Use the keyword_plan_ideas tool to generate keyword suggestions based on the seed 'API integration platform'. Filter the results to only show keywords with a monthly search volume greater than 1,000."

create_a_google_ads_campaign

This tool executes the campaigns:mutate endpoint. It handles the creation of new campaigns, requiring parameters like name, advertising_channel_type, status, campaign_budget resource names, and bidding strategies (e.g., maximize_conversions).

"We are launching a new product. Create a new Google Ads Search campaign named 'Q3 Product Launch - Exact Match'. Set the status to PAUSED initially, and link it to the campaign budget resource name I provided earlier."

list_all_google_ads_campaign_budgets

Before an LLM can create a campaign, it needs a budget resource. This tool executes a fixed GAQL query over the campaign_budget resource to retrieve all existing budgets, allowing the agent to map existing financial constraints or retrieve resource names for subsequent mutations.

"List all campaign budgets currently active in the account. Identify any budgets that have a delivery method set to ACCELERATED and return their IDs and resource names."

create_a_google_ads_ad_group

Once a campaign exists, this tool creates ad groups within it. The LLM must supply the name, the parent campaign resource name, and the cpc_bid_micros if using manual bidding strategies.

"Create three new ad groups under the 'Q3 Product Launch' campaign. Name them 'Competitor Terms', 'Branded Terms', and 'Generic Software Terms'. Set the default CPC bid to $2.50 (2500000 micros) for each."

create_a_google_ads_ad_group_ad

This tool handles the actual creative layer. It accepts a massive payload defining final_urls and specific ad formats (e.g., responsive_search_ad with its array of headlines and descriptions).

"Draft a Responsive Search Ad for the 'Competitor Terms' ad group. Generate 5 variations of headlines focusing on 'Zero Maintenance Integrations' and 2 descriptions. Use the create_a_google_ads_ad_group_ad tool to push this creative into the account."

To view the complete inventory of available Google Ads tools, schemas, and required parameters, visit the Google Ads integration page.

Workflows in Action

Here is how an AI agent actually utilizes these MCP tools to execute complex, multi-step operations within Google Ads.

Workflow 1: Keyword Discovery and Ad Group Generation

Marketing teams spend hours pulling keyword planner data, exporting it to CSVs, filtering for intent, and mapping those keywords into specific ad groups. An LLM can orchestrate this entire pipeline in seconds.

"Generate keyword ideas for the term 'embedded ipaas'. Analyze the historical search metrics. For any keywords with high competition and a suggested CPC under $15, create a new ad group named 'High Intent - iPaaS' in campaign ID 987654321, and draft a responsive search ad utilizing those exact keywords in the headlines."

Execution Steps:

  1. Generate Keywords: The agent calls google_ads_keyword_plan_ideas_generate_keyword_ideas with the seed phrase, retrieving the metrics payload.
  2. Analyze & Filter: The LLM processes the returned JSON, filtering out keywords that don't match the volume/CPC constraints.
  3. Create Ad Group: The agent invokes create_a_google_ads_ad_group using the target campaign ID to establish the organizational container.
  4. Create Ad Creative: The agent calls create_a_google_ads_ad_group_ad, dynamically generating headlines based on the successful keyword list and pushing the creative to the new ad group.

Workflow 2: Automated Campaign Performance Auditing

Account managers need daily briefings on anomalies, budget pacing, and underperforming assets. An LLM can run scheduled GAQL queries to build diagnostic reports.

"Run a GAQL query to pull the spend, conversions, and cost-per-conversion for all active campaigns over the last 7 days. If any campaign has a CPA higher than $150, list its ad groups and pull the associated ad copy for review."

sequenceDiagram
    participant Claude
    participant Truto as Truto MCP Server
    participant Upstream as Google Ads API
    
    Claude->>Truto: Call google_ads_google_ads_search<br>(Query: SELECT campaign, metrics...)
    Truto->>Upstream: Execute GAQL Search
    Upstream-->>Truto: Return Campaign Metrics JSON
    Truto-->>Claude: Parse GAQL Results
    
    Note over Claude: LLM identifies Campaign ID 444555666<br>has a CPA of $185.
    
    Claude->>Truto: Call google_ads_google_ads_search<br>(Query: SELECT ad_group WHERE campaign.id = 444555666)
    Truto->>Upstream: Execute GAQL Search
    Upstream-->>Truto: Return Ad Group Data
    Truto-->>Claude: Return Context for Review

Execution Steps:

  1. Initial GAQL Query: The agent calls google_ads_google_ads_search with a structured query targeting the campaign and metrics resources.
  2. Data Evaluation: The LLM evaluates the JSON response, isolating the campaign breaching the $150 CPA threshold.
  3. Secondary Investigation: The agent dynamically constructs a second GAQL query, targeting the ad_group_ad resource for the flagged campaign ID, and returns the specific text assets causing the poor performance.

The Future of Ad Operations is Agentic

Connecting Claude to Google Ads via MCP fundamentally changes how media buying and account management work. Instead of human operators navigating rigid UI dashboards or writing fragile python scripts to parse GAQL results, AI agents can continuously monitor performance, draft creative, and execute account restructures autonomously.

By utilizing Truto's dynamic MCP server generation, engineering teams can bypass the brutal realities of Google Ads API maintenance—skipping the OAuth flow management, schema mapping, and Mutate payload structuring—and focus entirely on building high-leverage agentic workflows.

Two ways to put Google Ads to work

Elaichifrom the team behind Truto

For you and your team

Use Google Ads in Claude yourself

Connect Google Ads once, add Elaichi to Claude, and ask. Every call is checked against your own permissions and logged.

Start free, 14 days No credit card required
Truto

For product teams

Ship Google Ads to your customers

Your customers connect their own Google Ads accounts. Your product gets one API and MCP tools for Google Ads, through Truto.

FAQ

What is the easiest way to connect Google Ads to Claude?
The best way to connect Google Ads to Claude is Elaichi: connect Google Ads to Elaichi once, then add Elaichi to Claude as a connector. Two steps, about a minute, with a 14-day free trial and no credit card required.
Does Truto automatically handle Google Ads API rate limits?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Google Ads returns an HTTP 429 error, Truto passes it to the caller and normalizes the rate limit info into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your agent must handle the retry logic.
Can I restrict the LLM from making changes to my Google Ads account?
Yes. When creating the Truto MCP server, you can set the method filters to `["read"]`. This ensures the AI agent can only execute GAQL searches and forecasting, preventing any `create` or `update` mutations.
How does Truto handle Google Ads GAQL queries?
Truto exposes tools like `google_ads_google_ads_search` which allow the LLM to pass valid GAQL query strings directly to the Google Ads API, supporting all 188+ reportable resources, metrics, and segments.
Do I need to manage OAuth tokens for the Google Ads MCP server?
No. The Truto MCP server URL contains a cryptographic token linked to your integrated account. Truto handles the underlying OAuth 2.0 lifecycle and token refreshes automatically.
Google Ads Google Ads in Claude14 days free Start free

More from our Blog