How to connect VS Code to Google Analytics

Link one GA4 property in Ryze AI, add one MCP URL to VS Code, then ask GitHub Copilot Chat for channel reports, realtime numbers and visits from AI assistants.

Your MCP URL
https://connector.get-ryze.ai/mcp

Copies the link. In VS Code run Chat: Open Customizations, MCP Servers, Add Server, HTTP. See the steps

See pricing

By Ira Bodnar, Ryze AI · Updated · Connector tested November 14, 2026

Quick answer

The main way to connect VS Code to Google Analytics is the Ryze AI connector. Link a GA4 property in a Ryze AI workspace with a Google login that has at least the Viewer role. In VS Code, pick Copilot as the session target, run Chat: Open Customizations, open MCP Servers and add an HTTP server at https://connector.get-ryze.ai/mcp with the ID ryze. Accept the trust request, finish the Ryze AI sign-in in the browser and ask Copilot Chat about your traffic. All 9 GA4 tools only read.

  1. In Ryze AI open Integrations, click Connect on Google Analytics 4 and approve the Google screen
  2. Pick the Property for the workspace and click Save
  3. In VS Code run Chat: Open Customizations, select MCP Servers and add an HTTP server with the connector URL
  4. Trust the server, sign in to Ryze AI, allow the workspace and ask your first question in Copilot Chat

VS Code to Google Analytics at a glance

FactDetail
Main way to connectThe Ryze AI connector, saved in GitHub Copilot for VS Code as one HTTP MCP server with the ID ryze
Server addresshttps://connector.get-ryze.ai/mcp, the same for every user
Where it goes in VS CodeChat: Open Customizations > MCP Servers > Add Server (+), or the MCP: Add Server command. A personal setup lands in Copilot Global, ~/.copilot/mcp-config.json
Sign-inOAuth in the browser, started by VS Code. The Google login stays in Ryze AI, so VS Code holds no Google credential, no Google Cloud project and no key file
GA4 tools9, all reads: account list, standard, pivot and realtime reports, Admin API reads and 4 reports on visits from AI assistants
Can Copilot change the propertyNo. The connector has no GA4 write tool and the Admin API tool sends GET requests only
Other data in the same chatOther platforms connected in the same Ryze AI workspace share the same address
Copilot planGitHub lists MCP on every Copilot plan. Business and Enterprise seats also need the MCP servers in Copilot policy, which is off by default
Ryze AI pricePaid Ads is $89 per month with a 7-day free trial. Adding the connector costs nothing
Google's own optionanalytics-mcp, an open-source Python server that runs on your computer. Google's pages do not name VS Code as a client
Last testedGA4 calls through the connector on November 14, 2026, sent from Claude Code. The steps inside VS Code were not run

Before you start

  • GitHub Copilot in VS Code. GitHub marks MCP as included on Copilot Free, Student, Pro, Pro+, Max, Business and Enterprise, and asks for VS Code 1.99 or later. The Copilot Global destination used below arrived in VS Code 1.140, so update an older install first.
  • The MCP policy, if Copilot comes from an organization. On Copilot Business or Enterprise the MCP servers in Copilot policy must be enabled, and it is disabled by default. An administrator turns it on. Copilot Free, Pro, Pro+ and Max are not governed by that policy.
  • A local project folder and Copilot as the session target. Microsoft's walkthrough starts with a local folder open and Copilot chosen in the Session Target dropdown, because the Customizations editor lists the servers of the selected harness.
  • A Google login with GA4 access. The login needs at least the Viewer role on one GA4 property. Universal Analytics properties are not supported. Keep every permission checked on the Google screen.
  • A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial. The GA4 tools also run on SEO Starter ($129 per month, 3-day free trial) and Agency ($279 per month). Adding the connector is free, but the tools need an active plan or trial.

How to connect VS Code to Google Analytics

Two steps happen in Ryze AI, four in VS Code. The connector URL is the same for every user.

  1. 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.

  2. 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.

  3. Open the MCP Servers list in VS Code

    With a local project folder open, choose Copilot in the Session Target dropdown. Open the Command Palette, run Chat: Open Customizations and select MCP Servers. Select Add Server (+) in the User group; Microsoft's overview page also names a Workspace group.

  4. Add the HTTP server

    Choose HTTP (HTTP or Server-Sent Events) and enter https://connector.get-ryze.ai/mcp. Enter ryze as the server ID. For a personal setup, select Global, then Copilot Global. There is no client ID or secret to type.

  5. Trust the server and sign in

    Accept the trust request if VS Code shows one, then complete the Ryze AI sign-in in the browser. If no sign-in starts, open the ellipsis (...) menu of the ryze server in MCP Servers and choose Authenticate. On the Ryze AI page pick the workspace that holds your GA4 connection and click Allow connection.

  6. Ask your first question in Copilot Chat

    Open Copilot Chat and ask: List the GA4 properties I can access, then show sessions by default channel group for the last 28 days. Approve the tool call when VS Code asks, then expand the call in the conversation to confirm the ryze server answered.

