2
min read
Overview
The Google Ads MCP (Model Context Protocol) Server is a powerful integration that provides comprehensive access to your Google Ads account data and performance metrics. This server enables you to retrieve detailed campaign insights, analyze keyword performance, track conversions, and execute custom queries using Google's advanced GAQL (Google Ads Query Language).
Key Benefits:
Complete Campaign Access: Connect to all your Google Ads accounts and retrieve comprehensive advertising data
Advanced Query Capabilities: Execute any custom GAQL query for specialized analysis
Real-time Performance Data: Access up-to-date campaign metrics, costs, and conversion data
Flexible Reporting: Create custom reports with any combination of metrics and dimensions
Multi-Account Management: Manage and analyze multiple Google Ads accounts, including manager account hierarchies
Tool Reference
1. List Google Ads Accounts
Purpose: Discover and access all Google Ads accounts available to your credentials.
What it does: Retrieves a complete list of all Google Ads accounts you have access to, including both directly accessible accounts and managed accounts through manager account hierarchies. This tool automatically identifies manager accounts and their sub-accounts.
Key Parameters:
No required parameters - automatically discovers all accessible accounts
Account Information Retrieved:
Account ID: Unique Google Ads customer ID (required for all other operations)
Account Name: Descriptive name of the account
Access Type: Direct access or managed through parent account
Manager Status: Whether the account is a manager account
Hierarchy Level: Account level in manager account structure
Parent ID: Manager account ID (for managed accounts)
Sample Use Cases:
Initial setup to discover available accounts
Account access verification and auditing
Understanding account hierarchy structure
Identifying which accounts require manager_id parameter
Example Request:
Example Output:
2. Execute Custom GAQL Queries
Purpose: Run any custom Google Ads Query Language (GAQL) query to retrieve specific advertising data and metrics.
What it does: Provides unlimited flexibility to query any Google Ads data using GAQL, Google's SQL-like query language designed specifically for advertising data. This is the most powerful tool for custom analysis and reporting.
Key Parameters:
customer_id (required): Google Ads customer ID as string (10 digits, no dashes)
query (required): Valid GAQL query to execute
manager_id (optional): Required for managed accounts - use parent account ID
GAQL Query Structure:
Common GAQL Query Patterns
Campaign Performance Analysis
Purpose: Analyze overall campaign effectiveness and ROI.
Sample Use Cases:
Campaign performance monitoring
Budget allocation optimization
ROI analysis and reporting
Campaign comparison and benchmarking
Basic Campaign Metrics Query:
Example Output:
Keyword Performance Analysis
Purpose: Analyze keyword effectiveness and search term performance.
Sample Use Cases:
Keyword bid optimization
Search term discovery
Match type performance analysis
Negative keyword identification
Keyword Performance Query:
Example Output:
Conversion and Revenue Tracking
Purpose: Monitor conversion performance and revenue attribution.
Sample Use Cases:
ROI and ROAS calculation
Conversion rate optimization
Revenue attribution analysis
Performance-based budget allocation
Conversion Revenue Query:
Key Revenue Metrics:
metrics.conversions_value: Direct conversion revenue (primary metric for ROI)
metrics.all_conversions_value: Total attributed revenue (includes view-through)
metrics.cost_micros: Cost in micros (divide by 1,000,000 for actual cost)
Search Term Insights
Purpose: Discover which search terms are triggering your ads and driving performance.
Sample Use Cases:
Search term discovery for keyword expansion
Negative keyword identification
Match type optimization
Campaign targeting refinement
Search Term Analysis Query:
Budget and Cost Analysis
Purpose: Analyze budget utilization and cost efficiency across campaigns.
Sample Use Cases:
Budget allocation optimization
Cost-per-acquisition monitoring
Spend pattern analysis
Budget utilization tracking
Budget Analysis Query:
Device and Geographic Performance
Purpose: Analyze performance across different devices and geographic locations.
Sample Use Cases:
Device bid adjustments
Geographic targeting optimization
Mobile vs desktop performance analysis
Location-based budget allocation
Device Performance Query:
Geographic Performance Query:
Advanced GAQL Features
Date Range Options
Relative Date Ranges:
LAST_7_DAYS
- Previous 7 daysLAST_30_DAYS
- Previous 30 daysLAST_WEEK
- Previous complete weekLAST_MONTH
- Previous complete monthTHIS_MONTH
- Current month to dateTHIS_YEAR
- Current year to date
Specific Date Ranges:
Filtering and Conditions
Numeric Filters:
Text Filters:
Status Filters:
Sorting and Limiting
Sorting Options:
Result Limiting:
Resource Types and Key Fields
Campaign Resource
campaign.id - Unique campaign identifier
campaign.name - Campaign name
campaign.status - ENABLED, PAUSED, REMOVED
campaign.advertising_channel_type - SEARCH, DISPLAY, SHOPPING, etc.
Ad Group Resource
ad_group.id - Unique ad group identifier
ad_group.name - Ad group name
ad_group.status - ENABLED, PAUSED, REMOVED
ad_group.type - STANDARD, DISPLAY_STANDARD, etc.
Keyword View Resource
ad_group_criterion.keyword.text - Keyword text
ad_group_criterion.keyword.match_type - EXACT, PHRASE, BROAD
ad_group_criterion.status - ENABLED, PAUSED, REMOVED
Common Metrics
metrics.impressions - Number of times ads were shown
metrics.clicks - Number of clicks received
metrics.cost_micros - Cost in micros (divide by 1,000,000 for dollars)
metrics.conversions - Number of conversions
metrics.conversions_value - Conversion value in account currency
metrics.ctr - Click-through rate (clicks/impressions)
metrics.average_cpc - Average cost per click in micros
Segment Fields
segments.date - Date of the data (YYYY-MM-DD format)
segments.device - MOBILE, DESKTOP, TABLET
segments.day_of_week - MONDAY, TUESDAY, etc.
segments.hour - Hour of day (0-23)
Best Practices
Query Optimization
Always include date ranges: Use specific date ranges rather than open-ended queries
Filter early: Apply WHERE clauses to reduce data volume
Limit results: Use LIMIT to prevent overwhelming responses
Select specific fields: Only request needed fields to improve performance
Account Management
Use List Accounts first: Always discover accounts before running queries
Check managed accounts: Use manager_id parameter for managed accounts
Validate customer IDs: Ensure customer_id is formatted as 10-digit string
Data Analysis
Understand micros: Many cost fields are in micros (divide by 1,000,000)
Use appropriate metrics: Choose between conversions vs all_conversions based on needs
Consider attribution: Understand difference between direct and attributed conversions
Error Prevention
Required fields: Include campaign.id when querying campaign-related resources
Valid resources: Use correct resource names (keyword_view, not keywords)
Date constraints: All date ranges must be finite
Text matching: Use LIKE '%text%' instead of CONTAINS
Getting Started
Prerequisites
Active Google Ads account with API access enabled
Google Cloud Console project with Google Ads API enabled
Valid OAuth2 credentials with appropriate scopes
Developer token from Google Ads (required for API access)
Required API Scopes
https://www.googleapis.com/auth/adwords
- Full Google Ads API access
Basic Workflow
Account Discovery: Start with "List Google Ads Accounts" to identify available accounts
Account Structure: Note which accounts are managed (require manager_id parameter)
Basic Analysis: Run simple campaign performance queries
Advanced Analysis: Create custom GAQL queries for specific needs
Performance Monitoring: Set up regular queries for ongoing optimization
Sample Getting Started Queries
1. Verify Account Access:
2. List Active Campaigns:
3. Basic Performance Overview:
Common Use Case Examples
Daily Performance Monitoring
Keyword Optimization Analysis
Budget Utilization Report
Conversion Performance by Device
Troubleshooting
Common Error Messages
"Customer not found" or "not accessible"
Verify customer_id is correct 10-digit format
For managed accounts, include manager_id parameter
Check account access permissions
"Invalid query" or "syntax error"
Verify GAQL syntax is correct
Check field names and resource types
Ensure proper use of quotes and operators
"Permission denied"
Check API credentials and developer token
Verify OAuth2 scopes include adwords access
Ensure account has API access enabled
"Field not found"
Use correct field names (e.g., ad_group_criterion.keyword.text, not keyword.text)
Check resource-specific field availability
Refer to Google Ads API documentation for valid fields
Data Quality Issues
Missing Recent Data:
Google Ads data typically has 3-hour delay for most metrics
Conversion data may have longer delays
Use appropriate date ranges
Unexpected Cost Values:
Remember cost fields are in micros (divide by 1,000,000)
Check currency settings in account
Verify date range and filtering
Zero Conversions:
Check conversion tracking setup
Verify attribution windows
Consider using all_conversions for broader view
Performance Issues
Slow Query Response:
Limit date ranges to reasonable periods
Use LIMIT clause to restrict result size
Filter data early with WHERE clauses
Request only necessary fields
API Rate Limits:
Implement proper request spacing
Use efficient queries to minimize API calls
Cache frequently accessed data
Support and Resources
Getting Help
Review Google Ads API documentation for GAQL syntax
Check Google Ads Help Center for account setup issues
Validate queries with smaller date ranges first
Test account access with simple customer queries
Error Reporting
The server provides detailed error information including:
Google Ads API error codes and descriptions
GAQL syntax validation messages
Account access and permission status
Suggested resolution steps
Advanced Features
Manager Account Hierarchies: Handle complex account structures
Custom Metrics: Access all available Google Ads metrics
Flexible Dimensions: Segment data by any available dimension
Real-time Data: Access near real-time advertising performance
All tools include comprehensive error handling and will return structured error information to help diagnose and resolve issues quickly.