Google Analytics MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Google Analytics MCP or direct API to generate reports, analyze user trends, monitor conversion funnels, and surface insights through natural language.
Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Google Analytics Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Google Analytics now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools

Tools
Archive Custom DimensionTool to archive a CustomDimension on a property.
Batch Run Pivot ReportsTool to return multiple pivot reports in a batch for a GA4 property.
Batch Run ReportsTool to return multiple analytics data reports in a batch.
Check CompatibilityTool to list dimensions and metrics compatible with a GA4 report request.
Create Audience ExportTool to create an audience export for Google Analytics.
Create Audience ListTool to create an audience list for later retrieval by initiating a long-running asynchronous request.
Create Custom DimensionTool to create a CustomDimension for a Google Analytics property.
Create Custom MetricTool to create a custom metric in Google Analytics.
Create Expanded Data SetTool to create an expanded data set for a property.
Create Recurring Audience ListTool to create a recurring audience list that automatically generates new audience lists daily based on the latest data.
Create Report TaskTool to create a report task as a long-running asynchronous request for customized Google Analytics event data reports.
Create Rollup PropertyTool to create a roll-up property.
Get AccountTool to retrieve a single Account by its resource name.
Get Attribution SettingsTool to retrieve attribution configuration for a Google Analytics property.
Get AudienceTool to retrieve a single Audience configuration from a Google Analytics property.
Get Audience ExportTool to get configuration metadata about a specific audience export.
Get Audience ListTool to get configuration metadata about a specific audience list.
Get Custom DimensionTool to retrieve a single CustomDimension by its resource name.
Get Data Retention SettingsTool to retrieve data retention configuration for a Google Analytics property.
Get Data Sharing SettingsTool to retrieve data sharing configuration for a Google Analytics account.
Get Google Signals SettingsTool to retrieve Google Signals configuration settings for a GA4 property.
Get Key EventTool to retrieve a Key Event.
Get MetadataTool to get metadata for dimensions, metrics, and comparisons for a GA4 property.
Get PropertyTool to retrieve a single GA4 Property by its resource name.
Get Property Quotas SnapshotTool to retrieve all property quotas organized by category (corePropertyQuota, funnelPropertyQuota, realtimePropertyQuota) for a given GA4 property.
Get Recurring Audience ListTool to get configuration metadata about a specific recurring audience list.
Get Report TaskTool to get report metadata about a specific report task.
List Account SummariesTool to retrieve summaries of all Google Analytics accounts accessible by the caller.
List Accounts (v1beta)Tool to list all Google Analytics accounts accessible by the caller using v1beta API.
List AdSense LinksTool to list all AdSenseLinks on a property.
List Audience ExportsTool to list all audience exports for a property.
List Audience ListsTool to list all audience lists for a specified property to help find and reuse existing lists.
List AudiencesTool to list Audiences on a property.
List BigQuery LinksTool to list BigQuery Links on a property.
List Calculated MetricsList Calculated Metrics
List Channel GroupsTool to list ChannelGroups on a property.
List Conversion EventsTool to list conversion events on a property.
List Custom DimensionsList Custom Dimensions
List Custom MetricsTool to list CustomMetrics on a property.
List DataStreamsTool to list DataStreams on a property.
List Display & Video 360 Advertiser LinksTool to list Display & Video 360 advertiser links on a property.
List DisplayVideo360 Advertiser Link ProposalsTool to list DisplayVideo360AdvertiserLinkProposals on a property.
List Event Create RulesTool to list EventCreateRules configured on a web data stream.
List Expanded Data SetsTool to list ExpandedDataSets on a property.
List Firebase LinksTool to list FirebaseLinks on a property.
List Google Ads LinksTool to list GoogleAdsLinks on a property.
List Key EventsTool to list Key Events.
List Measurement Protocol SecretsTool to list MeasurementProtocolSecrets under a data stream.
List PropertyTool to list GA4 properties based on filter criteria.
List Recurring Audience ListsTool to list all recurring audience lists for a GA4 property.
List Reporting Data AnnotationsTool to list all Reporting Data Annotations for a specific property.
List Report TasksTool to list all report tasks for a Google Analytics property.
List Search Ads 360 LinksTool to list all SearchAds360Links on a property.
List SKAdNetwork Conversion Value SchemasTool to list SKAdNetworkConversionValueSchema configurations for an iOS data stream.
List Subproperty Event FiltersTool to list all subproperty event filters on a property.
List Subproperty Sync ConfigsTool to list SubpropertySyncConfig resources for managing subproperty synchronization configurations.
Provision Account TicketTool to request a ticket for creating a Google Analytics account.
Query Audience ExportTool to query a completed audience export.
Query Audience ListTool to query an audience list.
Query Report TaskTool to retrieve a report task's content.
Run Funnel ReportTool to run a GA4 funnel report.
Run Pivot ReportTool to run a customized pivot report of Google Analytics event data.
Run Realtime ReportTool to run a customized realtime report of Google Analytics event data.
Run ReportTool to run a customized GA4 data report.
Send EventsTool to send event data to Google Analytics 4 using the Measurement Protocol.
Update PropertyTool to update an existing GA4 Property.
Validate EventsTool to validate Measurement Protocol events before sending them to production.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Google analytics tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('List all accounts I can access in Google Analytics')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Why Use Composio?

AI Native Google Analytics Integration

  • Supports both Google Analytics MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Google Analytics data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Google Analytics access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Google Analytics
  • Scoped, least privilege access to Google Analytics resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Google analytics with Composio?

No, you can get started immediately using Composio's built-in Google analytics app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.