The Ryze AI help article for Google Analytics 4 covers the Google side of the connection. VS Code steps follow the VS Code MCP servers docs and the page on managing MCP servers, checked November 14, 2026.

Command Palette and config files

The guided flow and the config files reach the same server. Pick whichever matches how you manage VS Code.

Command Palette

Run MCP: Add Server from the Command Palette and answer the prompts with the same URL and server ID. It skips the Customizations editor.

Portable config file

To write the server into a file, use the portable format. VS Code reads it from ~/.copilot/mcp-config.json ($COPILOT_HOME/mcp-config.json when that variable is set) or from a .mcp.json at the workspace root, under the key mcpServers. A workspace file lets a team share one setup. Every portable HTTP example in Microsoft's docs carries a tools field, so this entry has one too:

{ "mcpServers": { "ryze": { "type": "http", "url": "https://connector.get-ryze.ai/mcp", "tools": ["*"] } } }

Older VS Code format

The older VS Code format sits in .vscode/mcp.json or the profile mcp.json and uses the key servers. It belongs to the Local harness, which VS Code 1.146 deprecated on November 11, 2026, with removal planned for February 2027. Microsoft's developer guide calls these deprecated destinations in the guided flow, while GitHub's Copilot article still shows the format, so older tutorials may send you here:

{ "servers": { "ryze": { "type": "http", "url": "https://connector.get-ryze.ai/mcp" } } }

The value ["*"] exposes every tool of the server and leaves approvals in place; naming tools instead narrows the list. Portable configurations do not support VS Code input variables or environment files. Never paste a Google credential into the file, because the Google login stays inside Ryze AI.

VS Code behavior to know

  • The type field picks the transport: http for Streamable HTTP, stdio for a local command and sse for an older endpoint that Microsoft calls deprecated. The connector entry uses http.
  • Trusting a server to start, signing in to it and approving single tool calls are three separate steps. Passing one does not pass the next.
  • Servers that need interactive inputs such as ${input:...} are not forwarded to Copilot harness sessions.
  • A chat request can have at most 128 tools enabled, and the 9 GA4 tools count toward that figure along with the tools of every other enabled server.
  • Copilot Global does not sync to other machines, and a remote host or Dev Container does not receive the local file. Add the server where the session runs.
  • Microsoft's MCP developer guide says VS Code signs in to other providers through Dynamic Client Registration or a pre-registered OAuth client. Ryze AI was not tested inside VS Code for this guide, so if the sign-in does not start, write to Ryze AI support.

GitHub Copilot in VS Code and MCP: the facts in one table

TopicWhat Microsoft and GitHub document
Screen for MCP serversThe Agent Customizations editor: Chat: Open Customizations, the Chat view title bar, or Customizations in the Agents window sidebar
Files the Copilot harness reads~/.copilot/mcp-config.json for one person and .mcp.json at the workspace root for a team, both keyed mcpServers
Older files.vscode/mcp.json and the profile mcp.json, keyed servers, kept for the Local harness until its removal in February 2027
Transportsstdio for a command, http for Streamable HTTP, sse for endpoints without Streamable HTTP
Sign-inOAuth that VS Code runs when the Copilot runtime asks. GitHub and Microsoft Entra are built in; other providers use Dynamic Client Registration or a pre-registered client. VS Code stores the credentials
Redirect addresseshttp://127.0.0.1:33418 and https://vscode.dev/redirect, which an OAuth client for an MCP server must allow
Tool approvalNew sessions start on Manual permissions. Assisted permissions, where an LLM judge reviews each call, and Allow all sit in the permissions dropdown of the chat input
PlanMCP is included on every Copilot plan. Business and Enterprise seats depend on the MCP servers in Copilot policy
Admin controlsallowedMcpServers and deniedMcpServers in enterprise-managed settings, matched by URL, command or name. chat.mcp.access set to none turns MCP off
Where servers are managedMCP Servers in the Customizations editor, or MCP: List Servers, with actions to start, stop, authenticate, disable, uninstall and show output

Sources: VS Code MCP servers docs, VS Code MCP configuration reference, VS Code MCP developer guide, Managing MCP servers in VS Code, VS Code tool approvals, VS Code enterprise AI settings, GitHub Copilot MCP docs, GitHub Copilot plans. Checked November 14, 2026.

Google Analytics access and scopes

Access is set in three places: Google, Ryze AI and VS Code.

