Atlas / MCP servers / ruchernchong / Google Analytics

Google AnalyticsCAUTION

mcp/ruchernchong/google-analytics

Model Context Protocol server for Google Analytics, enabling LLMs to fetch and analyze web analytics data

Verdict
CAUTION
Grade
C
Trust score
79 /100
Exposed tools
5 4r · 1w · 0d
Transport
stdio
License
MIT
Stars
70
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://mseep.ai/app/ruchernchong-mcp-server-google-analytics)

[](https://mseep.ai/app/41973db2-3e96-4d8b-b138-265f40fd5bab)

[](https://smithery.ai/server/mcp-server-google-analytics)

An MCP server implementation for accessing Google Analytics 4 (GA4) data, built using the Model Context Protocol TypeScript SDK.

Features

  • Get page view metrics with customizable dimensions
  • Track active and new users over time
  • Analyze specific events and their metrics
  • Monitor user behavior metrics (session duration, bounce rate)
  • Flexible date range selection for all queries

Prerequisites

  • Node.js 20 or higher
  • A Google Analytics 4 property.
  • A Google Cloud project with the Analytics Data API enabled.
  • A service account with credentials to access the API.

Setup and Configuration

To use this server, you need to configure authentication with Google Analytics. This is done using a service account.

1. Enable the Google Analytics Data API

  1. Go to the Google Cloud Console.
  2. Select the project you want to use.
  3. In the navigation menu, go to APIs & Services > Library.
  4. Search for "Google Analytics Data API" and enable it.

2. Create a Service Account

  1. In the Google Cloud Console, navigate to IAM & Admin > Service Accounts.
  2. Click "Create Service Account".
  3. Give the service account a name (e.g., "GA4 MCP Server").
  4. Click "Create and Continue".
  5. You can skip granting the service account access to the project.
  6. Click "Done".
  7. Find the service account you just created and click on the three dots under "Actions".
  8. Select "Manage keys", then "Add Key" > "Create new key".
  9. Choose JSON as the key t
Read from source at commit f7c40d344eb7OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add mcp-server-google-analytics --env GOOGLE_PRIVATE_KEY=${GOOGLE_PRIVATE_KEY} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "mcp-server-google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "GOOGLE_PRIVATE_KEY": "${GOOGLE_PRIVATE_KEY}"
      }
    }
  }
}
03

Exposed tools (5)

4 read · 1 write · 0 destructive.

ToolRiskDescription
getActiveUsersreadGet active users metrics for a specific date range
getEventsreadGet event metrics for a specific date range
getPageViewsreadGet page view metrics for a specific date range
getUserBehaviorreadGet user behavior metrics like session duration and bounce rate
runReportwriteRun a report to get analytics data
04

Trust audit

CAUTIONgrade C · trust 79/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)FAIL
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (3)

HIGHPrompt injection · prompt.hide_from_user · CWE-94, CWE-1427
README.md:57
6.  Assign the **"Viewer"** role. You do not need to notify the user.
Why it matters. asks the agent to act without the user's knowledge
LOWInventory / provenance · inv.hidden_file · CWE-1104
.releaserc.json
.releaserc.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@google-analytics/data, @modelcontextprotocol/sdk, dotenv, googleapis, @biomejs/biome, @commitlint/cli, @commitlint/config-conventional, @semantic-release/changelog
Why it matters. 19 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: instruction_override, no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha f7c40d344eb7full audit observations/trust-audit/mcp-server/ruchernchong__google-analytics.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07f7c40d344eb7CAUTIONC79first audit
06

Questions

What is the Google Analytics MCP server?

Model Context Protocol server for Google Analytics, enabling LLMs to fetch and analyze web analytics data

What tools does Google Analytics expose?

5 in total: 4 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Google Analytics safe to connect to an agent?

With care. The audit graded it C (79/100) and found 3 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does Google Analytics need?

It reads GOOGLE_PRIVATE_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Google Analytics run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-server-google-analytics at 1.1.0.

How current is this page?

The grade is for one exact copy of the source (f7c40d344eb7), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement