mcp-marketing-analytics
Integrates with Google Ads, supporting raw GAQL queries, campaign performance, keyword performance with quality score, ad group metrics, and account summary with top campaigns.
Provides tools for interacting with Google Analytics 4, including listing accounts, running custom reports, retrieving real-time data, top pages, traffic sources, and user metrics with period-over-period comparison.
Offers tools for Google Search Console, such as listing sites, executing search analytics queries, retrieving top queries and top pages, inspecting URL indexing status, and listing sitemaps.
Enables access to Meta Ads data, with tools to list ad accounts, view account-level spend/performance, and drill into campaign, ad set, and individual ad metrics.
Click on "Install 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., "@mcp-marketing-analyticsShow me my top pages for the last 30 days"
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.
Marketing Analytics MCP Server
A Model Context Protocol (MCP) server that gives Claude access to Google Analytics 4, Google Search Console, Meta Ads, and Google Ads. Ask Claude about your marketing data in natural language.
Tools (23 total)
Setup
Tool | Description |
| Step-by-step setup instructions — shows what's configured and guides you through any missing API credentials |
Google Analytics 4 (6 tools)
Tool | Description |
| List all GA4 properties accessible to your Google account |
| Run a custom report with any dimensions/metrics |
| See active users right now |
| Most viewed pages |
| Traffic by source/medium |
| Summary with optional period-over-period comparison |
Google Search Console (6 tools)
Tool | Description |
| List all Search Console sites you have access to |
| Flexible search analytics query |
| Top search queries by clicks |
| Top pages in search results |
| Check indexing status of any URL |
| List submitted sitemaps |
Meta Ads (5 tools)
Tool | Description |
| List accessible ad accounts |
| Account-level spend/performance |
| Campaign metrics |
| Ad set metrics |
| Individual ad metrics |
Google Ads (5 tools)
Tool | Description |
| Execute raw GAQL queries |
| Campaign performance metrics |
| Keyword metrics + quality score |
| Ad group metrics |
| Account totals + top campaigns |
Related MCP server: google-search-console
Quick Start
1. Clone and build
git clone https://github.com/YOUR_USERNAME/mcp-marketing-analytics.git
cd mcp-marketing-analytics
npm install
npm run build2. Get your credentials
Run the interactive setup wizard:
npm run setupOr manually create a .env file (see .env.example).
Google APIs (GA4 + Search Console + Google Ads)
Go to Google Cloud Console
Create a project and enable:
Google Analytics Data API
Google Analytics Admin API
Google Search Console API
Google Ads API (optional)
Create OAuth 2.0 Client ID (Web application type)
Add
http://localhost:3847/callbackas an Authorized redirect URIRun
npm run setupto complete the OAuth flow and get your refresh token
Meta Ads (optional)
Go to Meta Graph API Explorer
Generate a token with
ads_readpermissionExchange for a long-lived token (60-day expiry)
Google Ads (optional)
Create a Manager Account
Get a Developer Token from Tools & Settings → API Center
Note your Customer Account ID (10 digits)
3. Add to Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (Mac):
{
"mcpServers": {
"marketing-analytics": {
"command": "node",
"args": ["/absolute/path/to/mcp-marketing-analytics/dist/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token"
}
}
}
}4. Add to Claude Code
claude mcp add marketing-analytics -- node "/absolute/path/to/mcp-marketing-analytics/dist/index.js"5. Restart Claude and start asking
"List my GA4 properties"
"Show me top pages for the last 30 days"
"What are my top search queries on Google?"
"How are my Meta ad campaigns performing?"
"Compare this month's traffic to last month"
Configuration
All API credentials are passed via environment variables. Only configure the APIs you need — unconfigured APIs will show a helpful message instead of crashing.
Variable | Required | Description |
| For Google APIs | OAuth 2.0 Client ID |
| For Google APIs | OAuth 2.0 Client Secret |
| For Google APIs | OAuth 2.0 Refresh Token |
| No | Default GA4 property (can be set per-request) |
| No | Default GSC site (can be set per-request) |
| For Meta Ads | Long-lived access token |
| No | For app secret proof |
| No | For app secret proof |
| For Google Ads | From API Center |
| For Google Ads | 10-digit account ID |
| No | MCC manager account ID |
Multi-Account Support
You don't need to hardcode property IDs or site URLs. Use the discovery tools:
ga4_list_accounts→ shows all GA4 properties you can accessgsc_list_sites→ shows all Search Console sites you can accessPass
propertyIdorsiteUrlto any tool to query a specific account
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/christophertanenso/mcp-marketing-analytics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server