Which Google login
Ryze AI connects through Google OAuth with the read-only Google Analytics scope plus basic profile scopes. The login needs at least Viewer access on a GA4 property. Keep every requested permission checked.
Which property
After connecting you save a Property for the workspace. More Google logins can be added with Add one more account, each with its own Property, and one is the primary that the agent uses by default (the star). Other properties stay reachable by naming them in chat.
Read or write
Read only. The connector never asks Google for a scope that edits GA4, so Copilot cannot create or change properties, key events or audiences.
What VS Code asks
Three separate checks. A trust request can appear the first time the ryze server starts. A sign-in follows when the server needs one, and the server menu then offers Authenticate. After that, each tool call that is not auto-approved shows the tool name and its input and waits for your answer.

The four Google OAuth scopes of the connection

The Google screen in Ryze AI lists four scopes. VS Code signs in to the connector only, so Google tokens never reach it. Ryze AI holds no API key or service account for GA4, so you create no Google Cloud project or OAuth client. The right column quotes Google.

ScopeHow Google describes it
https://www.googleapis.com/auth/analytics.readonlySee and download your Google Analytics data
openidAssociate you with your personal info on Google
emailSee your primary Google Account email address
profileSee your personal info, including any personal info you've made publicly available

The GA4 role decides what Copilot can read

The scope sets the ceiling. The role your Google login holds on the property decides what comes back inside it. Google describes the Viewer role as someone who can see settings and data, and its own MCP server docs ask for the same minimum.

What the login can do in GA4GA4 role that allows it
Read reports, settings and the property listViewer or any higher GA4 role
Create or edit key events, audiences and custom dimensionsMarketer or Editor, but the Ryze AI connection cannot use them, because it requests no edit scope
See cost or revenue metricsA role without the No Cost Metrics or No Revenue Metrics restriction

Google enforces data restrictions in the Analytics interface and in API calls alike. If your access carries No Revenue Metrics, revenue comes back withheld through any connector, Ryze AI included. Revenue also shows as zero when the property has no ecommerce tracking or purchase events.

Not requested: analytics.edit, which Google describes as Edit Google Analytics management entities, and analytics.chatbot.read, the scope for the Ask Advisor chat method. For that reason Copilot cannot change anything in GA4 through Ryze AI, even if your login is an Editor.

Sources: Google OAuth 2.0 scopes, GA4 roles and data restrictions, Data API runReport reference, Admin API accountSummaries.list, Google Analytics MCP server docs. Checked November 14, 2026.

Removing access

To stop VS Code reaching GA4, open Chat: Open Customizations, select MCP Servers and remove or disable the ryze server. To cut access at the source, disconnect Google Analytics 4 on its card in Ryze AI or remove Ryze AI from your Google Account's third-party access page.

What VS Code can do in Google Analytics

The Ryze AI connector exposes 9 GA4 tools, all of them reads. Four report on visits that arrive from AI assistants.

ToolTypeWhat it does
google_analytics__listAccountSummariesReadLists the GA4 accounts and properties the connected Google login can access, which gives Copilot the property IDs.
google_analytics__runRawReportReadRuns a GA4 Data API report with chosen dimensions, metrics, named date ranges, filters and ordering, and pages through results.
google_analytics__runPivotReportReadRuns a GA4 Data API pivot-table report.
google_analytics__runRealtimeReportReadRuns a realtime report covering the last 30 minutes.
google_analytics__runAdminReadReadReads a GA4 Admin API resource such as key events, custom dimensions or audiences. GET only.
google_analytics__getAiTrafficByEngineReadReturns traffic from AI referrers grouped by source engine and compared with a prior period.
google_analytics__getAiTrafficDailyReadReturns daily traffic from AI referrers such as ChatGPT and Perplexity.
google_analytics__getAiLandingPagesReadLists the top landing pages that receive AI-referred traffic, up to 200 rows.
google_analytics__getAIReferralsReadLists AI referral sources with their sessions and conversions.

Because every GA4 tool reads, no approval setting can change anything in GA4. VS Code starts new sessions on Manual permissions, so a call that is not auto-approved waits for you; Assisted permissions and Allow all are one click away in the chat input. Separately, the Ryze AI chat has a Tool approvals picker that starts on Skip all approvals, and scheduled tasks run without an approval step.

What the default connection did in the test

Claude Code sent these 8 calls through the Ryze AI connector on November 14, 2026, on the default read-only connection to a standard GA4 property. VS Code did not send them. Two calls asked for data and worked; six were built to fail. The property belongs to a real account, so the table shows field names and outcomes, never values.

What was sentToolResult
The workspace and nothing elselistAccountSummariesA list of accountSummaries, each holding propertySummaries with property, displayName, propertyType, parent and canEdit
Sessions for the previous day, with returnPropertyQuota onrunRawReportOne row, plus metricHeaders, rowCount, metadata for currency and time zone, and a propertyQuota block whose totals equal Google's standard-property limits
trafficSauce, a dimension that does not existrunRawReport400 INVALID_ARGUMENT, with manualSource suggested
sessionz, a misspelled metricrunRawReport400 INVALID_ARGUMENT, with sessions suggested
A property ID that does not existrunRawReportThe status not_allowed, returned as a normal tool result
10 dimensions in one reportrunRawReport400 INVALID_ARGUMENT
11 metrics in one reportrunRawReport400 INVALID_ARGUMENT
5 date ranges in one reportrunRawReport400 INVALID_ARGUMENT

