google-ads-mcp
Provides access to Google Ads campaigns, ad groups, keywords, search terms, budgets, and conversions through GAQL queries. Read-only by default, with optional write support for creating and editing campaigns and related assets, including dry-run validation and draft/live write modes.
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 show my top 5 campaigns by spend this month"
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.
google-ads-mcp — Google Ads MCP server
A Model Context Protocol server that gives Claude, Cursor, Claude Code and any other MCP client access to Google Ads: campaigns, ad groups, keywords, search terms, budgets, conversions and anything else the Google Ads Query Language (GAQL) can select. It is read-only by default and can be allowed to build and edit campaigns.
It is a TypeScript port of the read tools in Google's own google-ads-mcp, with the same tool names and arguments, so prompts written for one work on the other. What differs:
Read-only unless you switch writing on. Out of the box the server only has tools that search and list. Writing is one extra tool that exists only when
GOOGLE_ADS_WRITE_TOOLSis set, with rules about what it may do (see Writing).Service-account auth, no gcloud. Point it at a key file, or pass the key inline.
Streamable HTTP as well as stdio. It can run centrally. This is how Walma serves it to whole organisations through its AI gateway.
Three runtime dependencies. It calls the REST API directly instead of using the gRPC client library.
Built and used by Walma AI.
Tools
Tool | What it does |
| The customer ids the service account can reach directly |
| The selectable, filterable and sortable fields of a resource, with its compatible metrics and segments |
| A GAQL query built from |
Rows come back as one object per row, keyed by the field names that were selected:
{ "campaign.name": "Brand", "metrics.clicks": "120", "metrics.cost_micros": "45000000" }Cost and bid fields ending in _micros are millionths of the account currency. A call returns at most 10 000 rows and says "truncated": true when there were more.
Related MCP server: google-ads-manager-mcp
Writing
Set GOOGLE_ADS_WRITE_TOOLS and the server gains a fourth tool, mutate, which sends a batch of mutate operations that succeed together or not at all. The service account then needs Standard access in Google Ads instead of read-only.
Value | The tool may |
unset | nothing: the tool is not registered |
| create and edit campaigns, budgets, asset groups, assets, ad groups, ads, criteria and labels. Everything new is paused, and it cannot enable a campaign or change an existing budget |
| all of that, and enable campaigns and change budgets |
Whatever the value:
A dry run comes first.
validate_onlydefaults totrue: Google Ads checks the request and nothing changes. Applying takes a second call withvalidate_only: false.A new campaign must be created
PAUSED. Someone turns it on, in Google Ads or (atlive) by asking for it.Campaigns, budgets, ad groups and asset groups cannot be removed. That cannot be undone in Google Ads; pause them instead.
Only campaign building blocks. Users, billing, account budgets, conversion settings and links to other products are refused.
These rules are checked in the server before anything is sent, so they hold whatever the model is asked to do. They are not a spending limit: at draft an edit to a campaign that is already running (its ads, keywords, bidding targets) takes effect at once. Have your MCP client ask before each mutate call.
Every caller writes as the same service account, so Google Ads' change history shows the service account, not the person.
Image and video assets have to exist in the account already, or be sent as base64 in an assetOperation. The server does not fetch files from URLs.
Setup
1. Developer token
Every Google Ads API call needs a developer token. It comes from Tools → API Center in a Google Ads manager account. A new token starts at test access, which only works against test accounts; apply for Basic access to read real accounts. Approval can take a few days.
2. Service account and key
In Google Cloud Console, pick or create a project.
Enable the Google Ads API.
IAM & Admin → Service accounts → Create. No project roles are needed.
Keys → Add key → JSON. Save the file outside any repository, for example
~/.config/gcloud/google-ads-service-account.json.
3. Give the service account access in Google Ads
In the Google Ads account (or in a manager account above it), open Admin → Access and security → Users and add the service account's email address (…@….iam.gserviceaccount.com). Read only is enough for the read tools; writing needs Standard.
The server sees exactly the accounts the service account was added to. Use one service account per organisation: an account added for two customers shows both to everyone who can reach the server.
If the service account was added to a manager account rather than to the ad accounts themselves, set GOOGLE_ADS_LOGIN_CUSTOMER_ID to the manager's customer id.
4. Add it to your MCP client
Claude Code:
claude mcp add google-ads --scope user \
-e GOOGLE_ADS_SERVICE_ACCOUNT_FILE=~/.config/gcloud/google-ads-service-account.json \
-e GOOGLE_ADS_DEVELOPER_TOKEN=your-developer-token \
-- npx -y github:Walma-Labs/google-ads-mcpClaude Desktop, Cursor and others (mcpServers in the client's config):
{
"mcpServers": {
"google-ads": {
"command": "npx",
"args": ["-y", "github:Walma-Labs/google-ads-mcp"],
"env": {
"GOOGLE_ADS_SERVICE_ACCOUNT_FILE": "~/.config/gcloud/google-ads-service-account.json",
"GOOGLE_ADS_DEVELOPER_TOKEN": "your-developer-token"
}
}
}
}Configuration
Variable | |
| Path to the service-account key file |
| The key as inline JSON. Wins over the file when both are set |
| Required |
| Optional manager account. A tool call can also pass |
| Optional: |
| Optional, default |
Running over HTTP
npm run build
PORT=8080 npm run start:httpPOST / is the MCP endpoint (streamable HTTP, stateless) and GET /healthz answers ok. There is no authentication in this process: put it behind something that authenticates callers.
Using it as a library
import { createGoogleAdsClient, createGoogleAdsServer } from "@walma-labs/google-ads-mcp";
const client = createGoogleAdsClient(); // built once; caches its access token
const server = createGoogleAdsServer(client); // a fresh McpServer per requestDevelopment
npm install
npm testThe tests drive the real MCP wire against a mocked request function, so they need neither network nor credentials.
When GOOGLE_ADS_API_VERSION moves on, refresh src/resources.ts from Google's ads_mcp/gaql_resources.txt.
Licence
Apache-2.0. Tool names, argument contracts, tool descriptions and the resource list derive from Google's google-ads-mcp; see NOTICE.
Available Tools
3 toolsget_resource_metadataGet resource metadataARead-only
Retrieves the selectable, filterable and sortable fields for a Google Ads resource, including compatible metrics and segments.
Use this to find out which fields you can select, filter by or sort by when querying a resource (e.g. 'campaign', 'ad_group'). Metrics and segments that can be selected with the resource are included; their names start with 'metrics.' and 'segments.'.
Do not guess fields: you MUST use this tool to discover them before constructing a query for the search tool.
The answer does not change often, so reuse it within a conversation.
Inputs: resource_name (required).
list_accessible_customersList accessible customersARead-only
Returns ids of customers directly accessible by the account authenticating the call.
Use this tool first to discover available customer IDs if the user hasn't provided one. Most other tools require a valid customer ID as input. Accounts under a manager account are not listed here: query the customer_client resource on the manager account to see them.
Inputs: no named parameters.
searchSearch Google AdsARead-only
Fetches data from the Google Ads API using the search method.
Rows come back flattened: one object per row, keyed by the field names you selected.
Language grammar: https://developers.google.com/google-ads/api/docs/query/grammar All resources and descriptions: https://developers.google.com/google-ads/api/fields/latest/overview If the query fails, the error from the API is returned with its request id.
To find out which fields (including compatible metrics and segments) you can select, filter by, or sort by for a resource, you MUST use the get_resource_metadata tool. Do not guess the fields. Use the whole field name (e.g. 'campaign.id', not just 'id'). Wildcards and partial fields are not allowed.
All dates are YYYY-MM-DD and must include the dashes. Date ranges must be finite and include a start and an end date.
Status fields (campaign.status, ad_group.status, ad_group_criterion.status, ad_group_ad.status) hold the current status, not the status during the date range. When selecting metrics over a date range, do not filter on status (e.g. campaign.status = 'ENABLED' or campaign.status != 'REMOVED'): entities paused or removed during the range would drop out and totals would understate cost and conversions. To leave out removed entities with no activity, drop rows with zero impressions after the query instead. Filter on status only when asking what is live now.
Cost and bid fields ending in _micros are in millionths of the account currency.
At most 10000 rows are returned per call; "truncated": true means there were more. Use limit, a narrower date range or more conditions. Requests to resource change_event must specify a LIMIT of at most 10000.
For conversion upload issues, look in offline_conversion_upload_conversion_action_summary (https://developers.google.com/google-ads/api/docs/conversions/upload-summaries).
Resources that can be queried: accessible_bidding_strategy account_budget account_budget_proposal account_link ad ad_group ad_group_ad ad_group_ad_asset_combination_view ad_group_ad_asset_view ad_group_ad_label ad_group_asset ad_group_asset_set ad_group_audience_view ad_group_bid_modifier ad_group_criterion ad_group_criterion_customizer ad_group_criterion_label ad_group_criterion_simulation ad_group_customizer ad_group_label ad_group_simulation ad_parameter ad_schedule_view age_range_view ai_max_search_term_ad_combination_view android_privacy_shared_key_google_ad_group android_privacy_shared_key_google_campaign android_privacy_shared_key_google_network_type app_top_combination_view applied_incentive asset asset_field_type_view asset_group asset_group_asset asset_group_listing_group_filter asset_group_product_group_view asset_group_signal asset_group_top_combination_view asset_set asset_set_asset asset_set_type_view audience batch_job bidding_data_exclusion bidding_seasonality_adjustment bidding_strategy bidding_strategy_simulation billing_setup call_view campaign campaign_aggregate_asset_view campaign_asset campaign_asset_set campaign_audience_view campaign_bid_modifier campaign_budget campaign_conversion_goal campaign_criterion campaign_customizer campaign_draft campaign_goal_config campaign_group campaign_label campaign_search_term_insight campaign_search_term_view campaign_shared_set campaign_simulation carrier_constant cart_data_sales_view change_event change_status channel_aggregate_asset_view click_view combined_audience content_criterion_view conversion_action conversion_custom_variable conversion_goal_campaign_config conversion_value_rule conversion_value_rule_set currency_constant custom_audience custom_conversion_goal custom_interest customer customer_asset customer_asset_set customer_client customer_client_link customer_conversion_goal customer_customizer customer_label customer_manager_link customer_negative_criterion customer_search_term_insight customer_user_access customer_user_access_invitation customizer_attribute data_link detail_content_suitability_placement_view detail_placement_view detailed_demographic display_keyword_view distance_view domain_category dynamic_search_ads_search_term_view expanded_landing_page_view experiment experiment_arm final_url_expansion_asset_view gender_view geo_target_constant geographic_view goal group_content_suitability_placement_view group_placement_view hotel_group_view hotel_performance_view hotel_reconciliation income_range_view keyword_plan keyword_plan_ad_group keyword_plan_ad_group_keyword keyword_plan_campaign keyword_plan_campaign_keyword keyword_theme_constant keyword_view label landing_page_view language_constant lead_form_submission_data life_event local_services_employee local_services_lead local_services_lead_conversation local_services_verification_artifact location_interest_view location_view managed_placement_view matched_location_interest_view media_file mobile_app_category_constant mobile_device_constant multi_party_auth_review offline_conversion_upload_client_summary offline_conversion_upload_conversion_action_summary offline_user_data_job operating_system_version_constant paid_organic_search_term_view parental_status_view per_store_view performance_max_placement_view product_category_constant product_group_view product_link product_link_invitation qualifying_question recommendation recommendation_subscription remarketing_action search_term_view shared_criterion shared_set shopping_performance_view shopping_product smart_campaign_search_term_view smart_campaign_setting targeting_expansion_view third_party_app_analytics_link topic_constant topic_view travel_activity_group_view travel_activity_performance_view user_interest user_list user_list_customer_type user_location_view video video_enhancement webpage_view you_tube_video_upload
Inputs: fields (required), resource (required), customer_id (required), limit, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools occupy clearly separated roles: discover customer IDs, discover resource fields, and execute queries. The descriptions even state the correct ordering (discover customer → discover fields → search), leaving no realistic chance of misselection.
Two tools follow a clean verb_noun snake_case pattern (list_accessible_customers, get_resource_metadata), while 'search' is a bare verb. It is still unambiguous and readable, so this is a minor deviation rather than a real inconsistency.
Three tools is lean, but the design deliberately collapses the entire Google Ads query surface into one generic GAQL 'search' tool, so each tool genuinely earns its place. It sits just below 'well-scoped' only because a single search tool carries enormous implicit complexity.
For a read/analytics surface the lifecycle is covered: enumerate customers, enumerate valid fields, then query any of ~200 resources with filters, sorting, and limits. The gap is that the surface is strictly read-only — no mutation of campaigns, budgets, or conversion uploads — which an agent may expect from a Google Ads server.
Maintenance
Related MCP Connectors
Google Ads MCP: reports, search terms, negatives, budgets, campaigns. Approval on every write.
Google Ads MCP server — manage campaigns, keywords, and metrics.
Hosted Google Ads MCP with OAuth, bounded reads, and prepare/confirm writes.
Query selected Google and Bing analytics, search, and advertising reports through MCP.
Related MCP Servers
- 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
- AlicenseAqualityCmaintenanceMCP server to read and manage Google Ads accounts via GAQL queries, campaign/ad group/keyword operations, and safe write support with draft-confirm flow.1646 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables management of Google Ads accounts via MCP, providing read and write tools for campaigns, ad groups, keywords, assets, and more, with support for reporting and mutations.-
- AlicenseAqualityBmaintenanceEnables MCP clients to report on and manage Google Ads accounts, including GAQL queries, performance metrics, search terms, budgets, and campaign management.2113 npmMIT