Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Google Ads + Meta Ads + GA4 — MCP Server

The unified MCP server for managing Google Ads, Meta (Facebook/Instagram) Ads, and Google Analytics 4 from any AI assistant.

License: MIT MCP Protocol Google Ads Meta Ads GA4 Powered by Ryze AI

Watch: Google Ads & Meta Ads Account Audit with Claude MCP

See how to run a full Google Ads and Meta Ads account audit using Claude with MCP — from data pull to automated audit report and presentation, in minutes instead of hours.

https://github.com/user-attachments/assets/2f931292-a3af-4010-a72e-38b8cf6e62ba

What you'll see: Connect your ad accounts → Claude analyzes campaign performance, budget efficiency, and targeting gaps across Google Ads & Meta Ads → generates a complete audit report with recommendations → builds a ready-to-share presentation. Try it free on Ryze AI →

One MCP server. Three platforms. 250+ tools. Manage all your advertising and analytics from ChatGPT, Claude, Cursor, n8n, Windsurf, and more. Powered by Ryze AI.


Why This Exists

Marketers and agencies juggle Google Ads, Meta Ads, and GA4 daily — each with its own dashboard, API, and workflow. Existing MCP servers only cover one platform at a time, forcing you to install and configure multiple tools.

This server unifies everything:

ProblemSolution
Separate MCP servers per platformOne server, all platforms
Complex local setup with API keysRemote MCP — connect in 2 minutes
Read-only access (official Google MCP)Full read + write across all platforms
No analytics integrationGA4 built-in for data-driven decisions

Works With

AI AssistantStatusSetup Guide
ChatGPTSupportedSetup Guide
Claude DesktopSupportedSetup Guide
Claude CodeSupportedSetup Guide
CursorSupportedSetup Guide
WindsurfSupportedSetup Guide
n8nSupportedSetup Guide
Codex CLISupportedConfig
Gemini CLISupportedSetup Guide
ClineSupportedSetup Guide

Features

Google Ads (150+ tools)

  • Campaign Management — Create, update, pause, and delete Search, Display, Shopping, PMax, Demand Gen, Video, and App campaigns
  • Keyword Research — Keyword Planner integration with volume, CPC, and competition data
  • Bidding & Budgets — Portfolio strategies, shared budgets, bid adjustments by device/location/schedule
  • Ad Creation — Responsive Search Ads, Display Ads, Demand Gen Ads, App Ads with full creative control
  • Audience Targeting — Custom audiences, remarketing lists, customer match, combined audiences
  • Performance Analytics — Campaign/ad group/keyword/ad-level metrics, search terms, ROAS calculations
  • Extensions — Sitelinks, callouts, calls, images, prices, promotions, structured snippets, lead forms
  • Experiments — A/B testing with experiment creation, scheduling, and promotion
  • Negative Keywords — Campaign-level, shared sets, auto-suggestions
  • Labels & Organization — Create and apply labels across campaigns, ad groups, and ads
  • Conversion Tracking — Create actions, upload conversions, custom variables, value rules

Meta Ads (80+ tools)

  • Campaign CRUD — Create, read, update, and delete campaigns with full objective support
  • Ad Set Management — Budget, schedule, placement, and optimization controls
  • Creative Management — Ad creatives, image/video upload, carousel and collection formats
  • Audience Targeting — Custom audiences, lookalikes, interest/behavior/demographic targeting
  • Lead Generation — Lead forms, lead retrieval, test leads
  • Product Catalogs — Catalog management, product feeds, product sets
  • Performance Insights — Account/campaign/ad set/ad-level metrics with breakdowns
  • Page Management — Page posts, promotable posts, page insights, boosted posts
  • Business Management — Business info, users, pages, Instagram accounts, pixels

Google Analytics 4 (20+ tools)

  • Reporting — Run standard reports, pivot reports, and realtime reports
  • Audience Analysis — List audiences, channel groups, and segments
  • Property Configuration — Data streams, enhanced measurement, data retention settings
  • Attribution — Attribution settings and model configuration
  • Key Events — List and analyze conversion events
  • Integrations — BigQuery links, DV360 links, Search Ads links, Firebase links
  • Annotations — Property-level annotations for tracking changes
  • Metadata — Available dimensions, metrics, and compatibility checks

Cross-Platform Capabilities

  • Compare Google Ads vs Meta Ads campaign performance side by side
  • Correlate ad spend with GA4 conversion data
  • Unified ROAS analysis across platforms
  • Cross-platform budget allocation recommendations

Quick Start

Claude Desktop (Recommended)

Add to your claude_desktop_config.json:

{ "mcpServers": { "google-meta-ads-ga4": { "url": "YOUR_MCP_ENDPOINT_URL" } } }

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

See the full Claude Setup Guide for detailed instructions.

ChatGPT

  1. Go to Settings > Connectors > Add custom connector
  2. Enter the MCP endpoint URL: YOUR_MCP_ENDPOINT_URL
  3. Name it Google Meta Ads GA4
  4. Click Save

See the full ChatGPT Setup Guide.

Cursor / Windsurf

Add to your MCP config (~/.cursor/mcp.json or ~/.codeium/windsurf/mcp_config.json):

{ "mcpServers": { "google-meta-ads-ga4": { "url": "YOUR_MCP_ENDPOINT_URL" } } }

n8n

Use the MCP Server Trigger node with Streamable HTTP:

  1. Add an MCP Client node to your workflow
  2. Set the Server URL to: YOUR_MCP_ENDPOINT_URL
  3. Enable Bearer authentication (recommended)

See the full n8n Setup Guide or import the ready-made workflow template.

Claude Code

claude mcp add google-meta-ads-ga4 --transport sse YOUR_MCP_ENDPOINT_URL

Example Prompts

Google Ads

"Show me all my Google Ads campaigns and their performance this month"
"Create a new Search campaign targeting 'best CRM software' keywords with a $50/day budget"
"What are my top 10 keywords by conversions in the last 30 days?"
"Pause all campaigns with ROAS below 2.0"
"Add negative keywords 'free' and 'cheap' to all my Search campaigns"
"Generate keyword ideas for 'project management tools' with volume data"

Meta Ads

"List all active Meta ad campaigns and their spend this week"
"Create a lookalike audience based on my top purchasers"
"What's the CPL for my lead generation campaigns on Facebook?"
"Upload this image and create a new ad creative for my awareness campaign"
"Show me ad performance broken down by age and gender"
"Boost my latest page post with a $100 budget targeting US users"

Google Analytics 4

"Show me a realtime report of active users on my website right now"
"What are my top traffic sources by conversions this month?"
"List all key events configured in my GA4 property"
"Run a report comparing organic vs paid traffic for the last 90 days"
"What custom dimensions and metrics do I have set up?"

Cross-Platform

"Compare my Google Ads and Meta Ads ROAS for Q1 2026"
"Which platform is driving more conversions per dollar spent?"
"Show me all campaigns across Google and Meta with spend over $1000 this month"
"Correlate my GA4 conversion events with Google Ads campaign performance"

Architecture

+------------------+     +------------------------+     +------------------+
|                  |     |                        |     |                  |
|  ChatGPT         |     |                        |     |  Google Ads API  |
|  Claude          |     |   MCP Server           |     |                  |
|  Cursor          +---->+   (Remote/Hosted)       +---->+  Meta Ads API    |
|  n8n             |     |                        |     |                  |
|  Windsurf        |     |   250+ Tools           |     |  GA4 Data API    |
|  Codex           |     |   OAuth 2.1 + PKCE     |     |                  |
|                  |     |                        |     |                  |
+------------------+     +------------------------+     +------------------+
    AI Assistants           Model Context Protocol         Ad & Analytics
                                                            Platforms

Your AI assistant communicates with this MCP server using the Model Context Protocol. The server handles authentication and routes requests to the appropriate Google Ads, Meta Ads, or GA4 API.


All Available Tools

Google Ads Tools (150+) — Click to expand

Account & Campaign Management

ToolDescription
list_accountsList all accessible Google Ads accounts
get_account_infoGet detailed account information
get_account_hierarchyView account hierarchy (MCC structure)
list_campaignsList all campaigns with status and metrics
get_campaignGet detailed campaign information
create_search_campaignCreate a new Search campaign
create_display_campaignCreate a new Display campaign
create_shopping_campaignCreate a new Shopping campaign
create_pmax_campaignCreate a Performance Max campaign
create_demand_gen_campaignCreate a Demand Gen campaign
create_app_campaignCreate an App campaign
copy_campaignDuplicate an existing campaign
update_campaignUpdate campaign settings
pause_campaignPause a campaign
resume_campaignResume a paused campaign
delete_campaignDelete a campaign

Ad Groups & Ads

ToolDescription
list_ad_groupsList ad groups in a campaign
create_ad_groupCreate a new ad group
update_ad_groupUpdate ad group settings
pause_ad_groupPause an ad group
enable_ad_groupEnable an ad group
delete_ad_groupDelete an ad group
list_adsList ads in an ad group
get_adGet ad details
create_responsive_search_adCreate a Responsive Search Ad
create_responsive_display_adCreate a Responsive Display Ad
create_demand_gen_adCreate a Demand Gen ad
update_adUpdate an ad
pause_adPause an ad
enable_adEnable an ad
delete_adDelete an ad

Keywords & Targeting

ToolDescription
list_keywordsList keywords in an ad group
add_keywordsAdd keywords to an ad group
update_keyword_bidUpdate keyword bids
pause_keywordPause a keyword
enable_keywordEnable a keyword
delete_keywordDelete a keyword
keyword_plannerGet keyword ideas with volume data
add_negative_keywordsAdd negative keywords
add_campaign_negative_keywordAdd campaign-level negatives
auto_suggest_negative_keywordsAI-suggested negative keywords
get_search_terms_insightsSearch terms report
add_audience_targetingAdd audience targeting
set_demographic_targetingSet demographic targets
add_campaign_location_targetingAdd location targeting
search_geo_locationsSearch for geo targets

Bidding & Budgets

ToolDescription
list_budgetsList all budgets
create_budgetCreate a new budget
update_budgetUpdate budget amount
list_bidding_strategiesList bidding strategies
create_portfolio_bidding_strategyCreate portfolio strategy
set_bid_adjustmentsSet bid adjustments
get_bid_adjustment_performanceBid adjustment performance

Extensions

ToolDescription
create_sitelink_extensionsCreate sitelink extensions
create_callout_extensionsCreate callout extensions
create_call_extensionsCreate call extensions
create_image_extensionsCreate image extensions
create_price_extensionsCreate price extensions
create_promotion_extensionsCreate promotion extensions
create_structured_snippet_extensionsCreate structured snippets
create_lead_form_extensionsCreate lead form extensions
list_extensionsList all extensions

Performance & Analytics

ToolDescription
get_campaign_overviewCampaign performance overview
get_keyword_performanceKeyword performance metrics
get_device_performancePerformance by device
get_location_performancePerformance by location
get_audience_performanceAudience performance
get_ad_strength_and_review_statusAd strength scores
calculate_roas_by_adROAS calculation per ad
compare_ad_performanceCompare ad variants
identify_optimization_opportunitiesAI optimization suggestions
run_gaql_queryRun custom GAQL queries

Advanced Features

ToolDescription
create_experimentCreate A/B test experiment
schedule_experimentSchedule experiment run
promote_experimentPromote winning variant
create_conversion_actionCreate conversion action
upload_click_conversionsUpload offline conversions
create_shared_setCreate shared keyword set
create_labelCreate organizational label
create_custom_audienceCreate custom audience
create_remarketing_actionCreate remarketing tag
Meta Ads Tools (80+) — Click to expand

Account & Campaign Management

ToolDescription
meta_get_ad_accountsList all Meta ad accounts
meta_get_account_infoGet ad account details
meta_get_campaignsList all campaigns
meta_get_campaign_detailsGet campaign details
meta_create_campaignCreate a new campaign
meta_update_campaignUpdate campaign settings
meta_delete_campaignDelete a campaign

Ad Sets & Ads

ToolDescription
meta_get_adsetsList ad sets
meta_get_adset_detailsGet ad set details
meta_create_adsetCreate an ad set
meta_update_adsetUpdate ad set
meta_delete_adsetDelete an ad set
meta_get_adsList ads
meta_get_ad_detailsGet ad details
meta_create_adCreate an ad
meta_update_adUpdate an ad
meta_delete_adDelete an ad

Creatives & Assets

ToolDescription
meta_get_ad_creativesList ad creatives
meta_create_ad_creativeCreate ad creative
meta_update_ad_creativeUpdate ad creative
meta_delete_ad_creativeDelete ad creative
meta_upload_ad_imageUpload ad image
meta_upload_ad_videoUpload ad video
meta_batch_upload_ad_imagesBatch upload images
meta_get_ad_imageGet image details
meta_get_ad_previewsPreview ad creatives

Audiences & Targeting

ToolDescription
meta_create_custom_audienceCreate custom audience
meta_create_lookalike_audienceCreate lookalike audience
meta_estimate_audience_sizeEstimate audience reach
meta_search_interestsSearch interest targets
meta_search_behaviorsSearch behavior targets
meta_search_demographicsSearch demographic targets
meta_search_geo_locationsSearch geo locations
meta_get_interest_suggestionsInterest suggestions

Performance & Insights

ToolDescription
meta_get_insightsGet performance insights
meta_get_page_insightsPage-level insights
meta_get_page_postsList page posts
meta_get_promotable_postsGet promotable posts
meta_boost_page_postBoost a page post