The tool definitions loaded that day show a required workspace and an optional connection_id on every tool, and a required propertyId on every tool except listAccountSummaries and runAdminRead. No property is picked for you, so Copilot finds the ID with listAccountSummaries first.

Google Analytics limits to know

Some limits are Ryze AI's and some are Google's. These five apply in VS Code as much as anywhere else.

TopicLimit
Realtime reportsCover the last 30 minutes only
RevenueShows as zero unless ecommerce tracking and purchase events are set up in GA4
Property typeGA4 only. Universal Analytics is not supported
PlanThe tools work only while the Ryze AI workspace has an active plan or free trial. Without one the connector can only list workspaces and connect platforms
Number matchGA4 and Shopify numbers differ because the two attribute sessions and conversions differently

Limits in numbers

Google meters the Data API and Admin API per property and per Google Cloud project. Figures are for a standard property unless a row names Analytics 360, taken from Google's pages as read on November 14, 2026, except the rows that name the test, the Ryze AI tools or VS Code.

LimitFigure or rule
Tokens per day200,000 per standard property, 2,000,000 on Analytics 360. Daily quotas refresh at midnight Pacific time
Tokens per hour40,000 per property (400,000 on 360). One Google Cloud project may use 14,000 of them per property per hour (140,000 on 360)
Requests at once10 per property, 50 on 360
Cost of one requestGoogle says most requests charge 10 or fewer tokens. More rows, more fields, complex filters, long date ranges and dimensions such as pagePath cost more. The one-day, one-metric test report cost 1 token
Empty quota bucketFurther requests to that property return 429 RESOURCE_EXHAUSTED. Hourly buckets refill within an hour
Server errors10 per project and property per hour (50 on 360). Past that, Google blocks the project's requests to that property
Failed requests10,000 per project and property in a 15-minute window, counting every answer other than 200 or 500
Demographic fields120 potentially thresholded requests per property per hour, for fields such as userAgeBracket and userGender
Rows per report10,000 when no limit is named, 250,000 at most per request, with offset for the next page
Fields per report9 dimensions, per Google's report guide. In the November 14, 2026 test the API also refused an 11th metric and a 5th date range
Realtime window30 minutes back (60 on 360), with up to two minute ranges per query
Data freshnessStandard properties see intraday data in 2 to 6 hours and daily data in 12. Google says processing can take 24 to 48 hours and figures may change meanwhile
Data retentionUser-level data is kept 2 or 14 months. Google says the setting affects explorations and funnel reports, and standard aggregated reports are unaffected
Admin API1,200 requests per minute and 600 per user per minute. Its write quotas never come into play, since the Ryze AI tools only read
Ryze AI tool inputsgetAiLandingPages returns up to 200 rows. runRawReport defaults to 10,000 rows and pages with offset. A runAdminRead path is up to 512 characters
Tools in one chatVS Code allows 128 enabled tools per request

Sources: GA4 Data API quotas, Data API changelog, runReport reference, Create a report, Realtime reports, Admin API quotas, GA4 data freshness, GA4 data retention, VS Code tools in chat. Checked November 14, 2026.

The Ryze AI rows come from the connector's tool definitions as loaded on November 14, 2026.

First 3 prompts to run

1. Find the property and compare channels

List the GA4 properties I can access, then show sessions, key events and revenue by default channel group for the last 28 days against the 28 days before.

Tools used: google_analytics__listAccountSummaries, google_analytics__runRawReport

What comes back: A list of properties, then a channel table with both date ranges side by side. Revenue stays at zero if purchase events are not set up in GA4.

2. See visits from AI assistants

Which AI assistants sent visits in the last 30 days compared with the 30 days before, and which landing pages did they reach?

Tools used: google_analytics__getAiTrafficByEngine, google_analytics__getAiLandingPages

What comes back: Sessions per AI engine against a prior period, then up to 200 landing pages. GA4 shows visits that arrive from assistants; it does not show whether an assistant mentions your brand.

3. Check what is live right now

Run a realtime report and show active users by country and device for the last 30 minutes.

Tools used: google_analytics__runRealtimeReport

What comes back: A short table of current activity from your own property. Nothing in GA4 changes.

Every answer comes from your own property, so this page describes what comes back and shows no sample figures. Swap the names in the prompts for ones from your property.

10 jobs to hand to Copilot

Ten jobs to give Copilot Chat, each with the tool that does the work. listAccountSummaries and runRawReport ran in the November 14, 2026 test, sent from Claude Code. The other tools were loaded and left uncalled, because they would have returned business data from a real account. The last job is one this connection cannot do.

JobAsk CopilotToolWorks on the default connection
Property IDsList every GA4 account and property my Google login can read, with each property ID.google_analytics__listAccountSummariesYes, run in the test
Channel trendCompare sessions, key events and revenue by default channel group for last month and the month before, naming both ranges.google_analytics__runRawReportYes. Named date ranges keep the two months apart
Landing pagesShow the top landing pages by sessions with engagement rate and key event rate for the last 28 days.google_analytics__runRawReportYes
Revenue by sourceBreak purchase revenue and purchases down by source and medium for this quarter.google_analytics__runRawReportYes, when purchase events are tracked and your role has no No Revenue Metrics restriction
Device pivotBuild a pivot of sessions with channels as rows and device categories as columns.google_analytics__runPivotReportYes
Right nowWho is on the site in the last 30 minutes, by country and device?google_analytics__runRealtimeReportYes, 30 minutes back only
Setup auditList the key events, custom dimensions and audiences configured on this property.google_analytics__runAdminReadYes. Audiences are read with version v1alpha
AI enginesWhich AI assistants sent visits last month, and how does each compare with the month before?google_analytics__getAiTrafficByEngineYes
AI referral detailChart daily visits from ChatGPT and Perplexity, and list each AI referral source with its sessions and conversions.google_analytics__getAiTrafficDaily, google_analytics__getAIReferralsYes
Add a key eventMark the form_submit event as a key event.NoneNo. The connection only reads, so make this change in GA4 Admin

6 ways to connect VS Code to Google Analytics

Six ways can put GA4 data into Copilot Chat, since VS Code accepts hosted HTTP servers and local stdio commands. This guide treats the Ryze AI connector as the main way: Google is approved once inside Ryze AI, and VS Code keeps one address and a browser sign-in. The other five come from each vendor's own pages as read on November 14, 2026, and none was run in VS Code for this guide.

WayRuns whereSetup in VS CodeWhat it reaches in GA4Price
Ryze AI connector (the main way)Hosted. The same address carries the other platforms connected in the workspaceAdd Server, HTTP, the connector URL and the ID ryze, then the browser sign-in9 read tools, 4 of them for visits from AI assistants. Nothing in GA4 can be changedPaid Ads $89 per month with a 7-day free trial; the connector itself is free
Google's analytics-mcp 1.1.0, open sourceOn your computer, started by VS Code as a stdio commandAdd Server offers a command (stdio) option. Google's pages show pipx run analytics-mcp or uvx with GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT, and need Python 3.10 or higher, a Google Cloud project with the Analytics Admin and Data APIs turned on, and Application Default Credentials. Neither the docs page nor the README names VS Code or CopilotReads by default: 9 tools on Google's docs page, 13 in the README with funnel and conversions reports. Three create tools work only with --allow-write and the analytics.edit scopeNo price stated. Apache-2.0 license
ComposioHosted by ComposioComposio lists a VS Code page among its per-client pages. Its remote address is https://connect.composio.dev/mcp, followed by a Composio sign-in and Google approval through its managed OAuth app82 tools that read and write, among them Create Audience and Archive Custom DimensionFree up to 10,000 tool calls a month. Standard is $18 per seat per month
Zapier MCPHosted by ZapierGenerate a Zapier MCP address, choose the GA4 actions and add it as a server. Zapier names VS Code among its MCP clients6 actions, such as Run Report for a Property and Create Conversion Event for a PropertyEach successful call uses 2 tasks, failed calls use none. The Free plan has 100 tasks a month
Windsor.aiHosted by Windsor.aiAdd GA4 as a data source in Windsor.ai, then add the Windsor connector. Windsor publishes a guide for CopilotGA4 read only. Claude's directory lists 19 tools for the whole Windsor connectorFree after a 30-day trial, with 1 data source, 1 account and the past 30 days. Basic is $23 a month
Coupler.ioHosted, on a synced copy of GA4Build a GA4 data flow, then use its Copilot integration or the Custom MCP route with an access token in an Authorization: Bearer header. Coupler names VS Code for that routeRead only, queried as SQL. Up to 10 metrics and 9 dimensions per data flowFree with manual refresh. Starter is $32 a month, or $24 billed annually

