Google Analytics 4 MCP server: 27 read tools, no write tools.
registry version 2.1.1
npm
npx -y @getmcpads/google-analytics-mcp-servernpm
npx -y @getmcpads/google-analytics-mcp-server@2.1.1
Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server@2.1.1"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env GA4_CLIENT_ID=<YOUR_GA4_CLIENT_ID> --env GA4_CLIENT_SECRET=<YOUR_GA4_CLIENT_SECRET> --env GA4_REFRESH_TOKEN=<YOUR_GA4_REFRESH_TOKEN> google-analytics -- npx -y @getmcpads/google-analytics-mcp-server
claude mcp add --env GA4_CLIENT_ID=<YOUR_GA4_CLIENT_ID> --env GA4_CLIENT_SECRET=<YOUR_GA4_CLIENT_SECRET> --env GA4_REFRESH_TOKEN=<YOUR_GA4_REFRESH_TOKEN> google-analytics -- npx -y @getmcpads/google-analytics-mcp-server@2.1.1
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server@2.1.1"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}{
"servers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server@2.1.1"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@getmcpads/google-analytics-mcp-server@2.1.1"
],
"env": {
"GA4_CLIENT_ID": "<YOUR_GA4_CLIENT_ID>",
"GA4_CLIENT_SECRET": "<YOUR_GA4_CLIENT_SECRET>",
"GA4_REFRESH_TOKEN": "<YOUR_GA4_REFRESH_TOKEN>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
GA4_CLIENT_ID required — OAuth client ID.GA4_CLIENT_SECRET required secret — OAuth client secret.GA4_REFRESH_TOKEN required secret — OAuth refresh token, analytics.readonly scope.GA4_PROPERTY_ID — Default GA4 property ID.GA4_PROPERTY_IDS — Comma-separated property IDs every tool is limited to. Optional in 2.x, required in 3.0.0.最近更新于 33 天前 · Apache-2.0 license
Google Analytics 4 MCP server Understand what happens after the click. Explore traffic, conversions, funnels and property configuration through a read only MCP server. Watch the film · What's new · Install · Tool reference · Try hosted getmcpads Play the 45 second film The…
Summary from the project README — github.com/get-mcp-ads/google-analytics-mcp-server
Distributed as npm, listed under Data & Analytics. Review our MCP security guide before granting access to real data.
Google Analytics 4 MCP server Understand what happens after the click. Explore traffic, conversions, funnels and property configuration through a read only MCP server. Watch the film · What's new · Install · Tool reference · Try hosted getmcpads Play the 45 second film The
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/get-mcp-ads/google-analytics-mcp-server. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/google-analytics/)
HTML
<a href="https://mcpnav.net/server/google-analytics/"><img src="https://mcpnav.net/badge/google-analytics.svg" alt="Listed on MCPNav" height="20"></a>