Google Ads MCP Reader
This server provides read-only access to Google Ads, Google Search Console, and Google Analytics 4 data, designed for AI assistants and LLM agents to safely retrieve performance and analytics information without making any changes.
Google Ads
Discover all accessible Google Ads account IDs.
Explore selectable, filterable, and sortable fields for any Google Ads resource (e.g., campaigns, ad groups).
Execute custom GAQL queries to retrieve performance data, with automatic routing for Manager (MCC) accounts to child accounts.
Google Search Console
Check available GSC tools and authentication status.
List all accessible GSC properties and their verification/ownership details.
Get top queries and pages with clicks, impressions, CTR, and position.
Get an executive performance summary with daily traffic trends.
Compare search performance between two date ranges.
Run advanced analytics with filtering, sorting, and pagination (up to 25,000 rows).
Inspect a specific URL's crawl, indexing, canonicalization, and robots.txt status.
List sitemaps with submission status, errors, and indexed URL counts.
Google Analytics 4
Check available GA4 tools and authentication status.
Discover all accessible GA4 properties.
Browse available dimensions and metrics for a specific property.
Run standard reports with customizable dimensions, metrics, date ranges, filters, ordering, and limits.
Run real-time reports covering the last 30 minutes.
Provides read-only access to Google Ads data via GAQL queries, including campaign performance, account discovery, resource metadata, and automatic routing through manager (MCC) accounts.
Provides tools for accessing Google Analytics 4 properties, including listing properties, retrieving metadata, and running standard or real-time reports with filtering and ordering.
Provides tools for querying Google Search Console data such as search analytics, performance overviews, period comparisons, URL inspection, and sitemap management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Ads MCP Reader list my active campaigns with performance metrics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Open Google MCP
A read-only Model Context Protocol (MCP) server for Google Ads (via GAQL), Search Console, and Google Analytics 4. Designed for AI assistants and LLM agents to safely read campaign performance, search analytics, website traffic, and more.
Tools
Google Ads
Tool | Input | Description |
| — | Discover Google Ads account IDs |
|
| Explore selectable/filterable/sortable fields for a resource |
|
| Execute read-only GAQL queries |
Google Search Console
Tool | Input | Description |
| — | Get categorized tool list with auth status |
| — | List all GSC properties (start here) |
|
| Verification/ownership for a property |
|
| Top queries with clicks, impressions, CTR, position |
|
| Executive summary with daily trend |
|
| Compare two date ranges |
|
| Filtered, sorted, paginated analytics |
|
| Debug a URL's crawl/index status |
|
| List sitemaps with status and errors |
Google Analytics 4
Tool | Input | Description |
| — | Get categorized tool list with auth status |
| — | Discover all accessible GA4 properties |
|
| Browse available dimensions and metrics |
|
| Run a standard report with filtering and ordering |
|
| Get real-time data (last 30 minutes) |
Google Keyword Planner
Tool | Input | Description |
|
| Keyword ideas with search volume, competition, bid ranges |
|
| Historical metrics for exact keywords |
|
| Simulated campaign forecast (impressions, clicks, CPC, cost) |
|
| Look up geo resource names (e.g. Ireland → |
Keyword Planner tools reuse the same service account + developer token as the Ads tools. customer_id is optional — it falls back to GOOGLE_ADS_DEFAULT_CUSTOMER_ID, then GOOGLE_ADS_LOGIN_CUSTOMER_ID from .env. The account needs Keyword Planner access (Tools → Planning → Keyword Planner in Google Ads); manager (MCC) accounts usually don't have it — use a child customer ID. The developer token must have at least basic access (explorer-level tokens are rejected: "apply for basic or standard access" — ads.google.com → Tools → API Center → Request higher access).
Manager Account Auto-Routing
If search targets a manager (MCC) account and finds no data directly, it automatically:
Detects the account is a manager
Finds child accounts
Runs the query on each child
Returns combined results with
_source_customer_idmarking which account each row belongs to
Related MCP server: Google Ads MCP Server
Setup
Prerequisites (all paths)
A Google Ads developer token (apply via Google Ads API Center)
Google Cloud service account with the following APIs enabled:
Option A: Docker (recommended — no Python required)
1. Clone
git clone https://github.com/ceotind/open-google-mcp.git
cd open-google-mcp2. Create and authorize a service account
A single service account authenticates Google Ads, Search Console, and Google Analytics 4.
Go to GCP Console → APIs & Services → Credentials → Create Credentials → Service Account
Download the JSON key file, then copy these fields into
.env:GOOGLE_SERVICE_ACCOUNT_EMAILGOOGLE_SERVICE_ACCOUNT_KEY(theprivate_key— keep the\nescapes)GOOGLE_SERVICE_ACCOUNT_KEY_IDGOOGLE_SERVICE_ACCOUNT_CLIENT_IDGOOGLE_SERVICE_ACCOUNT_PROJECT_ID
Google Ads: add the service account email in your manager account (Settings → Account access → Service account users)
Search Console: add the same email to your property (Settings → Users and permissions → Add user, grant Full access)
Google Analytics 4: add the same email to your GA4 property (Admin → Account Access Management → Add user → Viewer)
3. Configure .env
cp .env.example .env
# Edit .env with the service account values + developer tokenVariable | Description |
| Your Google Ads API developer token |
| Service account email |
| Private key (with |
| Private key ID |
| Client ID |
| GCP project ID |
| Optional — for MCC account routing |
| Optional — default customer_id for Keyword Planner tools (falls back to LOGIN_CUSTOMER_ID) |
| Optional — dedicated GA4 credential file |
4. Build and start the container (once)
docker compose build
docker compose up -d open-google-mcpThis starts a single long-lived container. Client configs attach to it with
docker compose execinstead ofdocker compose run, so a new container is not created every session. (Don't usedocker compose runfor a client — it spawns a new container each launch and--rmnever removes a long-running stdio server, so containers pile up.)
5. MCP client config
Claude Desktop:
{
"mcpServers": {
"open-google-mcp": {
"command": "docker",
"args": ["compose", "exec", "-T", "open-google-mcp", "python", "-m", "open_google_mcp"],
"workdir": "/path/to/open-google-mcp"
}
}
}opencode:
{
"mcp": {
"open-google-mcp": {
"type": "local",
"command": ["docker", "compose", "exec", "-T", "open-google-mcp", "python", "-m", "open_google_mcp"],
"workdir": "/path/to/open-google-mcp",
"enabled": true
}
}
}Cursor:
Name:
open-google-mcpType:
commandCommand:
docker compose exec -T open-google-mcp python -m open_google_mcpWorking directory:
/path/to/open-google-mcp
Option B: Python (local install)
1. Clone and install
git clone https://github.com/ceotind/open-google-mcp.git
cd open-google-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .2. Create and authorize a service account
Same steps as Option A above — a single service account works for Ads, GSC, and GA4.
Go to GCP Console → APIs & Services → Credentials → Create Credentials → Service Account
Download the JSON key file, then copy these fields into
.env:GOOGLE_SERVICE_ACCOUNT_EMAILGOOGLE_SERVICE_ACCOUNT_KEYGOOGLE_SERVICE_ACCOUNT_KEY_IDGOOGLE_SERVICE_ACCOUNT_CLIENT_IDGOOGLE_SERVICE_ACCOUNT_PROJECT_ID
Google Ads: add the service account email in your manager account
Search Console: add the same email to your property with Full access
Google Analytics 4: add the same email to your GA4 property with Viewer access
3. Configure .env
cp .env.example .envVariable | Description |
| Your Google Ads API developer token |
| Service account email |
| Private key (with |
| Private key ID |
| Client ID |
| GCP project ID |
| Optional — for MCC account routing |
| Optional — default customer_id for Keyword Planner tools (falls back to LOGIN_CUSTOMER_ID) |
| Optional — dedicated GA4 credential file |
4. Run
source .venv/bin/activate
source .env
python -m open_google_mcpOr use the wrapper script (loads .env automatically):
./server.sh5. MCP client config
Claude Desktop:
{
"mcpServers": {
"open-google-mcp": {
"command": "/path/to/open-google-mcp/server.sh"
}
}
}opencode:
{
"mcp": {
"open-google-mcp": {
"type": "local",
"command": ["/path/to/open-google-mcp/server.sh"],
"enabled": true
}
}
}Cursor:
Name:
open-google-mcpType:
commandCommand:
/path/to/open-google-mcp/server.sh
Google Ads — Usage Examples
List Ads accounts
list_accessible_customersDiscover fields for a resource
get_resource_metadata(resource_name="campaign")Get active search campaigns with performance
search(
customer_id="1234567890",
resource="campaign",
fields=["campaign.id", "campaign.name", "campaign.status",
"campaign.advertising_channel_type", "metrics.clicks",
"metrics.impressions", "metrics.cost_micros"],
conditions=["campaign.status = 'ENABLED'",
"segments.date DURING LAST_30_DAYS"],
orderings=["metrics.clicks DESC"],
limit=10
)Get child accounts under a manager
search(
customer_id="1234567890",
resource="customer_client",
fields=["customer_client.id", "customer_client.descriptive_name", "customer_client.manager"]
)Google Search Console — Usage Examples
List GSC properties
gsc_list_propertiesGet search analytics
gsc_get_search_analytics(
site_url="https://example.com",
days=28,
dimensions="query",
row_limit=10
)Get performance overview
gsc_get_performance_overview(
site_url="https://example.com",
days=28
)Compare two time periods
gsc_compare_search_periods(
site_url="https://example.com",
period1_start="2025-01-01",
period1_end="2025-01-31",
period2_start="2025-02-01",
period2_end="2025-02-28",
dimensions="query",
limit=10
)Advanced analytics with filters
gsc_get_advanced_search_analytics(
site_url="https://example.com",
dimensions="query,device",
search_type="WEB",
row_limit=50,
sort_by="impressions",
sort_direction="descending",
filters='[{"dimension":"country","operator":"equals","expression":"usa"}]'
)Inspect a URL
gsc_inspect_url(
site_url="https://example.com",
page_url="https://example.com/blog/post"
)List sitemaps
gsc_get_sitemaps(site_url="https://example.com")Google Analytics 4 — Usage Examples
Start here — discover properties
ga4_list_propertiesReturns your property ID (e.g. 123456789) — use it in all other GA4 tools.
Browse available dimensions and metrics
ga4_get_metadata(property_id="123456789")Returns 300+ dimensions and 100+ metrics available for reporting.
Run a basic report (property-level summary)
ga4_run_report(
property_id="123456789",
metrics="activeUsers,sessions,newUsers",
start_date="28daysAgo",
end_date="today"
)Top countries by users
ga4_run_report(
property_id="123456789",
dimensions="country",
metrics="activeUsers",
start_date="28daysAgo",
end_date="today",
limit=10,
order_bys=[{"metric": "activeUsers", "desc": true}]
)Top pages with views
ga4_run_report(
property_id="123456789",
dimensions="pagePath",
metrics="screenPageViews,activeUsers",
start_date="28daysAgo",
end_date="today",
limit=10,
order_bys=[{"metric": "screenPageViews", "desc": true}]
)Traffic sources breakdown
ga4_run_report(
property_id="123456789",
dimensions="sessionDefaultChannelGrouping",
metrics="activeUsers,sessions",
start_date="28daysAgo",
end_date="today",
limit=10,
order_bys=[{"metric": "activeUsers", "desc": true}]
)Filter by country (e.g. only Ireland)
ga4_run_report(
property_id="123456789",
dimensions="city",
metrics="activeUsers",
start_date="28daysAgo",
end_date="today",
filters={"field": "country", "type": "string_filter",
"value": "Ireland", "match_type": "EXACT"},
limit=10
)Device breakdown
ga4_run_report(
property_id="123456789",
dimensions="deviceCategory",
metrics="activeUsers,sessions",
start_date="28daysAgo",
end_date="today"
)Real-time report (last 30 minutes)
ga4_run_realtime_report(
property_id="123456789",
dimensions="country,deviceCategory",
metrics="activeUsers",
limit=10
)Date formats
You can use relative or absolute dates:
Relative:
today,yesterday,7daysAgo,28daysAgo,30daysAgoAbsolute:
2026-01-01(YYYY-MM-DD format)
Google Keyword Planner — Usage Examples
customer_id is optional everywhere — set GOOGLE_ADS_DEFAULT_CUSTOMER_ID in .env and omit it in calls.
Keyword ideas for a seed term
generate_keyword_ideas(
keywords=["salsa classes dublin", "salsa dancing"],
geos=["geoTargetConstants/2372"], # Ireland — find via suggest_geo_target_constants
language="english"
)Historical metrics for exact keywords
generate_keyword_historical_metrics(
keywords=["salsa classes dublin", "bachata classes dublin"],
geos=["geoTargetConstants/2372"]
)Forecast a campaign for next month
generate_keyword_forecast_metrics(
keywords=["salsa classes dublin", "salsa dancing"],
match_types=["PHRASE", "EXACT"],
currency_code="EUR",
daily_budget_micros=20000000, # €20/day
max_cpc_bid_micros=500000 # €0.50 max CPC
)Find a geo constant
suggest_geo_target_constants(names=["Ireland"], country_code="IE")GAQL Tips
Field names must be fully qualified:
campaign.id, notidDate format:
YYYY-MM-DDwith dashesRelative dates:
DURING LAST_7_DAYS,LAST_30_DAYS,THIS_MONTH,THIS_QUARTERFor
change_eventresource, limit must be ≤ 10000Conditions are AND-combined
Use
get_resource_metadatafirst to discover valid fields
Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest # unit tests — no network or credentials requiredThe Keyword Planner logic lives in src/open_google_mcp/keyword_planner.py (pure request builders and result flatteners, fully unit-tested). A live smoke test against the real API is available:
source .env && python scripts/smoke_keyword_planner.py [customer_id]License
MIT
Available Tools
6 toolsget_resource_metadataA
Discover which fields are SELECTable, FILTERable, and SORTable for a Google Ads resource. Always call this before search() — using incorrect field names causes API errors. Compatible metrics.* and segments.* fields are included for reporting queries.
Args: resource_name: The resource to explore (e.g. 'campaign', 'ad_group', 'keyword_view', 'search_term_view', 'customer_client').
Returns: A dict with resource name and three sorted arrays of fully-qualified field names. Example for resource='campaign': selectable: ['campaign.id', 'campaign.name', 'campaign.status', 'metrics.clicks', 'metrics.impressions', ...] filterable: ['campaign.id', 'campaign.status', ...] sortable: ['campaign.id', 'metrics.clicks', ...]
Inputs: resource_name (required).
gsc_compare_search_periodsA
Compare search performance between two date ranges and surface what changed. Use this for: month-over-month analysis, campaign impact assessment, seasonal trend detection. Returns which queries improved or declined with click/impression changes.
Args: site_url: Exact GSC property URL from gsc_list_properties. Format: 'https://example.com/' or 'sc-domain:example.com'. period1_start: Start of baseline period, format YYYY-MM-DD (e.g. '2026-01-01'). period1_end: End of baseline period, format YYYY-MM-DD (e.g. '2026-01-31'). period2_start: Start of comparison period, format YYYY-MM-DD (e.g. '2026-02-01'). period2_end: End of comparison period, format YYYY-MM-DD (e.g. '2026-02-28'). dimensions: Group by — 'query', 'page', 'device', etc. (default: 'query'). limit: Max items to return, sorted by biggest change (default: 10).
Inputs: site_url (required), period1_end (required), period2_end (required), period1_start (required), +3 more.
gsc_get_performance_overviewA
Get an executive summary with daily trend — totals for clicks, impressions, CTR, and avg position plus a day-by-day breakdown. Use this for: quick snapshots, dashboards, spotting traffic spikes or drops. For detailed query-level data, use gsc_get_search_analytics.
Args: site_url: Exact GSC property URL from gsc_list_properties. Format: 'https://example.com/' or 'sc-domain:example.com'. days: How many days to look back (default: 28).
Inputs: site_url (required), days.
gsc_get_sitemapsA
List all sitemaps for a GSC property with submission status, error/warning counts, and indexed URL totals. Use this for: monitoring crawl health, finding sitemap errors, checking if new content was picked up, verifying sitemap submission.
Args: site_url: Exact GSC property URL from gsc_list_properties. Format: 'https://example.com/' or 'sc-domain:example.com'.
Inputs: site_url (required).
list_accessible_customersA
Start here — Discover Google Ads customer IDs accessible by the authenticated user. Always call this first before search(). Returns resource names like 'customers/1234567890' — extract the numeric ID from the last segment to use in other tools.
Inputs: no named parameters. Returns: result
searchA
Execute a read-only GAQL query and return flattened results. Workflow: list_accessible_customers() → get_resource_metadata(resource) → search()
If customer_id is a manager (MCC) account, this auto-routes to child accounts and annotates results with _source_customer_id and _source_customer_name — no manual child enumeration needed.
Field rules:
Use fully-qualified names: campaign.id (not id), metrics.clicks, segments.date
Dates: YYYY-MM-DD format with dashes
Relative ranges: DURING LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, THIS_QUARTER
Conditions are AND-combined
Ordering: 'field_name DIRECTION' (e.g. 'metrics.clicks DESC')
For change_event resource, limit max is 10000
Common conditions: campaign.status = 'ENABLED' campaign.advertising_channel_type = 'SEARCH' segments.date DURING LAST_30_DAYS metrics.impressions > 1000
Example — active campaigns with performance: customer_id='1234567890', resource='campaign', fields=['campaign.id', 'campaign.name', 'campaign.status', 'metrics.clicks', 'metrics.impressions', 'metrics.cost_micros'], conditions=["campaign.status = 'ENABLED'", 'segments.date DURING LAST_7_DAYS'], orderings=['metrics.clicks DESC'], limit=10
Args: customer_id: Numeric Google Ads customer ID (e.g. '1234567890'). Manager (MCC) accounts are auto-detected and routed. resource: GAQL resource name (e.g. 'campaign', 'ad_group', 'keyword_view'). fields: Fully-qualified field names to SELECT. conditions: WHERE clauses joined with AND (optional). orderings: ORDER BY clauses (optional). limit: Max results (default: 100, max varies by resource).
Inputs: fields (required), resource (required), customer_id (required), limit, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: resource metadata exploration, GAQL search, customer ID listing, and three separate GSC functions (period comparison, performance overview, sitemap listing). The 'gsc_' prefix further distinguishes the Google Search Console tools from the Ads tools.
Naming conventions are mixed: some tools use 'get_', one uses 'list_', one is bare 'search', and three use the 'gsc_' prefix but with different verb forms ('compare', 'get'). While snake_case is consistent, the lack of a uniform verb pattern makes the naming somewhat inconsistent.
With 6 tools covering both Google Ads essentials (customer discovery, metadata, querying) and Google Search Console basics (overview, comparison, sitemaps), the count feels well-scoped for the combined domain.
The GSC tools reference a prerequisite 'gsc_list_properties' tool that does not exist, creating a dead end. For Google Ads, the 'search' tool is powerful but lacks higher-level convenience operations (e.g., getting campaign performance by ID). Overall, the surface has notable gaps.
Related MCP Connectors
Read-only Google Analytics 4 MCP server for AI assistants.
Read-only Google Search Console MCP server for AI assistants.
Google Ads MCP server — manage campaigns, keywords, and metrics.
Hosted MCP server for marketing agencies: connect Google Ads, GA4, Search Console, Meta, LinkedIn and more to Claude or ChatGPT. Pull reports and make changes via OAuth login, no setup.
Related MCP Servers
- AlicenseBqualityBmaintenanceRead-only MCP server for Google Ads, enabling querying campaigns, ad groups, ads, insights, and keywords without create/update/delete operations.9MIT
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to Google Ads account data including campaigns, ad groups, keywords, and performance reports. Enables querying via GAQL through an MCP interface.MIT
- AlicenseBqualityDmaintenanceRead-only MCP server for Google Ads API, enabling natural language queries about campaigns, metrics, search terms, and change history without write access.6MIT
- -licenseNot gradedqualityNot gradedmaintenanceA private, read-only MCP server that enables retrieval and analysis of Google Ads reporting data (campaigns, ad groups, keywords, search terms, cost, conversions) from authorized accounts through a locally operated server.-