Google Analytics options that do not fit VS Code

  • analytics-mcp in HTTP mode. Since version 1.0.0 the same package can run as a multi-user HTTP server that you host, with a built-in OAuth 2.1 server, and version 1.1.0 added Docker and Cloud Run docs. The README names only Google ADK, an agent framework, for this mode. It names no editor or chat assistant, VS Code included, and its sign-in state lives in memory, so a restart means everyone signs in again.
  • Google's hosted endpoint at analyticsdata.googleapis.com/mcp/v1. A Markdown copy of a Google reference page lists 4 read tools for it, while the HTML version of that page returned 404 on November 14, 2026, and Google's list of remote MCP servers has no Google Analytics entry. Google Cloud's general guide says its remote servers support neither Dynamic Client Registration nor Client ID Metadata Documents, and its Visual Studio Code steps use your own OAuth client ID and secret or an access token that must be regenerated every hour. No Google page announces this endpoint, so this guide treats it as unconfirmed.
  • Google Analytics agent skills. These teach a coding agent to write Data API and Admin API code. They hold no connection to your data, so they sit beside an MCP server and cannot stand in for one.
  • The Ask Advisor chat method. properties.chat in the v1alpha Data API sends a question to the assistant inside Google Analytics and needs the analytics.chatbot.read scope. It is an API call for your own code, and Google names no assistant for it.
  • surendranb/google-analytics-mcp. An open-source local server with 8 read tools and anonymous telemetry unless you set DO_NOT_TRACK=1. Its README shows an npx entry for VS Code through the Cline, Roo Code and Continue extensions, which are separate from GitHub Copilot, so it is not a Copilot Chat route that the README describes.

Which one to pick

Ryze AI is the best way to connect VS Code to Google Analytics 4 when you want GA4 reports in Copilot Chat with nothing to install or keep running, with one caveat: it only reads, so audiences, key events and custom dimensions need another route, and it has no funnel report tool. Choose Google's analytics-mcp if you already work with Python and a Google Cloud project and want Google's own code, funnel reports or opt-in writes. Both can sit in Copilot Global under different server IDs. Composio and Zapier can also write to GA4 and suit teams that already use them for other apps. Windsor.ai and Coupler.io suit teams that already pipe marketing data through them.

Sources: Google Analytics MCP server docs, analytics-mcp on GitHub, analytics-mcp on PyPI, Google Analytics agent skills, Ask Advisor basics, Google Cloud remote MCP servers, Google Cloud: configure MCP in an AI application, Composio pricing, Zapier Google Analytics 4 MCP, Zapier MCP quickstart, Windsor MCP guides, Windsor.ai pricing, Coupler.io Google Analytics MCP, Coupler.io pricing, surendranb/google-analytics-mcp. Checked November 14, 2026.

VS Code, Google Analytics and MCP: dates that matter

DateWhat happened
May 6, 2024The Data API gained key event fields. conversions became a deprecated metric name, replaced by keyEvents.
April 2025VS Code 1.99 shipped MCP servers in agent mode. GitHub's MCP article still names 1.99 as the lowest version.
July 9, 2025VS Code 1.102 made MCP support generally available and moved servers into a dedicated mcp.json per profile.
July 14, 2025GitHub moved organization access to MCP under the MCP servers in Copilot policy, disabled until an administrator turns it on.
July 30, 2025The Google Analytics team announced its MCP server in the Google Analytics API Notify group.
August 22, 2025analytics-mcp 0.1.0, the first release, appeared on PyPI and GitHub.
April 29, 2026analytics-mcp 0.3.0 added the run_funnel_report tool.
September 30, 2026VS Code 1.140 added Copilot Global and .mcp.json as destinations in MCP: Add Server.
October 22, 2026analytics-mcp 0.8.0 shipped its first write tool, create_property_annotation, behind a new --allow-write flag.
November 3, 2026analytics-mcp 1.0.0 added a multi-user Streamable HTTP mode with OAuth 2.1, and its release note dropped the experimental label.
November 6, 2026analytics-mcp 1.1.0 added opt-in writes for custom dimensions and key events, plus Docker and Cloud Run docs. It was the newest release on November 14, 2026.
November 10, 2026Google last updated the docs page for its server. It lists Antigravity, Claude Desktop, Claude Code and Cursor, and calls Gemini CLI deprecated.
November 11, 2026VS Code 1.146 deprecated the Local harness, the one that reads .vscode/mcp.json.
February 2027Planned removal of the Local harness.

Sources: VS Code 1.99, VS Code 1.102, GitHub changelog: MCP in VS Code generally available, VS Code 1.140, VS Code 1.146, VS Code agent harnesses, Data API changelog, Google Analytics API Notify group, analytics-mcp releases, Google Analytics MCP server docs. Checked November 14, 2026.

How this guide was tested

Everything run for this page was a call through the Ryze AI connector on November 14, 2026, or a page read that day. Each row is one thing that was done and what it returned.

What was runWhat came back
The GA4 tool list, loaded from Claude Code through the connectorAll 9 definitions loaded by their exact names, and no name contains a write verb.
Two GA4 readslistAccountSummaries and a one-day runRawReport both worked. The report's propertyQuota totals equal Google's standard-property limits.
Six requests built to failFive came back as 400 INVALID_ARGUMENT and one as not_allowed. Their messages are in the errors table.
VS Code, GitHub and Google pagesRead on November 14, 2026. Microsoft's pages carry the date November 11, 2026. Each fact on this page names its source.

