How Wix scaled AI-native work to 5,000 employees with Willow
Read More
Enterprise Connectors
Google Analytics logo. Google Analytics MCP server connector.

Google Analytics MCP Server

Google Analytics 4 is a powerful analytics platform for tracking website and app user behavior, measuring marketing ROI, and gaining insights into customer journeys.

ToolsTools
25
Last updatedLast Updated
✓Enterprise-grade security
✓SSO & authentication ready
✓Full governance & audit logs

What is the Google Analytics MCP Server?

The Google Analytics MCP server gives AI agents structured, permission-aware access to Google Analytics through the Model Context Protocol. With 25 pre-built actions, agents can read, create, and update Google Analytics data on behalf of authorized users.

Willow ships the Google Analytics MCP server as part of an enterprise control plane. Every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to a full audit trail, and integrates with Splunk and Loki for SIEM visibility. Connect from Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, or any custom agent. Install once, distribute org-wide, and see exactly how Google Analytics is being used by every AI agent in your stack.

Tools

List Account Summaries

Retrieve a summary list of all Google Analytics accounts accessible to the authenticated user, along with their associated properties. This is the recommended starting point for discovering available accounts and properties. Returns account display names, IDs, and a list of properties under each account. Use this to help users identify which property ID to use for reporting and management operations.

List Accounts

Retrieve a detailed list of all Google Analytics accounts accessible to the authenticated user. Returns comprehensive account information including display name, create time, update time, region code, and deleted status. Use this when you need full account details beyond what's provided in the summary list.

Get Account

Retrieve detailed information about a specific Google Analytics account by its ID. Returns the account's display name, creation time, update time, region code, and deletion status. Use this when you need to verify account details or check account configuration.

List Properties

Retrieve a list of Google Analytics 4 properties. You can optionally filter by parent account using the filter parameter (e.g., 'parent:accounts/12345'). Returns property details including display name, property type, time zone, currency code, and industry category. Use this to discover all properties under an account or to get a comprehensive list of all accessible properties.

Run Report

Generate a customized analytics report with your specified dimensions, metrics, date ranges, and filters. This is the primary tool for accessing Google Analytics 4 data. Supports complex queries with multiple dimensions (e.g., 'city', 'country'), metrics (e.g., 'activeUsers', 'sessions'), date ranges, dimension/metric filters, and ordering. Returns data in rows and columns format. Use this for standard historical reporting needs. Date format: 'YYYY-MM-DD' or relative dates like 'today', 'yesterday', '7daysAgo', '30daysAgo'.

Run Realtime Report

Get real-time analytics data for your property, showing activity from the last 30 minutes. Returns live data about active users, events, and user behavior as it happens. Supports dimensions like 'country', 'city', 'unifiedScreenName' and metrics like 'activeUsers', 'screenPageViews'. Use this to monitor current website/app activity, track live campaigns, or debug tracking implementation. Note: Real-time reports have different dimension/metric availability compared to historical reports.

Run Pivot Report

Generate a pivot table report to analyze your Google Analytics data from multiple perspectives. Pivot reports allow you to cross-reference dimensions in rows and columns, with aggregated metrics at their intersections. For example, you can create a report with 'country' in rows, 'deviceCategory' in columns, and 'activeUsers' as the metric to see users by country and device. Use this for comparative analysis and multi-dimensional data exploration.

Batch Run Reports

Run multiple analytics reports in a single request for improved efficiency. Each report can have its own dimensions, metrics, date ranges, and filters. Use this when you need data from multiple report configurations at once, such as getting different metrics for different time periods or different dimension breakdowns. Returns an array of report results in the same order as the requests.

Get Metadata

Retrieve metadata about dimensions and metrics available for reporting in a specific property. Returns comprehensive information including API name, UI name, description, data type, and category for each dimension and metric. Use this to discover available dimensions/metrics, understand their data types, check if a dimension/metric is available for your property, or build dynamic report interfaces. Essential for validating report requests before execution.

Check Compatibility

Check whether specific dimensions and metrics can be used together in a report request. Google Analytics has compatibility rules where certain dimensions and metrics cannot be queried together. This tool validates your report structure before execution, helping you avoid errors. Returns a list of compatible dimensions and metrics that can be added to your report. Use this before running complex reports to ensure all fields are compatible.

List Data Streams

Retrieve all data streams configured for a Google Analytics 4 property. Data streams represent sources of data (websites, iOS apps, Android apps) sending data to your property. Returns stream details including type (web/iOS/Android), display name, measurement ID, and configuration settings. Use this to discover available data streams, get measurement IDs for implementation, or audit your data collection setup.

