- name
- google-meta-ads-ga4-mcp
- description
- MCP server for Google Ads, Meta Ads & GA4 — 250+ tools for campaign management, analytics & optimization across all platforms
- triggers
- ["connect my google ads account to claude","set up meta ads campaign management","how do i use the google meta ads mcp server","create a google ads campaign with mcp","analyze ga4 data through mcp","manage facebook ads with ai assistant","configure advertising mcp server","run cross-platform ad performance reports"]
# Google Ads + Meta Ads + GA4 MCP Server
> Skill by [ara.so](https://ara.so) — MCP Skills collection.
## Overview
The Google Ads + Meta Ads + GA4 MCP server is a unified Model Context Protocol server that provides 250+ tools for managing advertising campaigns and analytics across Google Ads, Meta (Facebook/Instagram) Ads, and Google Analytics 4. It enables AI assistants like Claude, ChatGPT, Cursor, and n8n to perform full read-write operations on these platforms.
**Key capabilities:**
- **150+ Google Ads tools** — Campaign CRUD, keyword research, bidding, ad creation, audiences, extensions, experiments
- **80+ Meta Ads tools** — Campaign/ad set/creative management, audience targeting, lead gen, product catalogs
- **20+ GA4 tools** — Reporting, audience analysis, property config, attribution, key events
- **Cross-platform analytics** — Unified ROAS, performance comparison, budget allocation
This is a **remote MCP server** (hosted), not a local installation. You connect via URL endpoint.
## Installation & Setup
### Claude Desktop
1. Locate your Claude config file:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add the server configuration:
```json
{
"mcpServers": {
"google-meta-ads-ga4": {
"url": "YOUR_MCP_ENDPOINT_URL"
}
}
}
```
3. Restart Claude Desktop
4. Look for the MCP connection indicator (🔌) in the bottom-right corner
### ChatGPT
1. Navigate to **Settings** → **Connectors** → **Add custom connector**
2. Enter:
- **Name**: `Google Meta Ads GA4`
- **URL**: `YOUR_MCP_ENDPOINT_URL`
3. Click **Save**
4. The connector will appear in your available tools
### Cursor
1. Open `~/.cursor/mcp.json`
2. Add:
```json
{
"mcpServers": {
"google-meta-ads-ga4": {
"url": "YOUR_MCP_ENDPOINT_URL"
}
}
}
```
3. Restart Cursor
### Windsurf
1. Open `~/.codeium/windsurf/mcp_config.json`
2. Add the same configuration as Cursor
3. Restart Windsurf
### Claude Code (CLI)
```bash
claude mcp add google-meta-ads-ga4 --transport sse YOUR_MCP_ENDPOINT_URL
```
### n8n
1. Add an **MCP Client** node to your workflow
2. Configure:
- **Server URL**: `YOUR_MCP_ENDPOINT_URL`
- **Transport**: SSE (Server-Sent Events)
- **Authentication**: Bearer token (recommended)
Import the [pre-built workflow template](https://github.com/irinabuht12-oss/google-meta-ads-ga4-mcp/blob/main/configs/n8n_workflow.json) to get started.
### Codex CLI
Add to `~/.codex/config.toml`:
```toml
[mcp.google-meta-ads-ga4]
url = "YOUR_MCP_ENDPOINT_URL"
transport = "sse"
```
## Authentication & Credentials
This server uses **OAuth 2.1 with PKCE** for secure authentication. The authentication flow is handled by the hosted MCP server — you don't manage API keys locally.
**First-time setup:**
1. When you first use a tool, you'll be prompted to authenticate
2. Follow the OAuth flow for the specific platform (Google Ads, Meta, or GA4)
3. Grant the required permissions
4. Credentials are securely stored on the server side
**Environment variables** (if self-hosting):
- `GOOGLE_ADS_DEVELOPER_TOKEN` — Google Ads API developer token
- `GOOGLE_ADS_CLIENT_ID` — OAuth client ID
- `GOOGLE_ADS_CLIENT_SECRET` — OAuth client secret
- `META_APP_ID` — Meta app ID
- `META_APP_SECRET` — Meta app secret
- `GA4_PROPERTY_ID` — GA4 property ID
## Google Ads Tools
### List All Campaigns
```javascript
// Tool: list_campaigns
// Lists all campaigns with performance metrics
const campaigns = await mcp.call_tool("list_campaigns", {
customer_id: "1234567890",
include_metrics: true,
date_range: "LAST_30_DAYS"
});
// Response includes: campaign name, status, budget, impressions, clicks, cost, conversions, ROAS
```
### Create a Search Campaign
```javascript
// Tool: create_search_campaign
// Creates a new Google Search campaign
const campaign = await mcp.call_tool("create_search_campaign", {
customer_id: "1234567890",
campaign_name: "Q2 2026 CRM Software Campaign",
budget_amount_micros: 50000000, // $50 daily budget (in micros)
target_cpa_micros: 25000000, // $25 target CPA
networks: ["SEARCH", "SEARCH_PARTNERS"],
locations: ["US"], // Country codes
languages: ["en"],
start_date: "2026-04-01",
end_date: "2026-06-30"
});
// Returns: campaign resource name and ID
```
### Add Keywords to Ad Group
```javascript
// Tool: add_keywords
// Adds keywords with match types and bids
const keywords = await mcp.call_tool("add_keywords", {
customer_id: "1234567890",
ad_group_id: "987654321",
keywords: [
{
text: "best crm software",
match_type: "EXACT",
cpc_bid_micros: 5000000 // $5 max CPC
},
{
text: "crm for small business",
match_type: "PHRASE",
cpc_bid_micros: 3000000
},
{
text: "customer relationship management",
match_type: "BROAD",
cpc_bid_micros: 2000000
}
]
});
```
### Keyword Research with Keyword Planner
```javascript
// Tool: generate_keyword_ideas
// Gets keyword suggestions with volume and CPC data
const ideas = await mcp.call_tool("generate_keyword_ideas", {
customer_id: "1234567890",
seed_keywords: ["project management software", "task tracking tool"],
location_ids: ["2840"], // United States
language_id: "1000", // English
include_adult_keywords: false
});
// Returns: keyword text, avg monthly searches, competition, low/high CPC bid
```
### Create Responsive Search Ad
```javascript
// Tool: create_responsive_search_ad
// Creates an RSA with multiple headlines and descriptions
const ad = await mcp.call_tool("create_responsive_search_ad", {
customer_id: "1234567890",
ad_group_id: "987654321",
headlines: [
"Best CRM Software 2026",
"Try Our CRM Free Today",
"Top-Rated CRM Platform",
"Manage Customers Easily",
"CRM Built for Growth"
],
descriptions: [
"Free 14-day trial. No credit card required. Get started in minutes.",
"Loved by 10,000+ businesses. Intuitive interface, powerful features."
],
final_urls: ["https://example.com/crm"],
path1: "crm",
path2: "free-trial"
});
```
### Get Campaign Performance Report
```javascript
// Tool: get_campaign_performance
// Retrieves detailed campaign metrics
const performance = await mcp.call_tool("get_campaign_performance", {
customer_id: "1234567890",
campaign_id: "111222333",
date_range: "LAST_7_DAYS",
metrics: [
"impressions",
"clicks",
"ctr",
"cost_micros",
"conversions",
"conversion_value",
"cost_per_conversion",
"roas"
],
segment_by: "date" // Daily breakdown
});
```
### Manage Negative Keywords
```javascript
// Tool: add_negative_keywords
// Adds negative keywords to prevent unwanted clicks
const negatives = await mcp.call_tool("add_negative_keywords", {
customer_id: "1234567890",
campaign_id: "111222333",
keywords: [
{ text: "free", match_type: "BROAD" },
{ text: "cheap", match_type: "BROAD" },
{ text: "download", match_type: "PHRASE" }
]
});
```
### Create Ad Extensions
```javascript
// Tool: create_sitelinks
// Adds sitelink extensions to campaigns
const sitelinks = await mcp.call_tool("create_sitelinks", {
customer_id: "1234567890",
campaign_id: "111222333",
sitelinks: [
{
link_text: "Pricing",
final_urls: ["https://example.com/pricing"],
description1: "Flexible plans",
description2: "Start from $29/mo"
},
{
link_text: "Features",
final_urls: ["https://example.com/features"],
description1: "All-in-one CRM",
description2: "Sales, marketing, support"
}
]
});
```
## Meta Ads Tools
### List All Campaigns
```javascript
// Tool: meta_list_campaigns
// Lists all Meta ad campaigns
const campaigns = await mcp.call_tool("meta_list_campaigns", {
account_id: "act_1234567890",
fields: ["name", "status", "objective", "daily_budget", "lifetime_budget"],
include_insights: true,
date_preset: "last_30d"
});
```
### Create a Campaign
```javascript
// Tool: meta_create_campaign
// Creates a new Meta Ads campaign
const campaign = await mcp.call_tool("meta_create_campaign", {
account_id: "act_1234567890",
name: "Q2 Lead Generation Campaign",
objective: "OUTCOME_LEADS", // OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_TRAFFIC, OUTCOME_SALES
status: "PAUSED", // Create paused, enable later
special_ad_categories: [] // Or ["CREDIT", "EMPLOYMENT", "HOUSING"]
});
```
### Create Ad Set with Targeting
```javascript
// Tool: meta_create_ad_set
// Creates an ad set with budget, schedule, and targeting
const adSet = await mcp.call_tool("meta_create_ad_set", {
account_id: "act_1234567890",
campaign_id: "23850000000000000",
name: "US Adults 25-45 Desktop",
optimization_goal: "LEAD_GENERATION",
billing_event: "IMPRESSIONS",
bid_amount: 500, // $5.00 in cents
daily_budget: 5000, // $50.00
start_time: "2026-04-01T00:00:00+0000",
end_time: "2026-06-30T23:59:59+0000",
targeting: {
geo_locations: {
countries: ["US"]
},
age_min: 25,
age_max: 45,
genders: [0], // 0 = all, 1 = male, 2 = female
publisher_platforms: ["facebook", "instagram"],
facebook_positions: ["feed", "right_hand_column"],
device_platforms: ["desktop"]
}
});
```
### Create Lead Form
```javascript
// Tool: meta_create_lead_form
// Creates a native lead generation form
const leadForm = await mcp.call_tool("meta_create_lead_form", {
page_id: "1234567890",
name: "CRM Demo Request Form",
follow_up_action_url: "https://example.com/thank-you",
privacy_policy_url: "https://example.com/privacy",
questions: [
{ type: "FULL_NAME" },
{ type: "EMAIL" },
{ type: "PHONE_NUMBER" },
{
type: "CUSTOM",
key: "company_size",
label: "Company Size",
type: "MULTIPLE_CHOICE",
options: ["1-10", "11-50", "51-200", "200+"]
}
],
context_card: {
title: "Get a Free Demo",
content: "See how our CRM can help your business grow.",
button_text: "Get Started"
}
});
```
### Upload Image Creative
```javascript
// Tool: meta_upload_image
// Uploads an image for use in ads
const image = await mcp.call_tool("meta_upload_image", {
account_id: "act_1234567890",
file_url: "https://example.com/ad-image.jpg",
// OR
// file_path: "/path/to/local/image.jpg"
});
// Returns: image hash to use in ad creatives
View on GitHub