Not run: any step inside VS Code. No server was added in the Customizations editor, no trust request, sign-in or approval dialog was seen, and no tool call was made from VS Code, so those steps follow Microsoft's documentation. The GA4 calls came from Claude Code, which reaches the same server and the same 9 tools. runPivotReport, runRealtimeReport, runAdminRead and the four AI-traffic tools were loaded and not called, because they would have returned data from a real account. No call went through Google's analytics-mcp or any other way in the table, and no write was tried, since the connector has no GA4 write tool.

Other clients

Google Analytics 4 is connected once in Ryze AI, so nothing changes on the Google side when you use another client.

Claude Code

Claude Code adds the same URL from a terminal command. The GA4 calls in this guide's test were sent from it. How to connect Claude Code to Google Analytics.

Claude

Claude takes the connector under Customize, Connectors, a different menu from VS Code. If GA4 was connected after the connector was added, remove and re-add it, then start a new chat. How to connect Claude to Google Analytics.

ChatGPT and Cursor

ChatGPT has its own plan rules for custom MCP servers, and Cursor reads its own mcp.json, so follow their guides. How to connect ChatGPT to Google Analytics.

Errors and fixes

Exact error messages from the test

Google returned these six messages in the test on November 14, 2026. Five reached the client as 400 errors with Google's JSON inside; the permission message came back as a normal tool result with the status not_allowed. If Copilot shows one, the row explains it.

MessageWhat it meansWhat to do in VS 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-schemaThe dimension name does not exist. The test sent it on purpose, and Google names the closest real one.Ask again with a real dimension such as sessionSource, or let Copilot take the name Google suggests.
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-schemaThe metric name is misspelled. This was sent on purpose too.Use the suggested name. If you asked for conversions, ask for keyEvents, its 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.The property ID does not exist, or your Google login has no role on it. Google gives one answer for both.Have Copilot run listAccountSummaries and take an ID from the result, 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.One report can break data down by 9 dimensions at most.Drop a breakdown, or split the question into two reports.
Requests are limited to 10 metrics within a nested request. This request is for 11 metrics.One report carries 10 metrics at most, as the API answered in the test.Spread the metrics over two reports.
Requests are limited to 4 dateRanges. This request contains 5 dateRanges.One report compares 4 periods at most, as the API answered in the test.Keep to 4 periods, or use the date dimension across one long range.

Two more codes on Google's errors page did not come up in the test: 429 RESOURCE_EXHAUSTED when a quota bucket is empty, and 401 UNAUTHENTICATED when credentials are not valid.

Other problems

The MCP server does not start in VS Code
On Copilot Business or Enterprise, ask an administrator to enable the MCP servers in Copilot policy; it is disabled by default. A server defined in .mcp.json or .vscode/mcp.json also stays off while the workspace is in Restricted mode, so trust the workspace. Check that VS Code is 1.99 or later.
The sign-in never opens
Trust the server first, then authenticate, since they are separate steps. In MCP Servers open the ellipsis (...) menu of the ryze server and choose Authenticate, or Show Output to read what VS Code reports. If it stays stuck, write to Ryze AI support.
An older tutorial does not work
Current VS Code docs use Copilot Global (~/.copilot/mcp-config.json) and mark the .vscode/mcp.json destination as deprecated in the guided flow. GitHub's Copilot article still shows the old file. Re-add the server through Chat: Open Customizations.
Copilot Global is not offered
That destination arrived in VS Code 1.140. Update VS Code and choose Copilot in the Session Target dropdown.
The GA4 tools are missing
If the connector was added before GA4 was connected, remove the ryze server, add it again and start a new chat so the tool list refreshes.
Cannot have more than 128 tools per request.
This is VS Code's cap on tools in one chat request. Deselect tools or whole MCP servers in the tools picker, or list only the tools you need in the entry's tools field.
The Ryze AI card says Require setup
No Property is saved yet. Open the Google Analytics 4 card in Ryze AI, pick the Property and click Save.
No properties are listed
The Google login you connected has no GA4 access. Use a login with at least the Viewer role, or add one more account in Ryze AI.
Revenue shows as zero
GA4 reports revenue only when ecommerce tracking and purchase events are set up on the property.
Recent numbers look low
Google says daily data can take 12 hours and processing up to 24 to 48 hours, and figures may change meanwhile. Ask again later or end the range a few days back.
It works on a laptop but not in a Dev Container
The Copilot user file on your machine is not forwarded to a remote host. Add the ryze server where the session runs and sign in there.
The tools reply that 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
The Model Context Protocol, an open standard through which AI models reach outside data and applications. VS Code speaks it to the Ryze AI connector.
Copilot Global
The personal destination in MCP: Add Server, saved as ~/.copilot/mcp-config.json and used across your workspaces on one machine.
Property ID
The number that names a GA4 property. Every Data API request carries one; Google says to find it under Admin, Property Settings.
Key event
Google describes it as an event that measures an action that is particularly important to your business. It was once called a conversion, and the API metric is keyEvents.
Default channel group
Google's rule-based sorting of traffic sources into channels such as Direct, Organic Search, Paid Search and Referral. In the API it is sessionDefaultChannelGroup.
Viewer role
The lowest GA4 role that can read data, and the minimum the Ryze AI connection needs.
Token
The unit the Data API charges each request against a property's hourly and daily budget.

