Google Analytics 4 MCP Server
Provides tools for managing Google Ads links on a GA4 property, including listing, creating, updating, and deleting linked Google Ads accounts and adjusting personalized-advertising settings.
Provides tools for querying and managing Google Analytics 4 data, including reports, traffic sources, pages, events, ecommerce metrics, demographics, audiences, custom dimensions/metrics, data streams, key events, and property settings.
Click on "Deploy 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., "@Google Analytics 4 MCP Servershow me last week's traffic and conversions by channel"
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.
Google Analytics 4 MCP Server (GA4) by Insightful Pipe
Connect Google Analytics 4 to AI assistants for website analytics and property management.
Part of the Insightful Pipe MCP Server Collection — Connect Google Analytics 4 to Claude, ChatGPT, Cursor, and other AI assistants using the Model Context Protocol. Query website traffic, analyze user behavior, and get AI-driven insights conversationally.
MCP Server URL
https://google-analytics.insightfulmcp.com/Related MCP server: Google Analytics MCP Server
What is Google Analytics 4 MCP?
Google Analytics 4 MCP is a remote Model Context Protocol server that enables AI assistants to query and analyze your GA4 data. This powerful integration allows you to:
Ask questions about website traffic in natural language
Analyze user behavior, conversions, and engagement
Generate custom reports through conversation
Get AI-powered insights and recommendations
Access traffic sources, pages, events, and demographics
Installation
Claude
Copy the MCP Server URL:
https://google-analytics.insightfulmcp.com/Scroll to the bottom and click Add custom connector
Paste the URL and click Add
Click Connect and sign in to InsightfulPipe if asked. Claude then lists the connector as connected.
ChatGPT
Custom MCP servers are added through ChatGPT's Developer mode. Availability depends on your ChatGPT plan, and workspace admins may need to allow it.
Turn on Developer mode in ChatGPT settings
Create a new app for a remote MCP server and paste the URL:
https://google-analytics.insightfulmcp.com/Sign in to InsightfulPipe if asked. The connection finishes as soon as you are signed in.
See OpenAI's guide: Developer mode and MCP apps in ChatGPT
Claude Code
claude mcp add --transport http google-analytics https://google-analytics.insightfulmcp.com/Cursor
Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"google-analytics": {
"url": "https://google-analytics.insightfulmcp.com/"
}
}
}When Cursor shows Needs authentication, click Connect and sign in to InsightfulPipe if asked.
Available Actions
62 actions: 26 read, 36 write.
Read Actions (26)
Action | Description |
| E-commerce performance data including transactions, revenue, and product metrics |
| Event tracking data including event names, counts, and user engagement |
| Geographic performance data including country, region, city, and language |
| Get one audience, including its filter clauses |
| Get one BigQuery export link |
| Get one channel group, including its grouping rules |
| Get a single GA4 custom dimension by id |
| Get a single GA4 custom metric by id |
| Read a GA4 property's event and user data retention settings |
| Fetch one data stream, including its Measurement ID |
| Read the enhanced measurement settings of a web data stream |
| Get a single GA4 key event by id |
| Fetch a GA4 property's settings (name, time zone, currency, industry) |
| Execute GA4 runReport with arbitrary metrics and dimensions |
| List the audiences on a property |
| List the BigQuery export links on a property |
| List the channel groups on a property |
| List the GA4 custom dimensions on a property |
| List the GA4 custom metrics on a property |
| List a GA4 property's data streams (web, Android, iOS) |
| List the Google Ads accounts linked to a GA4 property |
| List the GA4 key events (conversions) on a property |
| Page-level performance data including views, engagement, and user behavior |
| Technology breakdown data including browser, device, OS, and platform |
| Traffic acquisition data including source, medium, campaign, and channel groupings |
| User demographic data including age, gender, interests, and user type |
Write Actions (36)
Action | Description |
| Attest the User Data Collection acknowledgement on a property, which GA4 requires before Measurement Protocol secrets can be created |
| Archive an audience so it stops collecting members |
| Archive a GA4 custom dimension (frees a slot; not a hard delete) |
| Archive a GA4 custom metric (frees a slot; not a hard delete) |
| Create an audience from a set of filter clauses |
| Link a GA4 property to a BigQuery project for raw event export |
| Create a custom channel group from grouping rules |
| Create a GA4 custom dimension from an event parameter |
| Create a GA4 custom metric from an event parameter |
| Create a web, Android or iOS data stream on a GA4 property |
| Link a Google Ads account to a GA4 property |
| Create a GA4 key event (conversion) for an event name |
| Create a Measurement Protocol secret so server-side events can be sent to a stream |
| Create a new GA4 property under an account |
| Remove a BigQuery export link |
| Delete a custom channel group |
| Delete a data stream from a GA4 property |
| Unlink a Google Ads account from a GA4 property |
| Delete a GA4 key event (conversion) |
| Delete a Measurement Protocol secret, revoking server-side sends that use it |
| Soft-delete (trash) the connected GA4 property |
| Get one Measurement Protocol secret, including its secret value |
| List the GA4 accounts this connection can administer |
| List the Measurement Protocol secrets on a data stream |
| Rename an audience or change its description |
| Change what a BigQuery export link exports |
| Change a channel group's name, description, rules, or primary flag |
| Update a GA4 custom dimension's display name / description |
| Update a GA4 custom metric's display name / description |
| Set how long a GA4 property retains event and user data |
| Update a data stream's display name or default URI |
| Turn enhanced measurement events (scrolls, outbound clicks, site search, video, downloads) on or off |
| Update a Google Ads link's personalized-advertising setting |
| Update a GA4 key event's counting method or default value |
| Rename a Measurement Protocol secret |
| Update a GA4 property's display name, time zone, currency or industry |
Control What Your AI Can Do
You decide what AI agents can do with each connected account:
Turn individual actions on or off for every connected account, so agents only see the actions you allow.
Connect as Read-only or Read & Write. A read-only connection can only enable read actions.
Destructive actions stay off by default. Actions such as deletes are disabled until an admin enables them.
Team access per account. Restricted team members only use the accounts they are granted, with the read actions enabled on them.
Usage Examples
Traffic Analysis
"Show me website traffic for the last 30 days compared to the previous period"Acquisition Insights
"Which traffic sources have the highest conversion rate?"Page Performance
"What are my top 10 landing pages by engagement rate?"E-commerce Analytics
"What's our revenue trend this quarter and which products are selling best?"User Behavior
"How do mobile users behave differently from desktop users?"Custom Reports
"Run a report showing sessions by country and device category"Supported Metrics
Metric | Description |
Users | Unique visitors to your site |
Sessions | Total website visits |
Pageviews | Total page views |
Engagement Rate | Percentage of engaged sessions |
Average Session Duration | Time spent on site |
Bounce Rate | Single-page sessions |
Conversions | Goal completions |
Revenue | E-commerce revenue (if applicable) |
Why Google Analytics 4 MCP?
For Digital Marketers
Instant answers - No more complex report building
Natural language - Ask questions like you're talking to an analyst
Cross-channel insights - Combine with ad platform data
For Website Owners
Understand your audience - Deep user behavior insights
Track goals - Monitor what matters to your business
Identify opportunities - AI-powered recommendations
For Analysts
Faster exploration - Query data conversationally
Automated insights - AI surfaces important patterns
Flexible reporting - Generate any report through chat
Security & Privacy
Official Google Analytics API - Direct integration with Google's API
OAuth 2.0 - Secure Google authentication
Data encryption - Secure data transmission
Pricing
The Google Analytics 4 MCP server is included in every InsightfulPipe plan, together with all other MCP servers and the CLI. Plans start at $29.99/month, and you can try it for 7 days. See insightfulpipe.com/pricing for current plans.
Ready-Made Skills and Prompts
Claude skills for measurement and analytics — ready-made skills that run on your connected data
Explore More MCP Servers by Insightful Pipe
Visit insightfulpipe.com/mcp-servers to discover our full collection of MCP servers for marketing and analytics.
Google MCP Servers
Google Search Console MCP - SEO analytics
Google Ads MCP - Advertising data
Google My Business MCP - Local SEO
SEO & Performance MCP Servers
PageSpeed MCP - Core Web Vitals
Web Crawler MCP - SEO auditing
Resources
Support
Documentation: insightfulpipe.com/docs
All MCP Servers: insightfulpipe.com/mcp-servers
Email: support@insightfulpipe.com
Insightful Pipe — AI-powered marketing analytics through MCP servers. Explore all integrations →
License
MIT License - see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Google Analytics to ChatGPT. Query GA4 data in plain English and get instant insights.
Marketing data and actions for AI agents: GA4, Search Console, ads, social, SEO and WordPress.
GA4, Google Ads and Search Console in Claude. Read-only OAuth, multi-account for agencies.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Related MCP Servers
- AlicenseAqualityBmaintenanceConnects Google Analytics 4 data to Claude, Cursor and other MCP clients, enabling natural language queries of website traffic, user behavior, and analytics data with access to 200+ GA4 dimensions and metrics.102,152 PyPI243MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Google Analytics 4 data, providing tools for historical reporting, real-time activity monitoring, and property management. It supports secure service account authentication to access metrics like traffic summaries, user acquisition, and custom dimensions.MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Google Analytics 4 data using natural language through MCP clients like Claude and Cursor, supporting 200+ dimensions and metrics for traffic, user behavior, and e-commerce analysis.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query Google Analytics 4 data, including listing accounts and properties, running historical and real-time reports with customizable metrics and dimensions.-