Lead Generation

ToolDescription
meta_get_lead_formsList lead forms
meta_get_lead_form_detailsLead form details
meta_get_lead_form_leadsGet form submissions
meta_create_lead_formCreate lead form
meta_create_test_leadCreate test lead

Product Catalogs

ToolDescription
meta_get_catalogsList catalogs
meta_get_catalog_productsList products
meta_create_catalog_productCreate product
meta_batch_update_catalog_productsBatch update products
meta_create_catalog_product_feedCreate product feed
meta_create_catalog_product_setCreate product set

Business Management

ToolDescription
meta_get_business_infoGet business details
meta_get_business_usersList business users
meta_get_business_pagesList business pages
meta_get_business_ad_accountsBusiness ad accounts
meta_get_business_instagram_accountsInstagram accounts
meta_get_business_pixelsList pixels
Google Analytics 4 Tools (20+) — Click to expand
ToolDescription
ga_get_account_summariesList all GA4 accounts and properties
ga_get_property_detailsGet property configuration
ga_run_reportRun a standard report
ga_run_pivot_reportRun a pivot table report
ga_run_realtime_reportRun a realtime report
ga_batch_run_reportsRun multiple reports at once
ga_get_metadataGet available dimensions and metrics
ga_check_compatibilityCheck dimension/metric compatibility
ga_list_audiencesList configured audiences
ga_list_key_eventsList key events (conversions)
ga_list_data_streamsList data streams
ga_list_channel_groupsList channel groups
ga_get_custom_dimensions_and_metricsCustom dimensions/metrics
ga_get_attribution_settingsAttribution model settings
ga_get_enhanced_measurement_settingsEnhanced measurement config
ga_get_data_retention_settingsData retention settings
ga_get_google_signals_settingsGoogle Signals status
ga_list_bigquery_linksBigQuery export links
ga_list_dv360_linksDV360 integration links
ga_list_firebase_linksFirebase integration links
ga_list_search_ads_linksSearch Ads 360 links
ga_list_property_annotationsProperty annotations
Research Tools — Click to expand
ToolDescription
research_google_searchSearch Google for market research
research_analyze_webpageAnalyze any webpage
research_fetch_images_from_urlExtract images from URLs
research_download_and_resizeDownload and resize images
research_search_stock_imagesSearch stock image libraries
research_get_landing_pagesAnalyze landing pages

Security & Privacy

  • OAuth 2.1 with PKCE — Industry-standard authentication
  • No data storage — The server does not store your ad data or credentials
  • Your tokens stay local — Authentication tokens are stored on your machine only
  • Read-only by default — Write operations require explicit confirmation
  • Scoped access — Request only the permissions you need

FAQ

Do I need API keys for each platform?

No. The MCP server handles authentication via OAuth. You'll be prompted to connect your Google and Meta accounts on first use.

Is this free to use?

Yes, the MCP server is free. You only pay for the AI assistant you use (ChatGPT, Claude, etc.) and any ad spend on the platforms.

Can I use this with n8n for automation?

Yes! See the n8n Setup Guide for Streamable HTTP integration, or import our ready-made workflow template.

Does this support Google Ads Manager (MCC) accounts?

Yes. The get_account_hierarchy and list_accounts tools support MCC structures, letting you manage multiple accounts from one connection.

Can I run custom queries?

Yes. Use run_gaql_query for Google Ads (GAQL) and meta_fetch for Meta Ads to run custom API queries.

What about rate limits?

The server respects Google and Meta API rate limits automatically. For high-volume operations, use batch tools like add_batch_campaign_operations and meta_batch_update_catalog_products.


Contributing

Contributions are welcome! Please see our issue templates to report bugs or request features.

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Star History

If this project helps you manage ads more efficiently, please give it a star! It helps others discover it.


License

This project is licensed under the MIT License — see the LICENSE file for details.


Google Ads MCP · Meta Ads MCP · Facebook Ads MCP · GA4 MCP · Model Context Protocol
Built for marketers, agencies, and developers who want AI-powered ad management.

🚀 Get started with Ryze AI

关于 About

MCP server for Google Ads, Meta Ads & GA4 — works with ChatGPT, Claude, Cursor, n8n, Windsurf & more. 250+ tools for campaign management, analytics & optimization.
ad-optimizationadvertisingai-agentcampaign-managementchatgptclaudecodexcursorfacebook-adsga4google-adsgoogle-analyticsinstagram-adsmarketing-automationmcpmcp-servermeta-adsmodel-context-protocoln8nwindsurf

语言 Languages

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
3
Total Commits
峰值: 3次/周
Less
More