Get Data Stream

Retrieve detailed information about a specific data stream. Returns complete configuration including stream type, display name, measurement ID, creation time, and platform-specific settings (e.g., default URI for web streams, bundle ID for iOS apps). Use this to inspect data stream configuration, verify measurement IDs, or check stream-specific settings.

Update Data Stream

Modify the configuration of an existing data stream. You can update the display name and platform-specific settings such as default URI for web streams. Requires specifying which fields to update using the update_mask parameter. Use this to rename data streams, change default URIs, or update other stream configuration. Note: You cannot change the stream type (web/iOS/Android) after creation.

List Custom Dimensions

Retrieve all custom dimensions defined for a Google Analytics 4 property. Custom dimensions are user-defined dimensions that extend GA4's standard dimensions with your own data (e.g., user membership level, content category). Returns dimension details including parameter name, display name, description, scope (EVENT/USER/ITEM), and disallow ads personalization setting. Use this to discover available custom dimensions for reporting or to audit your custom dimension setup.

Create Custom Dimension

Create a new custom dimension for a Google Analytics 4 property. Custom dimensions allow you to collect and analyze data specific to your business beyond GA4's standard dimensions. You must specify the parameter name (as sent in your events), display name, scope (EVENT for event-scoped, USER for user-scoped, ITEM for item-scoped), and optionally a description. Note: There are limits on the number of custom dimensions per property (50 for event-scoped, 25 for user-scoped). Once created, dimensions cannot be deleted, only archived.

List Custom Metrics

Retrieve all custom metrics defined for a Google Analytics 4 property. Custom metrics are user-defined metrics that extend GA4's standard metrics with your own numerical data (e.g., cart value, video progress, quiz score). Returns metric details including parameter name, display name, description, measurement unit, scope (EVENT), and restricted metric type. Use this to discover available custom metrics for reporting or to audit your custom metric configuration.

Create Custom Metric

Create a new custom metric for a Google Analytics 4 property. Custom metrics allow you to collect and analyze numerical data specific to your business beyond GA4's standard metrics. You must specify the parameter name (as sent in events), display name, measurement unit (STANDARD/CURRENCY/DISTANCE/TIME), scope (EVENT), and optionally a description. Note: There is a limit of 50 custom metrics per property. Once created, metrics cannot be deleted, only archived.

List Key Events

Retrieve all key events (conversions) configured for a Google Analytics 4 property. Key events are important user interactions you want to track and measure, such as purchases, sign-ups, or form submissions. Returns event details including event name, counting method (ONCE_PER_EVENT/ONCE_PER_SESSION), default value, and whether it's a custom event. Use this to discover which events are marked as conversions or to audit your conversion tracking setup.

Create Key Event

Mark an existing event as a key event (conversion) in Google Analytics 4. This designates the event as an important business outcome you want to track and optimize for. You must specify the event name that's already being collected. Optionally, you can set the counting method (ONCE_PER_EVENT counts every instance, ONCE_PER_SESSION counts once per session) and provide a default conversion value. Use this to track important actions like purchases, sign-ups, downloads, or any custom business goal. The event must already exist in your data before marking it as a key event.

Delete Key Event

Remove the key event designation from an event in Google Analytics 4. This stops counting the event as a conversion but does not delete the event data itself - the event will continue to be collected and available in reports as a regular event. Use this when an event is no longer relevant as a business goal or was incorrectly marked as a key event. This action is reversible - you can mark the event as a key event again later.

List Audience Exports

Retrieve all audience exports created for a Google Analytics 4 property. Audience exports allow you to export lists of users matching specific audience criteria for use in advertising, CRM systems, or analysis. Returns export details including name, audience display name, state (CREATING/ACTIVE/FAILED), creation time, and row count. Use this to monitor export status, discover available audience exports, or audit your audience export setup.

Create Audience Export

Create a new audience export to extract users matching a specific audience from your Google Analytics 4 property. You must specify the audience resource name (e.g., 'properties/123/audiences/456') and optionally dimensions to include in the export (such as 'deviceId' or 'userId'). The export runs asynchronously - use List Audience Exports to monitor its progress. Once complete, use Query Audience Export to retrieve the actual user data. Use this to export user segments for remarketing campaigns, CRM integration, or custom analysis.

Query Audience Export

