GA4 Analytics MCP V3
Provides integration with Google Analytics 4 (GA4) for querying analytics data, managing multiple Google OAuth connections, and routing property queries to the appropriate credentials.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GA4 Analytics MCP V3What were the top pages by views yesterday for property 123456789?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GA4 Analytics MCP V3
True Model B connector: one MCP operator can own multiple independent Google OAuth connections. Each GA4 query is executed with the Google credential that has access to that property.
This is a new application. It does not modify V2 and does not use Firestore (default) (reserved for V1).
Local development
cd D:\MCP_Servers\Ga4McpV3
npm install
copy .env.example .env.local
# Fill secrets. Set FIRESTORE_DATABASE_ID=ga4-mcp-v3 (never (default)).
npm test
npm run devApp:
http://localhost:3000MCP:
http://localhost:3000/mcpHealth:
http://localhost:3000/health
Related MCP server: GA4 MCP Server
Claude Custom Connector
URL: https://<v3-host>/mcp
Claude starts MCP OAuth 2.1 (same V2 flow).
The first Google sign-in bootstraps an internal
operatorId.After that, connect additional Google Accounts from the connections page or
ga4_start_google_connection.The MCP JWT
subis alwaysoperatorId, never a Google OpenIDsub.
Connect a second or third Google Account
From Claude, call ga4_start_google_connection and open the returned URL. Or use Connect another Google Account on the connections page during authorize. Each authorization is an independent OAuth identity.
Property routing
property_id → this operator's ga4_properties row → connection_id → encrypted refresh token → GA4 APIThe server never uses the current browser Google login, Claude email, or property name to pick a credential.
Operator isolation
Operator A cannot load Operator B's connections by guessing a connectionId. Ownership is checked server-side on every sensitive operation.
Cloud Run
.\scripts\cloud-run-setup.ps1 -ProjectId YOUR_PROJECT_ID
.\scripts\cloud-run-deploy.ps1 -ProjectId YOUR_PROJECT_ID
.\scripts\cloud-run-set-env.ps1 `
-ProjectId YOUR_PROJECT_ID `
-AppBaseUrl https://YOUR_V3_CLOUD_RUN_URL `
-GoogleClientId ... -GoogleClientSecret ... `
-McpTokenSecret ... -OauthStateSecret ... -TokenEncryptionKey ...Create a named Firestore database ga4-mcp-v3 before first use. Use a separate Google OAuth web client from V1/V2.
Docs
This server cannot be deployed
Maintenance
Related MCP Connectors
OAuth MCP for Google, Meta, X, LinkedIn, Reddit, TikTok, GSC, GA4, WordPress and GHL.
Operate secure JoinLayer data pipelines through delegated OAuth.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
OAuth Multi-LLM Orchestrator
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Analytics APIs to fetch reports, manage properties, data streams, conversion events, and custom dimensions/metrics through OAuth2 authentication.46 npm6MIT
- FlicenseAqualityDmaintenanceEnables interaction with Google Analytics 4 to manage accounts, run standard or realtime reports, and validate event parameters. It supports dual authentication methods and integrates with GTM for end-to-end data collection orchestration.8-
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to securely manage Google Workspace services (Gmail, Calendar, Drive, Sheets, Contacts) with persistent multi-account OAuth. Uses OS keychain for credential storage with health monitoring and granular business rules for enterprise security.-
- FlicenseNot gradedqualityBmaintenanceEnables multi-user access to Google Workspace services (Gmail, Calendar, Docs, Sheets, Slides, Drive) via remote MCP with OAuth 2.1 authentication.-