Listen to this Post

Introduction
The Google Ads interface has long been a labyrinth of tabs, filters, and buried metrics — a place where diagnosing a ROAS drop can cost you 45 minutes of clicking through campaign settings, search terms, and bid adjustments. But a fundamental shift is underway: the Model Context Protocol (MCP), an open standard published by Anthropic in November 2024, now allows AI assistants like Claude to speak directly to your Google Ads data through natural language. Hasnain Ali, an SEO and GEO expert, has built 21 skills that plug directly into Claude via MCP — no dashboards, no new tools to learn, just plain English questions that return actionable, data-driven answers pulled from your live campaigns. This isn’t a forecasting tool or a generic recommendation engine — it’s a direct pipeline from your Google Ads account to an AI that understands PPC strategy.
Learning Objectives
- Objective 1: Understand how the Model Context Protocol (MCP) enables natural language querying of Google Ads data and the technical setup required to connect Claude to your ad account.
- Objective 2: Master the seven most impactful skills — from campaign diagnostics and wasted spend audits to Quality Score deep dives and PMax breakdowns — and learn how to implement them in your workflow.
- Objective 3: Gain hands-on knowledge of Google Ads Query Language (GAQL), negative keyword automation scripts, and security considerations for read-only vs. read-write MCP server configurations.
- The MCP Architecture: How Claude Talks to Google Ads
The Model Context Protocol is a JSON-RPC 2.0 specification that standardises how large language models communicate with external tools, APIs, and data sources. Think of it as a universal translator between AI assistants and the vast ecosystem of advertising platforms. When you connect your Google Ads account to Claude via MCP, you’re essentially installing a local-first server that speaks the Google Ads REST API directly.
Step‑by‑Step Setup Guide
Step 1: Install an MCP Server for Google Ads
There are multiple open-source implementations available. The most straightforward approach uses npm:
npm install -g @zleventer/google-ads-mcp
Alternatively, for Python environments:
pip install mcp-google-ads
Step 2: Obtain Google Ads API Credentials
- Navigate to the Google Ads API Center and apply for a developer token (this typically takes 24–48 hours for approval).
- In the Google Cloud Console, create OAuth 2.0 credentials. For audit and analysis work, use a read-only OAuth scope to minimise security risk.
- Download your OAuth client JSON file and set the following environment variables:
export GOOGLE_ADS_DEVELOPER_TOKEN="your_developer_token" export GOOGLE_ADS_CLIENT_ID="your_oauth_client_id" export GOOGLE_ADS_CLIENT_SECRET="your_oauth_client_secret" export GOOGLE_ADS_REFRESH_TOKEN="your_refresh_token"
Step 3: Configure Claude Desktop
Open Claude Desktop → Settings (gear icon) → Developer → Edit Config. Add the following to your MCP servers configuration:
{
"mcpServers": {
"google-ads": {
"command": "npx",
"args": ["-y", "@zleventer/google-ads-mcp"],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "your_token",
"GOOGLE_ADS_CLIENT_ID": "your_client_id",
"GOOGLE_ADS_CLIENT_SECRET": "your_secret",
"GOOGLE_ADS_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
Step 4: Verify the Connection
Once configured, ask Claude a simple question: “List all my accessible Google Ads accounts”. If the connection is successful, Claude will return your account IDs and names — no CSV exports, no manual data pulling.
- Campaign Diagnostics: ROAS Drop Investigation in 30 Seconds
One of the most painful experiences in PPC management is watching Return on Ad Spend (ROAS) plummet on a Wednesday morning and spending the next hour clicking through every possible diagnostic screen. The Campaign Diagnostics skill eliminates this friction entirely.
How It Works
The skill queries your campaign performance data using GAQL (Google Ads Query Language) — the modern query language for the Google Ads API that replaced AWQL. Behind the scenes, Claude constructs a query similar to:
SELECT campaign.id, campaign.name, metrics.cost_micros, metrics.conversions_value, metrics.conversions, segments.date FROM campaign WHERE segments.date DURING LAST_14_DAYS AND campaign.status = "ENABLED" ORDER BY segments.date DESC
Step‑by‑Step Diagnostic Workflow
Step 1: Ask Claude: “My ROAS dropped on Wednesday — what happened?”
Step 2: Claude pulls the following dimensions automatically:
- Day‑over‑day cost and conversion data
- Campaign‑level performance breakdowns
- Device and geo segmentation
- Bid strategy adjustments
Step 3: Claude returns a structured analysis:
- Which campaigns underperformed
- Whether the drop is cost‑driven (increased spend without conversions) or conversion‑driven (fewer conversions at same spend)
- Specific recommendations for bid adjustments or budget reallocation
The key insight here is that Claude doesn’t just show you data — it interprets it. A 30‑second interaction replaces what previously required 45 minutes of tab‑switching across the Google Ads UI.
3. Wasted Spend Audit and Negative Keyword Automation
Search terms that generate spend without conversions are the silent killers of Google Ads profitability. The Wasted Spend Audit skill pulls every search term with $20+ spend and zero conversions, grouped by campaign, and outputs a ready‑to‑paste negative keyword list.
Technical Implementation
The underlying MCP server uses the Google Ads REST API to fetch search term data. The query structure typically follows:
SELECT campaign.id, campaign.name, ad_group.id, ad_group.name, keyword_view.text, keyword_view.match_type, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions FROM keyword_view WHERE metrics.cost_micros > 20000000 -- $20+ spend AND metrics.conversions = 0 AND segments.date DURING LAST_30_DAYS
Step‑by‑Step Audit Process
Step 1: Ask Claude: “Audit my wasted spend — find search terms with over $20 spend and zero conversions.”
Step 2: Claude executes the query, groups results by campaign, and calculates total wasted spend.
Step 3: Claude generates a negative keyword list formatted for direct import into Google Ads:
[bash] term1 [bash] term2 [bash] term3
Automation Script Alternative
For teams that prefer native Google Ads scripts, you can implement a similar automation using Google Apps Script:
function main() {
var campaignIterator = AdsApp.campaigns()
.withCondition("metrics.cost_micros > 20000000")
.withCondition("metrics.conversions = 0")
.forDateRange("LAST_30_DAYS")
.get();
var negativeKeywords = [];
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
var searchTermIterator = campaign.keywords()
.withCondition("metrics.cost_micros > 20000000")
.withCondition("metrics.conversions = 0")
.forDateRange("LAST_30_DAYS")
.get();
while (searchTermIterator.hasNext()) {
var keyword = searchTermIterator.next();
negativeKeywords.push(keyword.getText());
}
}
Logger.log("Negative keywords to add: " + negativeKeywords.join(", "));
}
4. Budget Optimizer: Data‑Driven Scenario Planning
“What happens if I shift 20% from Campaign A to Campaign B?” This question typically receives a generic forecast from Google’s built‑in tools — but with the Budget Optimizer skill, Claude answers using your actual historical data, not hypothetical models.
The Technical Approach
The skill analyzes historical performance across campaigns, calculating marginal ROI at different spend levels. It uses:
- Cost micros (spend in millionths of a currency unit)
- Conversion value per campaign
- Diminishing returns curves based on historical data
Step‑by‑Step Budget Optimization
Step 1: Ask Claude: “What happens if I shift 20% of Campaign A’s budget to Campaign B?”
Step 2: Claude calculates:
- Current ROAS for both campaigns
- Projected performance post‑shift based on historical marginal returns
- Potential total conversion value increase or decrease
Step 3: Claude provides a recommendation with confidence intervals, explaining why the shift makes sense (or doesn’t).
The key differentiator: this isn’t a black‑box forecast. Claude can explain the logic behind each recommendation, making it a coaching tool as much as an optimization engine.
- Quality Score Deep Dive: Fixing the Biggest Leakers First
Quality Score is one of the most critical yet opaque metrics in Google Ads. The Quality Score Deep Dive skill scores every keyword on expected CTR, ad relevance, and landing page experience — then ranks them by spend so you fix the biggest problems first.
GAQL Query for Quality Score
SELECT keyword_view.text, keyword_view.match_type, keyword_view.quality_score, keyword_view.quality_score_expected_ctr, keyword_view.quality_score_ad_relevance, keyword_view.quality_score_landing_page, metrics.cost_micros, metrics.impressions, metrics.clicks FROM keyword_view WHERE segments.date DURING LAST_30_DAYS AND keyword_view.quality_score IS NOT NULL ORDER BY metrics.cost_micros DESC
Step‑by‑Step Quality Score Analysis
Step 1: Ask Claude: “Deep dive my Quality Scores — show me the biggest spenders with low scores.”
Step 2: Claude returns a ranked list:
- Keywords with the highest spend and lowest Quality Score
- Breakdown of which component (expected CTR, ad relevance, or landing page) is dragging the score down
Step 3: Claude provides specific fixes:
- For Expected CTR: rewrite ad copy to better match the keyword
- For Ad Relevance: create more targeted ad groups
- For Landing Page: improve page load speed or content relevance
- PMax Breakdown: Uncovering What Google Hides Inside Performance Max
Performance Max campaigns are notoriously opaque. Google provides high‑level metrics but buries the granular data — asset group ROAS, worst‑performing assets, and the search categories actually driving spend. The PMax Breakdown skill surfaces all of this.
How It Works
PMax campaigns don’t expose the same level of detail as standard search campaigns, but the MCP server can still query asset‑level performance and search category data. The skill pulls:
- Asset group ROAS and cost
- Individual asset performance (headlines, descriptions, images)
- Search categories driving the most spend
Step‑by‑Step PMax Audit
Step 1: Ask Claude: “Break down my PMax campaign — show me asset group ROAS and worst‑performing assets.”
Step 2: Claude queries the asset performance data and returns:
– A table of asset groups with ROAS and spend
– Identification of underperforming assets (low CTR, low conversion rate)
– Search categories that are consuming budget without converting
Step 3: Claude recommends:
- Which assets to pause or replace
- Which search categories to exclude
- Budget reallocation between asset groups
- Full Account Audit: The $2,000 Senior PPC Review in Minutes
The Full Account Audit skill reviews your entire Google Ads structure — budget allocation, bid strategies, keyword coverage, conversion tracking, and more. It’s the kind of audit a senior PPC specialist would charge $2,000 for, delivered in plain English through conversation.
Audit Scope
- Budget Allocation: Are you over‑investing in low‑ROI campaigns?
- Bid Strategies: Are your automated bidding strategies aligned with your goals?
- Keyword Coverage: Are you missing high‑intent keywords?
- Conversion Tracking: Is tracking properly implemented and attributed?
- Account Structure: Are campaigns and ad groups logically organised?
Step‑by‑Step Audit Process
Step 1: Ask Claude: “Run a full account audit.”
Step 2: Claude systematically queries each component of your account and generates a comprehensive report.
Step 3: Claude provides a prioritised action list — what to fix first, what to monitor, and what’s working well.
What Undercode Say
- Key Takeaway 1: The Model Context Protocol represents a paradigm shift in how we interact with advertising platforms. By enabling natural language queries against live API data, MCP eliminates the friction of dashboard navigation and manual data extraction. The 21 skills built by Hasnain Ali demonstrate that the most valuable AI applications aren’t generative content — they’re generative analysis that turns raw data into actionable intelligence.
-
Key Takeaway 2: Security and access control are critical considerations. Many MCP servers support read‑only OAuth scopes, which should be the default for audit and analysis work. For write operations — such as pausing keywords, setting bids, or adjusting budgets — the MCP ecosystem is implementing two‑step safety layers: draft a change, review the preview, then confirm execution. This guardrail approach ensures that AI‑driven automation doesn’t accidentally cripple a live campaign.
The broader implication is that AI is moving from being a content generator to a data interface. The days of learning complex UI workflows to extract insights are numbered. Within 12–24 months, we’ll see similar MCP integrations for every major advertising platform — Meta Ads, LinkedIn Ads, TikTok Ads, and beyond. The skills themselves will become commoditised, but the strategic thinking required to ask the right questions will become the new differentiator. The professionals who thrive will be those who can articulate their business problems clearly enough for an AI to solve them.
Prediction
- +1 The democratisation of PPC analytics through MCP will lower the barrier to entry for small businesses and solo marketers, enabling data‑driven decision‑making without hiring a dedicated analyst or agency.
-
+1 The 21‑skill framework will inspire a wave of community‑built skills across industries — not just for Google Ads, but for analytics platforms, CRM systems, and e‑commerce data — creating an ecosystem of AI‑native data tools.
-
-1 The reliance on AI for diagnostic and optimisation tasks may create a skills gap where new marketers never learn the underlying mechanics of the platforms they manage, potentially leaving them vulnerable when AI tools fail or produce incorrect recommendations.
-
-1 As MCP servers gain write access to ad accounts, the risk of catastrophic misconfiguration increases. A single misinterpreted natural language command — “pause all underperforming keywords” — could devastate a campaign if the AI’s definition of “underperforming” doesn’t align with business reality.
-
+1 The open‑source nature of most MCP implementations ensures transparency and auditability, allowing organisations to inspect exactly what data is being accessed and how it’s being used — a significant advantage over black‑box AI tools.
-
+1 The integration of MCP with multiple AI clients — Claude, ChatGPT, Cursor, Windsurf, and others — means that these capabilities aren’t locked into a single vendor, fostering competition and innovation.
-
-1 Google’s API rate limits and developer token approval process create a bottleneck that could slow widespread adoption. Organisations with large, complex accounts may find that AI‑driven queries hit API limits during peak usage periods.
▶️ Related Video (70% Match):
https://www.youtube.com/watch?v=5td0iXhdIWQ
🎯Let’s Practice For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
IT/Security Reporter URL:
Reported By: Hasnainaligeo Built – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


