Google Analytics MCP Server
Seamlessly bridge Google Analytics 4 with AI-powered developer workflows and assistants using the Google Analytics MCP Server for natural language analytics, automated reporting, and actionable insights.

What does “Google Analytics” MCP Server do?
The Google Analytics MCP Server enables seamless integration of Google Analytics 4 (GA4) data with AI assistants and development tools like Claude, Cursor, and Windsurf using the Model Context Protocol (MCP). By acting as a bridge between MCP clients and the GA4 API, it allows users to query website traffic, user behavior, and analytics data in natural language, unlocking access to over 200 dimensions and metrics. This empowers AI agents to automate reporting, perform in-depth data analysis, and provide actionable insights directly inside developer workflows or AI-powered tools, streamlining the process of making data-informed decisions without manual dashboard navigation.
List of Prompts
No specific prompt templates are mentioned in the repository.
List of Resources
No explicit resources are listed in the repository.
List of Tools
- Information about the tools provided in the server (such as from
ga4_mcp_server.py
) is not detailed in the available files.
Use Cases of this MCP Server
- Natural Language Analytics Queries: Developers and analysts can ask questions about traffic, user behavior, or conversion metrics in plain English, and receive relevant GA4 data or summaries.
- Automated Reporting: Use the MCP server to generate regular or ad-hoc analytics reports, reducing the overhead of manual report creation in the GA4 dashboard.
- Workflow Integration: Integrate GA4 data access directly within developer tools like Cursor or Windsurf, allowing for in-context analytics during code reviews or feature rollouts.
- AI-driven Insights: Enable AI agents to surface trends, anomalies, or recommendations from analytics data automatically, supporting faster decision-making.
- Cross-Source Data Analysis: Mix Google Analytics data with other sources (like Search Console) for richer, multi-dimensional insights (if using alongside other MCP servers).
How to set it up
Windsurf
- Ensure Python 3.10+ is installed.
- Clone the repository or install via PyPI if available.
- Add the Google Analytics MCP server to your
mcpServers
configuration:{ "mcpServers": { "google-analytics-mcp": { "command": "python3", "args": ["-m", "google_analytics_mcp"] } } }
- Save the configuration and restart Windsurf.
- Verify the MCP server is listed and accessible in Windsurf’s UI.
Claude
- Ensure Python 3.10+ is installed.
- Use the provided
claude-config-template.json
as a starting point. - Add or update the
mcpServers
field in your Claude configuration:{ "mcpServers": { "google-analytics-mcp": { "command": "python3", "args": ["-m", "google_analytics_mcp"] } } }
- Save the configuration and restart Claude.
- Confirm the MCP server connection in Claude’s integrations panel.
Cursor
- Install Python 3.10+ and clone or install the MCP server.
- Locate Cursor’s configuration file.
- Add the MCP server entry:
{ "mcpServers": { "google-analytics-mcp": { "command": "python3", "args": ["-m", "google_analytics_mcp"] } } }
- Save and restart Cursor.
- Ensure the server appears under Cursor’s available MCP servers.
Cline
- Ensure Python 3.10+ is present.
- Download or install the MCP server.
- Modify Cline’s configuration to include:
{ "mcpServers": { "google-analytics-mcp": { "command": "python3", "args": ["-m", "google_analytics_mcp"] } } }
- Save, restart Cline, and check MCP server connectivity.
Securing API Keys (using environment variables):
To provide sensitive credentials (like Google Analytics API keys or service account files), use environment variables for security. Example configuration:
{
"mcpServers": {
"google-analytics-mcp": {
"command": "python3",
"args": ["-m", "google_analytics_mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/credentials.json"
},
"inputs": {
"property_id": "YOUR_GA4_PROPERTY_ID"
}
}
}
}
How to use this MCP inside flows
Using MCP in FlowHunt
To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:
{
"google-analytics-mcp": {
"transport": "streamable_http",
"url": "https://yourmcpserver.example/pathtothemcp/url"
}
}
Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “google-analytics-mcp” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.
Overview
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | |
List of Prompts | ⛔ | No prompt templates found |
List of Resources | ⛔ | Not explicitly listed |
List of Tools | ⛔ | Not explicitly listed |
Securing API Keys | ✅ | Env variable usage shown in config example |
Sampling Support (less important in evaluation) | ⛔ | Not documented |
Between the documentation and the code, Google Analytics MCP provides a clear overview and setup instructions, but lacks detailed documentation on prompts, resources, and tools. For security, it supports environment variable configuration. Roots and sampling are not referenced.
Our opinion
Based on the tables above, this MCP server scores well for overview and setup, but is missing detail on prompts, tools, and resources. It is best for users already familiar with GA4 and MCP concepts who do not need extensive prompt/workflow templates.
MCP Score
Has a LICENSE | ✅ (MIT) |
---|---|
Has at least one tool | ⛔ |
Number of Forks | 9 |
Number of Stars | 57 |
Frequently asked questions
- What is the Google Analytics MCP Server?
It's a bridge between Google Analytics 4 (GA4) and AI/developer tools via the Model Context Protocol (MCP), enabling natural language access to analytics data, automated reporting, and seamless workflow integration.
- What are the main use cases?
Natural language analytics queries, automated GA4 reporting, workflow integration in tools like Cursor or Windsurf, AI-driven insights, and cross-source data analysis with other MCP servers.
- How do I secure my Google Analytics credentials?
Store sensitive information such as API keys or service account files in environment variables. For example, set 'GOOGLE_APPLICATION_CREDENTIALS' to your credentials file path in the MCP server config.
- Do I need GA4 knowledge to use this server?
It’s best suited for users already familiar with GA4 and MCP, as detailed prompt and resource templates are not provided.
- Does this MCP Server provide prompt templates or built-in tools?
No explicit prompt templates or detailed tool documentation are included. The server focuses on connectivity and data access.
- How do I use this MCP server inside FlowHunt?
Add the MCP component to your FlowHunt flow, open its configuration, and insert the MCP server details in JSON format. Once configured, your AI agent will have access to Google Analytics data for enhanced analytics capabilities.
Try Google Analytics MCP Server with FlowHunt
Unlock powerful GA4 analytics in your AI workflows, automate reporting, and empower your team to make data-driven decisions directly from your favorite tools.