Google Analytics MCP Server
@MCP-Mirror
About Google Analytics MCP Server
Mirror of
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"mcp-server-google-analytics"
],
"env": {
"GOOGLE_CLIENT_EMAIL": "",
"GOOGLE_PRIVATE_KEY": "",
"GA_PROPERTY_ID": ""
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Google Analytics MCP Server?
Google Analytics MCP Server is an MCP server implementation for accessing Google Analytics 4 (GA4) data, built using the Model Context Protocol TypeScript SDK. It provides functions to query page views, active users, events, and user behavior metrics.
How to use Google Analytics MCP Server?
Install the package with pnpm install mcp-server-google-analytics and set the environment variables GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY, and GA_PROPERTY_ID. Start the server with pnpm start or configure it in Claude Desktop using the provided npx command with environment variables.
Key features of Google Analytics MCP Server
- Get page view metrics with customizable dimensions
- Track active and new users over time
- Analyze specific events and their metrics
- Monitor user behavior metrics (session duration, bounce rate)
- Flexible date range selection for all queries
Use cases of Google Analytics MCP Server
- Analyze website traffic and user engagement over custom date ranges
- Monitor event performance, such as purchases or sign-ups
- Understand user behavior patterns like session duration and bounce rate
- Integrate GA4 analytics data into AI workflows through MCP
FAQ from Google Analytics MCP Server
What data can I access with this server?
You can access page view metrics, active and new users, specific event metrics, and user behavior metrics like session duration and bounce rate.
What are the prerequisites?
Node.js 20 or higher, a Google Analytics 4 property, a Google Cloud project with the Analytics Data API enabled, and service account credentials with appropriate permissions.
How do I set up authentication?
Create a service account in Google Cloud, download its credentials JSON, set the GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY environment variables, and grant the service account access to your GA4 property.
Can I query data for specific date ranges?
Yes, all functions accept startDate and endDate parameters to specify the date range for the query.
Is this server compatible with Claude Desktop?
Yes, it can be configured in Claude Desktop using an mcpServers entry with the npx command and environment variables for credentials and property ID.
Frequently asked questions
What data can I access with this server?
You can access page view metrics, active and new users, specific event metrics, and user behavior metrics like session duration and bounce rate.
What are the prerequisites?
Node.js 20 or higher, a Google Analytics 4 property, a Google Cloud project with the Analytics Data API enabled, and service account credentials with appropriate permissions.
How do I set up authentication?
Create a service account in Google Cloud, download its credentials JSON, set the `GOOGLE_CLIENT_EMAIL` and `GOOGLE_PRIVATE_KEY` environment variables, and grant the service account access to your GA4 property.
Can I query data for specific date ranges?
Yes, all functions accept `startDate` and `endDate` parameters to specify the date range for the query.
Is this server compatible with Claude Desktop?
Yes, it can be configured in Claude Desktop using an `mcpServers` entry with the npx command and environment variables for credentials and property ID.
Basic information
More Data & Analytics MCP servers
Salesforce MCP Server
tsmztechSalesforce MCP Server
Bright Data MCP
brightdataA powerful Model Context Protocol (MCP) server that provides an all-in-one solution for public web access.

TofuBofu AI Visibility
Arnav NeilTofuBofu runs a free AI visibility scan for any B2B company, right inside your AI assistant. Ask it to scan a domain and it runs the questions real buyers ask across ChatGPT, Claude, Gemini, Perplexity, Google AI Overvie
MCP.science: Open Source MCP Servers for Scientific Research ๐๐
pathintegral-instituteOpen Source MCP Servers for Scientific Research

LeadMarina
LeadMarinaVerified local-business leads: search any niche in any city, query your lead library, and export to Close, GoHighLevel, Google Sheets, or emailed files โ every email SMTP-checked, every phone verified with line type and
Comments