Sources: Property ID, Key events, Default channel group, GA4 roles, Data API quotas, VS Code MCP developer guide, VS Code agent harnesses. Checked November 14, 2026.

Frequently asked questions

How do I connect VS Code to Google Analytics?

Connect Google Analytics 4 in a Ryze AI workspace and save the Property. In VS Code choose Copilot as the session target, run Chat: Open Customizations, select MCP Servers, add an HTTP server with https://connector.get-ryze.ai/mcp and the ID ryze, trust it, sign in to Ryze AI and click Allow connection.

Is there a Google Analytics MCP server for VS Code?

Yes, with a caveat. Google publishes the open-source analytics-mcp server, which runs as a local command and which VS Code can start as a stdio server, but Google's docs page and README do not name VS Code or Copilot. The Ryze AI connector at https://connector.get-ryze.ai/mcp is a hosted option with 9 read-only GA4 tools.

Does Google Analytics have an official MCP server?

Yes. Google publishes analytics-mcp on GitHub and PyPI. It left experimental status with version 1.0.0 on November 3, 2026 and was at 1.1.0 on November 14, 2026. It reads by default and has three write tools behind --allow-write. Google's docs page names Antigravity, Claude Desktop, Claude Code and Cursor as clients.

What is the GA4 MCP server URL for VS Code?

For the Ryze AI connector it is https://connector.get-ryze.ai/mcp. Google's analytics-mcp normally has no address to paste, because the client starts it on your computer. Its HTTP mode gives an address only when you host it yourself.

Is there a GA4 MCP server that also connects Search Console and Google Ads?

The Ryze AI connector serves its GA4 tools from the same address as the other platforms connected in the same Ryze AI workspace. Which platforms appear depends on what you connect there, so check the workspace's Integrations list.

Which GitHub Copilot plan do I need?

Any Copilot plan: GitHub marks MCP as included on Free, Student, Pro, Pro+, Max, Business and Enterprise, with VS Code 1.99 or later. On Business or Enterprise the MCP servers in Copilot policy must also be enabled, and it is off by default.

What Google access do I need?

A Google login with at least the Viewer role on a GA4 property. Ryze AI requests the read-only analytics.readonly scope plus basic profile scopes, and you keep every requested permission checked.

Can VS Code change my GA4 settings?

No. All 9 GA4 tools are reads. The connector cannot create, edit or delete properties, key events, audiences or other settings, and the Admin read tool is GET only.

Will Copilot ask before running a GA4 tool?

New VS Code sessions start on Manual permissions, so a tool call that is not auto-approved shows the tool name and its input and waits for you. Assisted permissions and Allow all are in the permissions dropdown of the chat input.

Can Copilot see visits from ChatGPT and Perplexity?

Yes. Four of the tools report traffic from AI referrers by engine, by day, by landing page and by referral source with sessions and conversions. GA4 shows visits that arrive from assistants, not whether an assistant mentions your brand.

Can I connect more than one GA4 property?

Yes. Add several Google logins to one workspace with Add one more account, each with its own Property, and set one as primary with the star. Other properties stay reachable by naming them in chat. The help center advises a separate workspace for each client.

Does it support Universal Analytics?

No. Only GA4 properties are supported.

Should I use the config file or the Customizations editor?

Both reach the same server. The Customizations editor is the route Microsoft documents first. A .mcp.json at the workspace root, keyed mcpServers, lets a team share one setup. The older .vscode/mcp.json format belongs to the Local harness, deprecated on November 11, 2026 and due to be removed in February 2027.

Why do the GA4 tools not show up in Copilot Chat?

Check that Copilot is the session target and that the ryze server is enabled and trusted in MCP Servers, then start a new chat. If GA4 was connected after you added the server, remove the server, add it again and start a new chat. On an organization plan, check the MCP policy.

How much does it cost to connect VS Code to Google Analytics?

Adding the connector costs nothing, 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.

Connect Google Analytics to VS Code

Paid Ads is $89 per month with a 7-day free trial; SEO Starter is $129 per month with a 3-day free trial; Agency is $279 per month. Annual billing takes 30% off the first year.

Need help? Read the Ryze AI Google Analytics 4 guide or email Ryze AI support.