By Ira Bodnar, Ryze AI · Updated · Connector tested November 13, 2026
Quick answer
The main way to connect Claude Code to Google Analytics is the Ryze AI connector. Approve Google inside a Ryze AI workspace and save a GA4 Property, register the connector from your shell with claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp, then open /mcp in a Claude Code session, choose ryze and finish the browser sign-in. A fresh session can then pull GA4 reports.
- In Ryze AI open Integrations, find Google Analytics 4 under Analytics, click Connect and pick a Property
- In your terminal run the claude mcp add command with the connector URL
- In Claude Code run /mcp, select ryze and authenticate in the browser
- Pick the workspace, click Allow connection and ask your first question
Claude Code to Google Analytics 4 at a glance
| Fact | Detail |
|---|---|
| Main way to connect | The Ryze AI connector, a hosted MCP server that Claude Code registers with a single claude mcp add command |
| Server address | https://connector.get-ryze.ai/mcp, one address for every user |
| Sign-in | OAuth 2.0 in your browser, started from /mcp or with claude mcp login ryze. For scripts, a Ryze AI API key passed with --header |
| GA4 tools | 9, every one a read: account listing, standard, pivot and realtime reports, Admin API reads and 4 reports on visits from AI assistants |
| Can it change GA4 | No. No tool writes, and runAdminRead sends GET requests only |
| Google access | analytics.readonly plus openid, email and profile. Viewer on the property is all the login needs |
| Other data in the same session | Tools for other platforms connected in the same Ryze AI workspace, such as Google Ads and Search Console, arrive through the same server |
| Claude Code plan | Pro, Max, Ultra, Team, Enterprise or Console, or a provider such as Amazon Bedrock. Anthropic names no extra plan for MCP servers |
| Ryze AI price | Paid Ads is $89 per month with a 7-day free trial. Adding the connector costs nothing |
| Google's own option for Claude Code | analytics-mcp, a Python server that Claude Code launches on your machine. Google's docs page and its README both carry Claude Code setup |
| Last tested | Connector checked November 13, 2026. GA4 calls sent through it from Claude Code on November 14, 2026 |
Before you start
- A Claude Code account. Anthropic says Claude Code requires a Pro, Max, Ultra, Team, Enterprise or Console account; the free claude.ai plan does not include it. It can also run through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. Anthropic's MCP page names no extra plan for remote MCP servers.
- A Google login with at least Viewer access on a GA4 property. Ryze AI connects with the read-only Google Analytics scope, so Viewer is enough. Universal Analytics is not supported, only GA4 properties.
- A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial; SEO Starter is $129 per month with a 3-day free trial and Agency is $279 per month. Connecting the connector is free, but the GA4 tools need an active plan or trial.
How to connect Claude Code to Google Analytics 4
Two steps happen in Ryze AI, four in Claude Code. The connector URL is the same for every user.
Connect Google Analytics 4 in Ryze AI
Create a Ryze AI account or sign in, open Integrations in the left sidebar and find Google Analytics 4 under Analytics. Click Connect, sign in to Google and approve access with every requested permission checked.
Pick the Property
Back in Ryze AI, choose the Property for this workspace (listed as account and property) and click Save. Until a Property is saved the card shows Require setup.
Register the connector in Claude Code
In your terminal, not inside a claude session, run: claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp. Claude Code answers with an Added HTTP MCP server line and stores the server with local scope by default. Add --scope user to make it available in all your projects. Until you sign in, claude mcp list marks it Needs authentication.
Sign in from Claude Code
Inside Claude Code run /mcp, select ryze, press Enter and choose Authenticate, or run claude mcp login ryze in the shell. Add --no-browser to print the sign-in URL instead of opening a browser, for example over SSH; the paste step needs an interactive terminal, so connect with ssh -t.
Allow the workspace
On the Ryze AI page, sign in if asked, choose the workspaces Claude Code can use and click Allow connection. Check the result with claude mcp get ryze.
Start a new session and ask your first question
Tool search is on by default in Claude Code, so MCP tools load on demand. Ask: List the GA4 accounts and properties I can access, then show sessions and key events by default channel group for the last 28 days.
The Ryze AI help article for Google Analytics covers the Google side of the connection, and the Claude Code MCP docs cover the client commands.
Sources: Claude Code MCP, MCP quickstart. Checked November 14, 2026.
OAuth, API key and claude.ai connectors
Claude Code accepts the Ryze AI connector three ways. Pick the one that matches where the session runs.
CLI with OAuth (recommended for a personal machine)
claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp --scope userThis is the flow in the steps above. The scope flag decides who gets the server: local (the default) is the current project only, user covers every project on your machine, and project writes a .mcp.json file that teammates share and approve themselves when they next open an interactive session. A scope is fixed once the server is added, so moving it means removing the entry and adding it again.
CLI with a Ryze AI API key
claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp --header "Authorization: Bearer rk_live_..."Create the key under Workspace Settings, Profile, API keys, Create key, and copy it before leaving the page because it is shown once. Per the Ryze AI help center the key works on /mcp and not on /sse. claude mcp add stores the entry without testing the key, and a rejected Authorization header marks the connection as failed in Claude Code with no OAuth fallback, so swap in a fresh key rather than waiting for a browser window.
claude.ai connectors inside Claude Code
If you already added Ryze AI at claude.ai/customize/connectors, Claude Code can reuse it. Log in to Claude Code with that same claude.ai subscription account and run /mcp, where the connector is marked as coming from claude.ai. Team and Enterprise plans let only admins add servers in claude.ai. This path is skipped when the session uses ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, apiKeyHelper, a third-party provider, an Anthropic profile or a setup-token credential; /status shows which one is active. If the same URL was also added with claude mcp add, that entry wins and /mcp lists the claude.ai copy as hidden.
Scripts and limits
Non-interactive runs (claude -p and the Agent SDK) cannot start the OAuth flow, so sign in beforehand with /mcp or claude mcp login ryze, or use an API key. Claude Code warns when a tool result exceeds 10,000 tokens and keeps MCP output to 25,000 tokens by default; anything longer is written to a file and the conversation receives its path. Set MAX_MCP_OUTPUT_TOKENS to raise the limit. GA4 reports with many dimensions can run long, so ask for fewer dimensions or a shorter date range. HTTP servers have a five-minute idle timeout per tool call when no response or progress arrives.
Claude Code and MCP: the facts in one table
| Topic | What Anthropic's docs say |
|---|---|
| Adding a server | claude mcp add --transport http <name> <url> for a hosted server, or claude mcp add <name> -- <command> for one that runs locally. Both are typed in the shell |
| Files it writes | ~/.claude.json for local and user scope, .mcp.json at the project root for project scope. Paths like ~/.claude/mcp.json are ignored |
| Transports | Streamable HTTP for remote servers and stdio for local ones. SSE still works but is deprecated, and WebSocket can only be set in the JSON config |
| OAuth | OAuth 2.0. Claude Code reads the server's protected resource metadata first, then its authorization server metadata. A 401 or 403 answer flags the server as needing authentication, and the browser returns to a loopback port |
| Static credentials | --header or -H at add time, or a headers object. A rejected Authorization header leaves the server failed instead of starting OAuth |
| Tool approval | From v2.1.283, interactive terminal and VS Code sessions with no mode set start in auto mode when the session supports it. A second model, the classifier, then reviews actions instead of you, except those an allow, ask or deny rule settles. Rules use the form mcp__<server>__<tool> |
| Checking status | claude mcp list and claude mcp get in the shell. Inside a session, /mcp shows the tool count next to each connected server, and /mcp reconnect all retries failed ones |
| Loading tools | Tool search is on by default: names load at start, full definitions when Claude needs them |
| Plan | The MCP page sets no plan of its own. By default anyone running Claude Code can add a server with claude mcp add; on Team and Enterprise only admins add claude.ai connectors |
| Admin controls | managed-mcp.json for a fixed server set, allow and deny lists, and a switch that turns off claude.ai connectors |
| Cloud sessions | Local and user entries stay in ~/.claude.json on your machine, so a cloud session does not see them. A cloud session on one repository reads that repository's .mcp.json |
Sources: Claude Code MCP, MCP quickstart, Permission modes, Permissions, Managed MCP, Cloud environments, Claude Code setup. Checked November 14, 2026.
Claude web, ChatGPT and Cursor
The same URL works in other MCP clients. Google Analytics 4 is connected once in Ryze AI, so nothing changes on the Google side.
Claude on the web and Desktop
In Customize, Connectors, click + Add and choose Add custom connector. Name it Ryze AI and paste https://connector.get-ryze.ai/mcp. The free plan allows one custom connector, and Team and Enterprise plans need an Owner to add it first.
ChatGPT
Per OpenAI, ChatGPT Business and Enterprise/Edu on the web get full custom MCP support, while Pro can connect custom MCP servers with read and fetch permissions only. Choose Add custom MCP server under Plugins, enter the URL and select OAuth.
Cursor
Put the entry in ~/.cursor/mcp.json for every project or .cursor/mcp.json for one. Cursor signs in with OAuth and PKCE and by default asks before it uses an MCP tool.
{ "mcpServers": { "ryze": { "url": "https://connector.get-ryze.ai/mcp" } } }Google Analytics permissions and scopes
Three things decide what Claude Code can see in Google Analytics 4.
- Which Google login
- Ryze AI connects with Google sign-in (OAuth) and the read-only Google Analytics scope, analytics.readonly, plus basic profile scopes. Keep every requested permission checked on the Google screen. The login needs at least Viewer access on a GA4 property.
- Which properties
- The agent can list every GA4 account and property the connected login can access with listAccountSummaries. After connecting, you pick one Property for the workspace. Other properties stay reachable by naming them in chat, and several Google logins can be added to one workspace with Add one more account.
- Read only
- All 9 GA4 tools are read tools. The connector cannot create, edit or delete properties, key events, audiences or other GA4 settings, and runAdminRead is GET only.
Sources: Ryze AI Google Analytics guide and Google's Google Analytics MCP overview.
The 4 Google scopes of the default connection
Clicking Connect on the Google Analytics 4 card makes Ryze AI ask Google for four OAuth scopes. One opens GA4 data and the other three are the basic profile scopes of a Google sign-in. There is no service account, no key file and no Google Cloud project for you to create.
| Scope | Google's description | Role on this connection |
|---|---|---|
| analytics.readonly | See and download your Google Analytics data | Every report and Admin API read. Google's runReport and accountSummaries.list both accept it |
| openid | Associate you with your personal info on Google | Basic profile scope of the Google sign-in |
| See your primary Google Account email address | Basic profile scope of the Google sign-in | |
| profile | See your personal info, including any personal info you've made publicly available | Basic profile scope of the Google sign-in |
GA4 roles and data restrictions
Inside GA4, the role of the connected login sets the ceiling. Google enforces data restrictions in its API as well as in the Analytics interface, so a restricted login gets the same gaps in Claude Code.
| GA4 role or restriction | What Google says it allows | What it means for Claude Code |
|---|---|---|
| Viewer | Seeing settings and data, changing which data appears in reports, and seeing shared assets in the interface or the APIs | The minimum role the connected login needs |
| No Cost Metrics | The user cannot see metrics related to cost | Cost metrics do not come back for that login |
| No Revenue Metrics | The user cannot see metrics related to revenue | Revenue metrics do not come back for that login |
| Marketer | Creating, editing and deleting audiences, events and key events | Not needed. The connection cannot write, whatever the role |
| Editor | Full control of settings at the property level | Not needed, for the same reason |
Not requested: analytics.edit, which Google describes as editing Google Analytics management entities, so nothing in a property can be created or changed from Claude Code; and analytics.chatbot.read, the scope for the Ask Advisor chat method. Universal Analytics properties are not reachable either, only GA4.
Sources: Google OAuth 2.0 scopes, GA4 roles and data restrictions, Data API runReport, Admin API accountSummaries.list. Checked November 14, 2026.
Removing access
To remove access, disconnect Google Analytics 4 on its card in Ryze AI. In Claude Code, run claude mcp logout ryze and then claude mcp remove ryze: Anthropic's docs say remove deletes the tokens Claude Code stored but does not revoke them at the server that issued them.
What Claude Code can do in Google Analytics 4
The Ryze AI connector exposes 9 Google Analytics 4 tools, all read tools. They return report data and settings and do not change anything in GA4.
| Tool | Type | What it does |
|---|---|---|
| google_analytics__listAccountSummaries | Read | Lists the GA4 accounts and properties the connected Google login can access, so the agent can find property IDs. |
| google_analytics__runRawReport | Read | Runs a GA4 Data API runReport with chosen dimensions, metrics, named date ranges, filters and ordering, and pages through the results. |
| google_analytics__runPivotReport | Read | Runs a GA4 Data API pivot-table report. |
| google_analytics__runRealtimeReport | Read | Runs a GA4 Data API realtime report covering the last 30 minutes. |
| google_analytics__runAdminRead | Read | Reads a GA4 Admin API resource such as key events, custom dimensions or audiences. It is GET only and cannot write. |
| google_analytics__getAiTrafficByEngine | Read | Returns traffic from AI referrers grouped by source engine and compared with a prior period, for one GA4 property. |
| google_analytics__getAiTrafficDaily | Read | Returns daily traffic from AI referrers such as ChatGPT and Perplexity for one GA4 property. |
| google_analytics__getAiLandingPages | Read | Lists the top landing pages that receive AI-referred traffic, up to 200 rows. |
| google_analytics__getAIReferrals | Read | Lists AI referral sources with their sessions and conversions. |
Every GA4 tool only reads, so nothing in GA4 changes whatever approval setting you pick. If you still want to see each call before it runs, Claude Code's permission rules handle it: a rule names one tool as mcp__<server>__<tool>, or all of a server's tools as mcp__<server>__*, where <server> is the name you gave in claude mcp add, and it can allow, ask or deny. Interactive sessions on v2.1.283 or later begin in auto mode where it is available, and a classifier then reviews actions in your place, so add an ask rule if you want a prompt. In the claude.ai connector settings (Customize, Connectors, Ryze AI, Tool permissions) read tools can run automatically, and the Ryze AI chat has its own Tool approvals picker that starts on Skip all approvals.
Limits in numbers
Google applies these limits to every caller of the Data API and Admin API, so they bind the Ryze AI connector and Google's own server alike. Figures are for a standard property unless 360 is named, as Google's pages read on November 14, 2026. The last two rows cover the Ryze AI tools and Claude Code.
| Limit | Value |
|---|---|
| Core tokens per day | 200,000 for each standard property and 2,000,000 on Analytics 360. Daily buckets refill at midnight Pacific time |
| Core tokens per hour | 40,000 per property, 400,000 on 360. One Google Cloud project may spend 14,000 of them per property each hour (140,000 on 360) |
| Parallel requests | 10 at a time per property, 50 on 360 |
| Tokens per request | Google says most requests cost 10 tokens or fewer. Long date ranges, many rows or fields, complex filters and high-cardinality dimensions such as pagePath cost more |
| Empty quota bucket | Once any bucket reaches 0, Google answers that property with 429 RESOURCE_EXHAUSTED. Hourly buckets refill within the hour |
| Server errors | 10 per project and property per hour (50 on 360). When they are used up, every request from that project to the property is blocked |
| Failed requests | No more than 10,000 per project and property in a 15-minute window, counting any answer other than 200 or 500 |
| Thresholded demographic requests | 120 per property per hour, for reports that use userAgeBracket, userGender, brandingInterest, audienceId or audienceName |
| Rows in one report | 10,000 when no limit is given and 250,000 at most per request. Fetch the rest with offset |
| Dimensions, metrics and date ranges | Google's report guide allows up to 9 dimensions per request. In the November 14, 2026 test the API also turned down an 11th metric and a 5th date range |
| Realtime window | The last 30 minutes, or 60 on 360, with at most two minute ranges in one query |
| Data freshness | On standard properties intraday data typically lands in 2 to 6 hours and daily data in 12. Google adds that processing can take 24 to 48 hours, during which numbers can still move |
| Admin API | 1,200 requests a minute and 600 per user per minute. The write quotas never apply to a connection that only reads |
| Ryze AI tool inputs | getAiLandingPages returns 200 rows at most. runRawReport returns 10,000 rows by default and pages with offset. AI-traffic tools take dates as YYYY-MM-DD |
| Claude Code output | A warning past 10,000 tokens. Past 25,000 tokens, or 50,000 characters of text, the result is saved to a file and the session gets its path |
Sources: Data API quotas, Data API changelog, runReport reference, Create a report, Realtime basics, Admin API quotas, Data freshness, Claude Code MCP. Checked November 14, 2026.
Calls tested through the default connection
Every row is one call that Claude Code sent through the Ryze AI connector on November 14, 2026, over the default read-only connection to a standard GA4 property. Two asked for data and six were broken on purpose to capture Google's replies. The property belongs to a real account, so the table names fields and outcomes and leaves out IDs and values.
| Tool | What Claude Code sent | What came back |
|---|---|---|
| listAccountSummaries | Only the workspace | Worked: accountSummaries, each carrying propertySummaries with the fields property, displayName, propertyType, parent and canEdit |
| runRawReport | Sessions for the day before the test, with returnPropertyQuota switched on | Worked: one row with metricHeaders, rowCount and metadata for currency and time zone, plus a propertyQuota block whose totals equal Google's standard-property limits |
| runRawReport | trafficSauce, a dimension GA4 does not have | Refused with 400 INVALID_ARGUMENT, and Google proposed manualSource |
| runRawReport | sessionz, a misspelled metric | Refused with 400 INVALID_ARGUMENT, and Google proposed sessions |
| runRawReport | A property ID that does not exist | Refused with the status not_allowed inside an ordinary tool result |
| runRawReport | 10 dimensions in one report | Refused with 400 INVALID_ARGUMENT |
| runRawReport | 5 date ranges in one report | Refused with 400 INVALID_ARGUMENT |
| runRawReport | 11 metrics in one report | Refused with 400 INVALID_ARGUMENT |
First 3 prompts to run and 10 jobs
Each answer comes from your own property, so this page describes what comes back instead of showing sample numbers.
1. Find your property, then report by channel
List the GA4 properties I can access. For the main one, run a report of sessions, key events and revenue by default channel group for the last 28 days compared with the 28 days before.
Tools used: google_analytics__listAccountSummaries, google_analytics__runRawReport
What comes back: The accounts and properties your login reaches, then a table with one row per channel group and the three metrics for each of the two date ranges. Revenue shows as zero unless ecommerce tracking and purchase events are set up in GA4.
2. Traffic from AI assistants
Show sessions from AI assistants by engine for the last 30 days against the prior period, then list the top landing pages that receive AI-referred traffic.
Tools used: google_analytics__getAiTrafficByEngine, google_analytics__getAiLandingPages
What comes back: Traffic grouped by source engine with a prior-period comparison, and a list of landing pages of up to 200 rows. This reports visits that arrive from AI assistants, not whether those assistants mention your brand.
3. Audit your key events and custom dimensions
Read the key events, custom dimensions and audiences configured on this property and list any that look unused or duplicated.
Tools used: google_analytics__runAdminRead
What comes back: The settings read through the GA4 Admin API as a list. Claude Code can point out candidates, but the connector cannot edit anything, so changes are made in GA4 itself.
A realtime report covers only the last 30 minutes. GA4 numbers also will not match another tool such as Shopify exactly, because each attributes sessions and conversions differently.
10 jobs to hand to Claude Code
Nine jobs Claude Code can do through the connector and one it cannot, each with the GA4 tool behind it. In the test on November 14, 2026, only listAccountSummaries and runRawReport were called. The other tools had their definitions loaded and were left uncalled, since they would have returned a real account's data.
| Job | Ask Claude Code | Tool | Works on the default connection |
|---|---|---|---|
| Find property IDs | Which GA4 accounts and properties can my connected Google login read? Give me the ID of each property. | google_analytics__listAccountSummaries | Yes. Called in the test |
| Month over month by channel | Put sessions, key events and revenue by default channel group for last month beside the month before, naming each date range. | google_analytics__runRawReport | Yes. Up to 4 date ranges, 9 dimensions and 10 metrics per report, as the API's own messages put it in the test |
| Landing page table | List the top landing pages by sessions for the last 28 days, with engagement rate and key event rate. | google_analytics__runRawReport | Yes |
| Revenue by source and medium | Show purchase revenue and purchases by session source and medium for this quarter. | google_analytics__runRawReport | Yes, if purchase events are tracked and the login has no No Revenue Metrics restriction |
| Channel by device pivot | Build a pivot of sessions with default channel group down the side and device category across the top. | google_analytics__runPivotReport | Yes |
| Visitors right now | How many people are on the site in the last 30 minutes, split by country and device? | google_analytics__runRealtimeReport | Yes, for the last 30 minutes only |
| Property settings review | Read the key events, custom dimensions and audiences set up on this property. | google_analytics__runAdminRead | Yes. Audiences are read with version v1alpha |
| AI engines against last period | Which AI assistants sent visits in the last 30 days, and how does each one compare with the 30 days before? | google_analytics__getAiTrafficByEngine | Yes |
| AI visits by day, page and source | Show daily visits from AI assistants this month, the pages those visits land on, and each AI referral source with its sessions and conversions. | google_analytics__getAiTrafficDaily, google_analytics__getAiLandingPages, google_analytics__getAIReferrals | Yes. Landing pages stop at 200 rows |
| Create a key event | Mark the sign_up event as a key event. | None | No. The connection only reads, so make the change in GA4 Admin |
7 ways to connect Claude Code to Google Analytics
Claude Code accepts hosted servers through claude mcp add --transport http, local servers through claude mcp add <name> -- <command>, and plugins, so seven ways can bring GA4 data into it. This guide treats the Ryze AI connector as the main way: Google is approved once inside Ryze AI, and Claude Code needs one command and a browser sign-in, with no Python, no Google Cloud project and no Google credentials file on your machine. The other six were read on their own pages on November 14, 2026. Each row gives the setup as it applies to Claude Code, and none of the six was run for this guide.
| Way | Runs where | Setup in Claude Code | What it reaches in GA4 | Price |
|---|---|---|---|---|
| Ryze AI connector (the main way) | Hosted by Ryze AI. The same address works in Claude, Claude Desktop, ChatGPT, Cursor and other MCP clients | claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp, then /mcp to sign in. A Ryze AI API key sent with --header, or a connector added on claude.ai, also works. Google sign-in happens inside Ryze AI | 9 read tools: account listing, standard, pivot and realtime reports, Admin API reads and 4 AI-traffic reports. Nothing in GA4 can change | Paid Ads is $89 per month with a 7-day free trial. The connector itself is free |
| Google's analytics-mcp, open source | On your machine, launched by Claude Code as a local command. Google's pages also give setup for Claude Desktop, Cursor, Antigravity and Gemini CLI | claude mcp add analytics-mcp --scope user -e GOOGLE_APPLICATION_CREDENTIALS="PATH_TO_CREDENTIALS_JSON" -e GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID" -- pipx run analytics-mcp, as Google prints it. First install Python 3.10 or higher with pipx or uv, turn on the Analytics Admin API and Data API in a Google Cloud project, and create Application Default Credentials through gcloud auth application-default login with the analytics.readonly and cloud-platform scopes | Reads by default. Google's docs page lists 9 tools, among them get_account_summaries, get_property_details, list_google_ads_links, run_report, run_realtime_report, run_funnel_report and run_conversions_report; the README lists 13. Its three create tools (property annotation, custom dimension, key event) need --allow-write and the analytics.edit scope | No price stated. Apache-2.0 license; version 1.1.0 was the newest on November 14, 2026 |
| Composio | Hosted by Composio | Composio's hosted address is https://connect.composio.dev/mcp, and Claude Code takes such an address with claude mcp add --transport http. You then sign in to Composio and approve GA4 through its managed Google app. Its GA4 toolkit links a Claude Code page; the step-by-step pages read here were the Cursor and ChatGPT ones | 82 tools that read and write, such as Create Audience and Archive Custom Dimension | Free plan with 10,000 tool calls a month for up to 3 members. Standard is $18 per seat per month |
| Zapier MCP | Hosted by Zapier | Generate a Zapier MCP address, choose the GA4 actions, add the address to Claude Code and sign in. Zapier lists Claude Code among its popular clients and asks for a client that speaks MCP over Streamable HTTP | 6 actions, among them Run Report for a Property, Create Conversion Event for a Property and Send Measurement Events for an Application | Each successful call uses 2 tasks and a failed one uses none. The Free plan includes 100 tasks a month |
| Windsor.ai | Hosted by Windsor.ai | Add GA4 as a data source in Windsor.ai, then run claude plugin install windsor-ai. Windsor.ai is also listed in the Anthropic Directory, and Claude Code can add any remote server listed there | GA4 read only. Windsor.ai covers 350+ data sources in all, and Claude's directory shows 19 tools for the whole connector | A 30-day trial, then a Forever Free plan with 1 data source, 1 account and the past 30 days. Basic is $23 per month, or $19 on annual billing |
| Coupler.io | Hosted by Coupler.io, on a synced copy of your GA4 data | Build a GA4 data flow, pick Custom MCP and create an access token, then add the endpoint with claude mcp add --transport http and --header "Authorization: Bearer <token>". Coupler.io's list of AI integrations does not name Claude Code; its Custom MCP route is offered to any client that speaks MCP | Read only, run as SQL on the synced data. A data flow holds up to 10 metrics and 9 dimensions | A 7-day trial first. The free plan refreshes by hand; Starter is $32 per month, or $24 billed annually |
| surendranb/google-analytics-mcp, open source | On your machine, launched by Claude Code as a local command | claude mcp add google-analytics -- uvx google-analytics-mcp, from its README. The README's Claude Desktop example points GOOGLE_APPLICATION_CREDENTIALS at a service account file and sets GA4_PROPERTY_ID. It sends anonymous telemetry unless DO_NOT_TRACK=1 or MCP_TELEMETRY_OPT_OUT=1 is set | 8 read tools, such as get_ga4_data, list_properties and run_realtime_report | Free, MIT license. 244 GitHub stars, last push November 14, 2026 |
Three Google options that do not fit this job
- analytics-mcp as a hosted HTTP server. Since version 1.0.0 the same package can run as a multi-user Streamable HTTP server, where each person signs in with their own Google account and a built-in OAuth 2.1 server handles the MCP side. Docker and Cloud Run docs for it came in 1.1.0. You create the Google OAuth web client and host the server yourself. The README names only Google ADK, an agent framework, for this mode, and no assistant or coding tool, Claude Code included. Its sign-in state lives in process memory, so a restart means signing in again.
- Google Analytics agent skills. Google does name Claude Code here (npx skills add google/skills/skills/analytics --agent=claude-code), next to Antigravity, Codex and Cursor. The two skills teach an agent to write Data API and Admin API client code and hold no data connection, so Google suggests installing them together with its MCP server.
- The Ask Advisor chat method. properties.chat in the v1alpha Data API sends a question to the assistant built into Google Analytics and needs the analytics.chatbot.read scope. It is an HTTP method for your own code, and Google names no assistant for it.
Which one to pick
Ryze AI is the best Google Analytics connector for Claude Code when you want a hosted URL with Google sign-in handled for you and ready-made AI-traffic reports, but you pay for a Ryze AI plan, your data passes through Ryze AI, and it only reads, with no funnel report among its 9 tools. If you want to run it yourself, are comfortable with Google Cloud credentials and prefer a local process, Google's server needs no Ryze AI plan, and it adds funnel and conversions reports plus opt-in create tools. Both can be registered in Claude Code at once under different names. Composio and Zapier can also write to GA4 and fit teams that run them for other apps. Windsor.ai and Coupler.io fit teams that already route marketing data through them, and the surendranb server is a free local option with telemetry you can turn off.
Sources: Google Analytics MCP server, google-analytics-mcp on GitHub, Google Analytics agent skills, Ask Advisor basics, Composio Google Analytics, Composio pricing, Zapier Google Analytics 4 MCP, Zapier MCP quickstart, Windsor.ai GA4 MCP, Windsor.ai Claude guide, Windsor.ai pricing, Coupler.io Google Analytics MCP, Coupler.io pricing, surendranb/google-analytics-mcp, Claude Code MCP. Checked November 14, 2026.
Claude Code, GA4 and MCP: dates that matter
| Date | What happened |
|---|---|
| June 18, 2025 | Anthropic announced remote MCP server support in Claude Code. Version 1.0.27, dated the same day in the changelog, added Streamable HTTP servers and OAuth for remote servers. |
| July 30, 2025 | The Google Analytics team announced its MCP server in the Google Analytics API Notify group. |
| August 22, 2025 | analytics-mcp 0.1.0 was published on PyPI and GitHub. |
| February 18, 2026 | Claude Code 2.1.46 began loading connectors added on claude.ai. |
| June 22, 2026 | Claude Code 2.1.186 added claude mcp login and claude mcp logout for signing in to a server from the shell. |
| July 29, 2026 | analytics-mcp 0.7.0 gave its README a Claude Code section. |
| August 2026 | Ryze AI was listed in the Anthropic Directory, with the Community label. The listing gives a month, not a day. |
| September 28, 2026 | Claude Code 2.1.284 made interactive terminal and VS Code sessions start in auto mode on every plan and provider when no permission mode is set. Version 2.1.283, on September 25, had made that change for third-party providers and sessions with telemetry off. |
| October 22, 2026 | analytics-mcp 0.8.0 brought its first write tool, create_property_annotation, behind the new --allow-write flag. |
| November 3, 2026 | analytics-mcp 1.0.0 added a multi-user Streamable HTTP mode with OAuth 2.1, and its release note took the server out of experimental status. |
| November 6, 2026 | analytics-mcp 1.1.0 added opt-in writes for custom dimensions and key events, plus Docker and Cloud Run docs. |
| November 10, 2026 | Google last updated the docs page of its server, which gives setup for Antigravity, Claude Desktop, Claude Code and Cursor and marks Gemini CLI deprecated. |
Sources: Claude Code changelog, Remote MCP in Claude Code, Google Analytics API Notify group, analytics-mcp on PyPI, analytics-mcp releases, Ryze AI in the Anthropic Directory, Google Analytics MCP server. Checked November 14, 2026.
How this guide was tested
Checks for this page ran on two days: the connector on November 13, 2026, at about 04:20 UTC, and GA4 calls from Claude Code through it on November 14, 2026. Each row is one check and what it returned.
| What was run | What came back |
|---|---|
| A request to https://connector.get-ryze.ai/mcp with no sign-in (November 13) | HTTP 401, with a WWW-Authenticate header that points to the sign-in details. Claude Code's docs say a server that answers 401 is marked as needing authentication. |
| The two discovery files on the connector's host (November 13) | Both loaded. Between them they name the authorize, token and register endpoints, the authorization code and refresh token grants, PKCE with S256, and the scopes mcp:read and mcp:write. |
| The 9 GA4 tool definitions, loaded from Claude Code (November 14) | Each came back under its exact name, and no name carries a write verb. Every tool takes a workspace, and all but listAccountSummaries and runAdminRead require a propertyId. |
| Two GA4 reads (November 14) | listAccountSummaries and a one-day, one-metric runRawReport both worked, as the tested calls table shows. |
| Six calls built to fail (November 14) | Five returned 400 INVALID_ARGUMENT and one returned not_allowed. The exact messages are in the errors table. |
| One Search Console call through the same connector (November 14) | A read-only call to another platform on the same server. Its result is not used on this page. |
Not run for this page: the setup steps inside Claude Code. The claude mcp add command, the /mcp sign-in, the workspace choice and claude mcp get were not run for this guide; they follow Anthropic's Claude Code docs as read on November 14, 2026, and Ryze AI's own setup steps. The calls ran in a Ryze AI test workspace with a Google Analytics 4 connection, and the Connect and Property steps in Ryze AI are not part of this record either. The API key route and the claude.ai connector route were not tried. runPivotReport, runRealtimeReport, runAdminRead and the four AI-traffic tools were loaded and left uncalled, because they would have returned a real account's business data. Google's analytics-mcp and the other ways in the table were not run, and no write was tried, since the connector has no GA4 write tool.
Errors and fixes
Exact GA4 messages from the test
These six messages came back during the test on November 14, 2026. They are copied from the responses, with each line break and the indent after it shown as one space. In Claude Code five arrived as Error 400 wrapping Google's JSON error, and the permission message arrived as a normal tool result with the status not_allowed. Its first sentence is the example Google gives for 403 PERMISSION_DENIED.
| Message | Cause | Fix in Claude Code |
|---|---|---|
| Did you mean manualSource? Field trafficSauce is not a valid dimension. For a list of valid dimensions and metrics, see https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema | The request named a dimension GA4 does not have. The test used trafficSauce on purpose, and Google offered its nearest match. | Ask again with a real dimension such as sessionSource, or tell Claude Code to retry with the name Google suggested. |
| Did you mean sessions? Field sessionz is not a valid metric. For a list of valid dimensions and metrics, see https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema | A metric name with a typo, also sent on purpose. | Retry with the suggested name. A report that asks for conversions should use keyEvents, the current name. |
| User does not have sufficient permissions for this property. To learn more about Property ID, see https://developers.google.com/analytics/devguides/reporting/data/v1/property-id. | Either the property ID is wrong or the connected login holds no role on that property. Google words both cases the same way. | Have Claude Code run listAccountSummaries and take an ID from its answer, or ask a property admin for the Viewer role. |
| Requests are limited to 9 dimensions within a nested request. This request is for 10 dimensions. | The report asked for 10 breakdowns, one more than a request takes. | Remove a dimension, or let Claude Code split the question into two reports. |
| Requests are limited to 10 metrics within a nested request. This request is for 11 metrics. | The report asked for 11 metrics, one over the cap the API applied in the test. | Stay at 10 metrics per report and let Claude Code join two results. |
| Requests are limited to 4 dateRanges. This request contains 5 dateRanges. | The report compared 5 periods, one more than the API allowed in the test. | Compare up to 4 periods, or run the date dimension over one longer range. |
Two other codes on Google's errors page did not come up in the test: 429 RESOURCE_EXHAUSTED, when a quota runs out, and 401 UNAUTHENTICATED, when a request lacks valid credentials.
Sources: Data API errors, Data API changelog. Checked November 14, 2026.
Other problems
- Claude Code says the server failed to connect with an API key
- If a configured Authorization header is rejected, Claude Code reports the connection as failed and does not fall back to OAuth. Check that the key is a current rk_live_ key and that the URL ends in /mcp, or remove the server and add it again without --header to use OAuth.
- claude -p or an Agent SDK run cannot sign in
- Those runs cannot run the OAuth flow. Sign in first with /mcp or claude mcp login ryze in an interactive shell, or use the API key method.
- The server does not load from .mcp.json
- Project-scoped servers wait for approval in an interactive session before they connect. Approve it when Claude Code asks.
- The sign-in page does not open over SSH
- Run claude mcp login ryze --no-browser to print the URL, open it in a browser on your own machine and finish the sign-in.
- No GA4 tools appear
- If the connector was added before Google Analytics 4 was connected, remove and re-add it with claude mcp remove ryze and claude mcp add, then start a new session. Tool search is on by default, so tools are loaded on demand and may not be listed up front.
- The Google Analytics 4 card shows Require setup
- No Property is saved yet. Open the card in Ryze AI, pick the Property and click Save.
- A result is saved to a file
- Claude Code warns above 10,000 tokens, and above its 25,000-token default it writes the result to a file and gives the session the path. Ask for fewer dimensions, a shorter date range or fewer rows, or raise MAX_MCP_OUTPUT_TOKENS.
- A call times out
- HTTP servers have a five-minute idle timeout per tool call when no response or progress arrives. Narrow the date range or the report.
- A property is missing
- Ryze AI sees only the properties the connected Google login can access. Ask Claude Code to run listAccountSummaries to see what the login reaches, or add another Google login with Add one more account.
- Revenue shows as zero
- GA4 reports revenue only when ecommerce tracking and purchase events are set up in the property. Check the setup in GA4.
- Claude says a subscription is required
- The GA4 tools need an active Ryze AI plan or free trial. Start the trial in Ryze AI and retry.
Terms on this page
- MCP
- Model Context Protocol, which Anthropic open-sourced on November 25, 2024. Claude Code uses it to call tools on outside servers such as the Ryze AI connector.
- Server scope in Claude Code
- Where claude mcp add saves a server: local for one project, user for all your projects, project for a shared .mcp.json. It has nothing to do with Google's OAuth scopes.
- Property ID
- The number that identifies a GA4 property. Every Data API call carries one; it sits under Admin, Property Settings, and listAccountSummaries returns it.
- Viewer role
- The lowest GA4 role that can read data, and the minimum the Ryze AI connection needs.
- Key event
- An event for an action that matters to your business, formerly called a conversion. The API metric is keyEvents.
- Dimension and metric
- Metrics measure activity, such as active users or event count. Dimensions split them by things like country or event name.
- Token
- The Data API's unit of cost, counted against a property's hourly and daily quota on every request.
Sources: Model Context Protocol announcement, Claude Code MCP, Property ID, GA4 roles, Key events, runReport reference, Data API quotas. Checked November 14, 2026.
Frequently asked questions
How do I connect Claude Code to Google Analytics?
Connect Google Analytics 4 in a Ryze AI workspace and pick a Property, then run claude mcp add --transport http ryze https://connector.get-ryze.ai/mcp. Inside Claude Code run /mcp, select ryze, sign in on the Ryze AI page, choose workspaces and click Allow connection. Check it with claude mcp get ryze.
What is the Google Analytics MCP URL for Claude Code?
For the Ryze AI connector it is https://connector.get-ryze.ai/mcp, added with claude mcp add --transport http. Google's analytics-mcp has no URL in its usual setup: Claude Code starts it on your machine with pipx run analytics-mcp, and only its self-hosted HTTP mode gives it an address, on a server you run.
Is there a GA4 MCP server that also connects Search Console and Google Ads?
Yes. The Ryze AI connector serves its 9 GA4 tools from the same address as its Google Ads and Search Console tools, when those platforms are connected in the same Ryze AI workspace. In Claude Code one claude mcp add entry covers all three, and each platform is connected once inside Ryze AI.
Does Google Analytics have an MCP server for Claude Code?
Yes. Google publishes analytics-mcp, an open-source server that Claude Code starts locally with pipx run analytics-mcp, and Google's docs page gives the claude mcp add command for it. It needs the Analytics Admin API and Data API enabled, Application Default Credentials and Viewer access on the property. It is read-only by default, and the GitHub README adds optional write tools behind an --allow-write flag.
Is there an official Google Analytics MCP server in 2026?
Yes. analytics-mcp is Google's own server: its code lives in the googleanalytics organization on GitHub and the package is on PyPI. Version 1.0.0 on November 3, 2026 took it out of experimental status, and version 1.1.0 from November 6, 2026 was still the newest on November 14, 2026.
Which Google Analytics connector should I use with Claude Code?
Ryze AI is the best Google Analytics connector for Claude Code when you want one hosted URL with Google sign-in handled for you and ready-made AI-traffic reports, but it needs a Ryze AI plan. Google's own server needs no Ryze AI plan and runs locally if you can set up Google Cloud credentials.
Can I connect GA4 to Claude and Claude Code with the same connector?
Yes, https://connector.get-ryze.ai/mcp works in both. Add it in Claude under Customize, Connectors, and Claude Code loads it when you log in with the same claude.ai subscription account; or add it to Claude Code alone with claude mcp add.
Which Claude plan do I need for Claude Code?
Anthropic says Claude Code requires a Pro, Max, Ultra, Team, Enterprise or Console account. The free claude.ai plan does not include it. Claude Code can also run through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.
Should I use OAuth or an API key?
OAuth through /mcp is the simplest for a personal machine. An API key from Workspace Settings, Profile, API keys suits scripts, because claude -p and Agent SDK runs cannot run the OAuth flow. The key works on the /mcp endpoint only.
Can Claude Code change my Google Analytics settings?
No. All 9 GA4 tools are read tools, and runAdminRead is GET only, so the connector cannot create, edit or delete properties, key events or audiences. Make those changes in GA4 itself.
Does it work with Universal Analytics?
No. Only GA4 properties are supported.
What does the claude mcp add scope change?
Local scope, the default, keeps the server to the current project and out of version control. User scope loads it in all your projects. Project scope writes .mcp.json so the team shares it, and each person approves it in an interactive session.
Why do the GA4 tools not show up?
If the connector was added before Google Analytics 4 was connected, remove and re-add it, then start a new session. Run /mcp to check the server status. If a claude.ai connector is missing, you must be logged in with a claude.ai subscription account.
How much does it cost?
Connecting the connector is free, but the GA4 tools need an active Ryze AI plan or free trial. Paid Ads is $89 per month with a 7-day free trial, SEO Starter is $129 per month with a 3-day free trial and Agency is $279 per month. Annual billing takes 30% off the first year.
How do I disconnect Google Analytics from Claude Code?
Run claude mcp logout ryze, then claude mcp remove ryze, because remove alone does not revoke the stored tokens. To remove Google access, disconnect Google Analytics 4 on its card in Ryze AI.