pypi google-analytics-mcpstdioMITupdated 21d ago
Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents.
google analytics mcp で何ができる?
Google Analytics 4 (GA4) MCP Server 📊
Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents.
🌐 Live Documentation & Web Portal: https://ga4.builditwithai.xyz
⚡ Quickstart
# 1-Line Universal Installer (Auto-configures Claude Desktop, Cursor, Claude Code, Antigravity, VS Code, Zed, Windsurf)
curl -fsSL "https://ga4.builditwithai.xyz/install" | bash
# Or run directly via your preferred runtime:
uvx google-analytics-mcp
uvx --from google-analytics-mcp ga4-mcp-server
python -m ga4_mcp
npx -y @surendranb/google-analytics-mcp
🤖 Client Setup
A. Claude Code (CLI)
claude mcp add google-analytics -- uvx google-analytics-mcp
B. Cursor & Google Antigravity (mcp.json)
{
"mcpServers": {
"google-analytics": {
"command": "uvx",
"args": ["google-analytics-mcp"]
}
}
}
C. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"google-analytics": {
"command": "uvx",
"args": ["google-analytics-mcp"],
"env": {
"GA4_PROPERTY_ID": "your_ga4_property_id",
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service_account.json"
}
}
}
}
D. VS Code (Cline / Roo Code / Continue)
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": ["-y", "@surendranb/google-analytics-mcp"]
}
}
}
🛠️ Tools & Capabilities
| Tool Name | Parameters | Description | Return Type |
|---|---|---|---|
get_ga4_data |
dimensions (list), metrics (list), date_ranges (list), limit (int) |
Runs multi-dimensional GA4 reports with automated metric totals and server-side aggregation. | JSON / Markdown |
list_accounts |
(none) | Lists all accessible Google Analytics accounts and permission levels. | JSON |
list_properties |
account_id (optional) |
Lists all GA4 properties associated with an account. | JSON |
get_property_metadata |
property_id (optional) |
Fetches complete dimension and metric schemas, custom definitions, and compatibility rules. | JSON |
run_realtime_report |
metrics (list), dimensions (list) |
Queries real-time active users and event counts from the last 30 minutes. | JSON |
search_skills |
query (string) |
Searches built-in GA4 analytical playbooks (e-commerce, channel attribution, bot filtering). | Markdown |
skill_read |
skill_name (string) |
Dynamically loads procedural skills and analytical guides from GitHub. | Markdown |
skills_list |
(none) | Lists all available live GA4 analytical skills. | JSON |
🧠 Dynamic Skills & Guided Playbooks
This server ships with built-in analytical recipes that load dynamically from GitHub:
traffic-diagnosis: Step-by-step root cause analysis for sudden traffic drops.channel-acquisition: Best-practice channel grouping and attribution modeling.ecommerce-analysis: Revenue, item purchase rate, and conversion funnel analysis.ai-referral-analysis: Tracks and isolates referral traffic from ChatGPT, Claude, Perplexity, and Gemini.
🔒 Telemetry & Privacy
This package collects anonymous, non-PII diagnostic telemetry (command executions, latency, error codes) to improve tool reliability. No queries, user credentials, personal data, source code, or environment variables are ever collected or stored.
You can opt out anytime by setting either of the following environment variables:
export DO_NOT_TRACK=1
# or
export MCP_TELEMETRY_OPT_OUT=1
📄 License
MIT License. See LICENSE for details.
インストール
google analytics mcp をクライアントに追加します。お使いのものを選んでください。
claude mcp add google-analytics-mcp -- uvx google-analytics-mcpcodex mcp add google-analytics-mcp -- uvx google-analytics-mcpamp mcp add google-analytics-mcp -- uvx google-analytics-mcp{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"google-analytics-mcp","command":"uvx","args":["google-analytics-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"google-analytics-mcp": {
"type": "local",
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"google-analytics-mcp": {
"command": {
"path": "uvx",
"args": [
"google-analytics-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
uvx google-analytics-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
スコア
39 / 100
情報不足
- ドキュメント25/25
- メンテナンス25/25
- 信頼性13/20
- 機能0/15
- 導入のしやすさ12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 14 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
バージョン履歴
| バージョン | 公開日 |
|---|---|
| 2.8.2最新 | 2026年7月27日 |
| 2.8.0 | 2026年7月15日 |
| 2.7.4 | 2026年7月12日 |
| 2.7.2 | 2026年7月11日 |
| 2.6.2 | 2026年7月9日 |
| 1.0.0 | 2025年9月9日 |