
List all Google Analytics accounts you have access to. Use this to discover account IDs before listing properties. Returns paginated results.
Get details of a specific Google Analytics account by ID. Returns account display name, creation time, and update time.
Update a Google Analytics account's display name. Provide the account ID and new display name.
List audiences for a property. Audiences let you segment users based on shared characteristics or behaviors.
Get details of a specific audience. Returns display name, description, and membership duration.
Create a new audience for a property. Specify display name and optionally description and membership duration.
Update an audience's display name or description. Provide audience ID and fields to update.
List custom dimensions for a property. Custom dimensions let you collect and analyze data on custom user attributes.
Get details of a specific custom dimension. Returns parameter name, scope, and display name.
Create a new custom dimension for a property. Specify parameter name, display name, and scope (EVENT, USER, or ITEM).
Update a custom dimension's display name or description. Provide dimension ID and fields to update.
List custom metrics for a property. Custom metrics let you collect and aggregate numeric data on user interactions.
Get details of a specific custom metric. Returns parameter name, scope, and measurement unit.
Create a new custom metric for a property. Specify parameter name, display name, scope, and measurement unit.
Update a custom metric's display name or description. Provide metric ID and fields to update.
List data streams (websites or mobile apps) for a property. Data streams are the sources of data for your property.
Get details of a specific data stream. Returns stream type, creation time, and platform-specific configuration.
Create a new data stream (website or mobile app) for a property. Specify stream type and platform-specific configuration.
List key events (conversions) for a property. Key events are important actions you want to track and measure.
Get details of a specific key event. Returns event name, creation time, and whether it can be deleted.
Create a new key event (conversion) for a property. Specify the event name to track as a conversion.
Delete a key event (conversion) from a property. Use getkeyevent to check if a key event is deletable before attempting deletion.
List Google Analytics properties under an account. Properties contain data from websites or apps. Use list_accounts first to discover account IDs.
Get details of a specific Google Analytics property. Returns display name, timezone, currency, industry category, and creation time.
Create a new Google Analytics property in an account. Requires account ID, display name, timezone, and currency code.
Update a Google Analytics property's settings (display name, timezone, currency code). Provide property ID and fields to update.
Generate a custom Google Analytics report with dimensions, metrics, and filters. Call get_metadata first to discover available dimensions/metrics. Returns rows of data with pagination support.
Run multiple reports in a single API call. More efficient than calling run_report multiple times. Each request is independent.
Get real-time event data (30-60 minute window) for a property. Limited dimensions and metrics available compared to standard reports. Useful for monitoring live site activity.
Get all available dimensions and metrics for a property. Returns complete list with descriptions, data types, and deprecation status. Call this before run_report to see what's available.
Validate that dimensions and metrics are compatible for reporting. Useful before constructing a complex report to ensure the combination is valid and will return data.
Validate Google Analytics OAuth2 credentials by listing accounts. Returns success if token is valid and has required scopes.

In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}It's an MCP server that lets your agents access data and functionality from Google Analytics via tools. Your agents can invoke these tools to run custom reports, pull real-time traffic data, list audiences, check conversion events, and more.
Google Analytics offers an official MCP server, but you can also use one from a third-party platform, like Merge Agent Handler.
The use cases naturally depend on the agent you've built, but here are a few common ones:
Here are some of the most commonly used tools:
run_report: runs a custom Google Analytics report across dimensions and metrics you specify, like sessions by channel or revenue by landing page. Useful for agents that need to answer a specific analytics question on demandrun_realtime_report: pulls active user and event data from the last 30 to 60 minutes. Call this when an agent needs to detect a traffic spike or confirm a launch is tracking correctlylist_audiences: returns the audiences configured on a property, along with their membership rules. Good for workflows that need to check segmentation before targeting or reporting on a specific groupcreate_key_event: marks an existing event as a key event (conversion) so it shows up in conversion reporting. Helpful when an agent needs to register a new conversion goal without going into the GA4 admin panelcreate_custom_dimension: defines a new custom dimension on a property so it can be used in future reports. Use this when an agent needs to track a new attribute, like subscription tier or content author, that GA4 doesn't capture by defaultlist_properties: lists the Google Analytics properties available to the authenticated account. Useful for agents that manage reporting across multiple sites or apps and need to confirm which property to query firstThere are several reasons to use Merge Agent Handler's Google Analytics MCP server over building or using an alternative:
You can take the following steps:
1. Create or log into your Merge Agent Handler account.
2. Install the Merge CLI by running pipx install merge-api, then run merge configure to link the CLI to your Merge account and merge login to authenticate your session.
3. Register the Agent Handler MCP server with Claude Code by running claude mcp add --transport http agent-handler https://ah-api.merge.dev/mcp, then open Claude Code and run /mcp to confirm agent-handler appears with a connected status.
4. Select agent-handler from the MCP list. This opens a browser window where you select which integrations to authenticate. Choose Google Analytics and complete the auth flow. Merge stores and manages the credentials going forward.
5. Open a Claude Code session and start querying Google Analytics data directly. The first time you use a Google Analytics tool, a Magic Link may appear to complete connector authentication.
If you want to connect Merge Agent Handler's Google Analytics MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Yes, Merge for Workforce lets your employees connect Claude, ChatGPT, Microsoft Copilot, Cursor, and other MCP-compatible AI tools to Google Analytics without bypassing IT governance.
IT provisions access by role or group via SCIM. A marketing analyst, for example, gets Google Analytics access to pull weekly traffic reports, HubSpot to review campaign performance, and Slack to share findings with the team; while a growth engineer gets Google Analytics access to monitor conversion events, Google Ads to adjust bidding strategy, and Jira to track experiment tickets.
Every tool call an employee's AI makes to Google Analytics is also inspected against your DLP rules and logged to a searchable audit trail, giving security teams full visibility into what data was accessed and by whom.
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now