feat: Add OAuth, 65+ tools (billing, analytics, bidding, keyword planning, recommendations), MCC support & proto fixes#43
Closed
hemangjoshi37a wants to merge 10 commits intogoogleads:mainfrom
Closed
Conversation
- utils.py: patch _create_credentials() to use GOOGLE_ADS_REFRESH_TOKEN, GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET env vars instead of ADC - server.py: register new campaigns tools module - tools/campaigns.py: 20 new MCP tools for full campaign lifecycle — budgets, search campaigns, geo targeting, ad groups, keywords (positive and negative), responsive search ads, and performance reporting - .gitignore: exclude env/ credentials and local helper scripts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
New tools: - list_ads: list all ads in an ad group with approval/strength status - update_ad_status: pause, enable, or remove a specific ad - update_keyword_status: pause, enable, or remove a specific keyword - update_keyword_bid: adjust CPC bid per keyword - get_ad_group_performance: metrics broken down by ad group - get_keyword_performance: per-keyword metrics with quality score and impression share - get_search_terms_report: actual search queries that triggered ads (for adding negatives) - get_ad_performance: per-ad metrics for identifying underperformers - list_conversion_actions: list all conversion actions in account - create_conversion_action: create a new WEBPAGE conversion action Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- get_keyword_performance: metrics.quality_score is not a valid GAQL field; replaced with ad_group_criterion.quality_info.quality_score - create_conversion_action: bracket-style enum lookup fails for ConversionActionCategoryEnum; switched to getattr() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ConversionActionCategoryEnum has no LEAD value in v23. Correct enum for form submissions is SUBMIT_LEAD_FORM. Updated default and docstring to list valid categories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… improvements - utils.py: add login_customer_id per-request param to get_googleads_client/get_googleads_service, add create_field_mask helper, fix format_output_value to handle proto.Message and repeated fields, add lazy _default_client caching (from PR googleads#26 + PR googleads#10) - campaigns.py: add path1/path2 display URL paths to create_responsive_search_ad, add update_ad_group (name update), add set_ad_schedule (dayparting) (from PR googleads#39) - tools/assets.py (new): 10 asset creation tools — sitelink, callout, structured_snippet, call, image, promotion, price, lead_form, text, youtube_video (from PR googleads#39) - tools/asset_links.py (new): link_asset_to_campaign, link_asset_to_ad_group, link_assets_to_customer, remove_campaign_asset (from PR googleads#39) - server.py: import assets and asset_links modules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Handle proto.marshal.collections.repeated.RepeatedComposite and RepeatedScalar types in format_output_value so the search tool no longer crashes when querying fields with repeated proto values (e.g. policy_summary.policy_topic_entries, tag_snippets). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… recommendations New tool files: - billing.py: get_billing_info, get_account_spend_summary, get_daily_spend_trend - analytics.py: get_device_performance, get_geo_performance, get_hourly_performance, get_quality_scores, get_auction_insights, get_search_impression_share - bidding.py: set_target_cpa, set_maximize_conversions, set_maximize_conversion_value, set_manual_cpc, set_target_impression_share, update_keyword_bids_bulk - keyword_planning.py: get_keyword_ideas (Keyword Planner API), get_keyword_forecast - recommendations.py: list_recommendations, apply_recommendation, dismiss_recommendation Added to campaigns.py: - add_search_terms_as_keywords: mine converting search terms directly into ad group Registered all new modules in server.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… improvements - Added badges (stars, license, Python version, API version, MCP) - Added complete tool reference table (65+ tools across 8 modules) - Added installation instructions for Claude Desktop, Claude Code, Gemini CLI, pipx - Added all 3 authentication options (OAuth refresh token, ADC, google-ads.yaml) - Added full environment variables reference table - Added MCC/manager account configuration examples - Added sample prompts for all major use cases - Added architecture tree with design decisions - Added prerequisites and developer token guide - SEO-optimized title, description, and section headers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l sections, feature grid, architecture diagram, contact section - Centered header with for-the-badge style badges and logos - 2x2 feature grid table (Analytics, Bidding, Keywords, Assets, Billing, Recommendations) - 13 collapsible <details> sections — one per tool module — so page isn't overwhelming - ASCII architecture diagram showing AI → MCP server modules → Google Ads API layers - 3-column sample prompts table (Performance, Optimization, Keyword Research) - Full changelog with v1.0.0 and v2.0.0 entries - Contact section with for-the-badge social badges (Email, LinkedIn, YouTube, WhatsApp, Telegram, Website, GitHub, LinkTree) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Thanks for putting this together! We already have plans to add tools that perform mutations in the future, so I will not merge this. I'd gladly review your other additions if you split them into separate PRs, though. |
Author
|
dont have time for that. if you like then merge otherwise no issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive write and analytical capabilities to the Google Ads MCP server — 65+ tools across 8 modules — incorporating improvements from PRs #10, #26, and #39, all fully tested against the live Google Ads API.
The goal is to give an AI agent (Claude, GPT, etc.) full autonomous control over a Google Ads account: create campaigns, write ads, manage bids, research keywords, diagnose performance, check budget, and act on Google's automated recommendations — entirely through MCP tool calls.
Tools Added (65+ total across 8 modules)
Billing & Account Spend (3) 🆕
Advanced Analytics (6) 🆕
Bidding Strategy (6) 🆕
Keyword Planning (2) 🆕
Recommendations (3) 🆕
Campaign & Budget (5)
Geo Targeting (2)
Ad Groups (5)
Keywords (4)
Ads (3)
Keywords Management (2)
Performance & Analytics (5)
Conversions (2)
Listing / Inspection (3)
Asset Creation (10) (from PR #39)
Asset Linking (4) (from PR #39)
`utils.py` Improvements
From PR #10 — `login_customer_id` per-request parameter:
From PR #26 + bug fix — `format_output_value` handles all proto types:
New `create_field_mask` utility:
OAuth Support:
✅ Test Results (live API, 2026-04-01)
All tools verified against a real Google Ads account:
🤖 Generated with Claude Code