Retrieve the actual user data from a completed audience export. Returns rows of user data with the dimensions you specified when creating the export. The export must be in ACTIVE state before you can query it (check status using List Audience Exports). Supports pagination for large exports. Use this after creating an audience export to get the exported user list with their device IDs, user IDs, or other selected dimensions. Essential for activating audiences in external systems.

Run Access Report

Generate a customized audit report showing data access records for an account or property. Returns information about who accessed your Google Analytics data, when, and what operations they performed. Supports dimensions like 'userEmail', 'date', 'propertyId', 'reportType' and metrics like 'accessCount'. Use this for security auditing, compliance reporting, monitoring API usage, or investigating suspicious activity. Essential for enterprise governance and understanding how your analytics data is being accessed.

Search Change History

Search through the complete change history of a Google Analytics account and its child resources. Returns detailed records of all configuration changes including what was changed, who made the change, when it occurred, and before/after values. Supports filtering by resource type (ACCOUNT/PROPERTY/DATA_STREAM/etc.), action type (CREATED/UPDATED/DELETED), actor email, and date range. Use this for auditing configuration changes, troubleshooting issues, compliance reporting, or understanding how your analytics setup has evolved over time. Essential for change management and security investigations.

Customize tools

Customize Tools

Edit descriptions, modify arguments, select tools, or add new ones

ReviewEdit descriptions
ConfigureChange arguments
ApproveSelect tools
Create NewAdd tool

Set Up Your Google Analytics MCP Server in Minutes

Add the following configuration to your MCP client. Authentication is handled via OAuth. Compatible with Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, and any MCP-compatible agent.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "willow-google-analytics": {
      "type": "http",
      "url": "https://<org>.mcp-s.com/mcp/mcp/google-analytics"
    }
  }
}

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "willow-google-analytics": {
      "type": "http",
      "url": "https://<org>.mcp-s.com/mcp/mcp/google-analytics"
    }
  }
}

Claude Code

CLI
claude mcp add willow-google-analytics --transport http https://<org>.mcp-s.com/mcp/mcp/google-analytics

n8n

HTTP Request Node
{
  "url": "https://<org>.mcp-s.com/mcp/mcp/google-analytics",
  "method": "POST"
}

Or click "Install with Willow" above to set up automatically with SSO and RBAC preconfigured.

Enterprise Governance for Google Analytics

Willow adds the layer Google Analytics and every other SaaS doesn't ship out of the box: every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to full audit logs, and detects shadow AI usage across your stack. One MCP gateway. Any agent. Every tool.

Google Analytics MCP Server FAQ

What is the Google Analytics MCP server?

The Google Analytics MCP server is a Model Context Protocol implementation that lets AI agents like Claude, Cursor, and ChatGPT read and write Google Analytics data through a standardized interface. Willow hosts and governs this server so enterprises can roll it out without a security review backlog.

How is Willow's Google Analytics MCP server different from the official one?

The official Google Analytics MCP server is scoped to a single user's account and does not include enterprise governance. Willow's version adds SSO, RBAC, audit logging, shadow AI detection, and centralized control over which actions agents can take across the entire org.

Which AI clients work with the Google Analytics MCP server?

Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code with MCP support, n8n, and any custom agent built with OpenAI Agents SDK, LangChain, Vercel AI SDK, or Anthropic SDK.

Is the Google Analytics MCP server secure? How does Willow handle authentication?

Every call runs behind your existing SSO (Okta, Azure AD). Per-user OAuth scopes the agent to exactly what that user can do in Google Analytics, nothing more. No credentials reach the LLM. Every action writes to an audit trail.

Can I limit which Google Analytics actions agents can take?

Yes. Willow lets you scope agents to specific actions, specific projects, or specific environments. Toggle actions on or off in the dashboard, or enforce policy via infrastructure-as-code through GitHub.

How do I detect shadow Google Analytics MCP servers in my org?

Willow's browser extension and discovery service surface unmanaged MCP servers, skills, and AI agents across the org. If a developer installed an unapproved Google Analytics MCP locally, you'll see it.

What does the Google Analytics MCP server cost?

Pricing depends on org size and deployment model (SaaS, dedicated cloud, self-host). See withwillow.ai/pricing or contact sales for a quote.

How do I install the Google Analytics MCP server with Willow?

Install via the Willow Connect Panel in one click, or paste the JSON snippet above into your Claude Desktop, Cursor, or Claude Code config. SSO and RBAC inherit from your existing Willow setup.

Compare Willow MCP Gateway

See how Willow stacks up against other MCP platforms on governance, security, and enterprise readiness.

Your agents are already in the wild.

Give them a Basecamp. Go from AI chaos to AI work, in minutes.