analytics-mcp
MCP server for Google Analytics
What it is and what it does
analytics-mcp is an MCP (Model Context Protocol) server that bridges Google Analytics APIs to large language models like Claude and Gemini. It wraps the Google Analytics Admin API and Google Analytics Data API, exposing them as tools that an LLM can call to query account summaries, property details, run standard and funnel reports, retrieve real-time data, and fetch custom dimensions and metrics.
The package is designed to run as a local server that integrates with Gemini CLI, Gemini Code Assist, or Claude Code. Once configured with Google Cloud credentials and added to your LLM client's MCP server list, it allows you to ask natural-language questions about your analytics data directly within your AI assistant—for example, asking for the most popular events in the last 180 days or details about signed-in users. It requires Python 3.10 or later and depends on google-auth, google-analytics-data, google-analytics-admin, mcp, google-adk, and httpx.
Use it for:
- Ask an LLM for a summary of your Google Analytics accounts and properties without leaving your IDE or chat interface.
- Query analytics reports and funnel data through natural language prompts in Gemini or Claude.
- Retrieve real-time analytics metrics and custom dimensions/metrics for a property via LLM conversation.
- Automate analytics exploration and reporting by having an LLM analyze your GA4 data and suggest insights.
- Integrate analytics queries into AI-assisted code development workflows within Gemini Code Assist.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Runs an MCP server that exposes Google Analytics Admin and Data APIs as tools for LLMs, enabling queries about accounts, properties, reports, and real-time analytics data.
Yes, if you use Gemini CLI, Gemini Code Assist, or Claude Code and want to query Google Analytics through natural language. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and low install friction. However, it requires Google Cloud setup (enabling APIs, configuring credentials) and is not a standalone library—it only works as an MCP server within a compatible LLM client.
Install
analytics-mcp on PyPI
pip
pip install analytics-mcpuv
uv add analytics-mcppoetry
poetry add analytics-mcpInstalling analytics-mcp
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-08-07 with recent releases. Requires Python 3.10 or later and depends on six Google-authored packages (google-analytics-data, google-analytics-admin, google-auth, mcp, google-adk, httpx), all standard infrastructure.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both commercial and open-source projects.
Quickstart
pip install analytics-mcp
# Then configure credentials via Application Default Credentials (ADC)
# and add to ~/.gemini/settings.json or Claude MCP config:
# {
# "mcpServers": {
# "analytics-mcp": {
# "command": "pipx",
# "args": ["run", "analytics-mcp"],
# "env": {
# "GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON",
# "GOOGLE_PROJECT_ID": "YOUR_PROJECT_ID"
# }
# }
# }
# }
# Then use in Gemini CLI or Claude Code with prompts like:
# "what are the most popular events in my Google Analytics property in the last 180 days?"
Requires Google Cloud project with Google Analytics Admin API and Google Analytics Data API enabled, plus Application Default Credentials configured with analytics.readonly scope. Intended for use as an MCP server within Gemini CLI, Gemini Code Assist, or Claude Code—not a standalone library.
Verify before relying
- Whether the package works with Python versions beyond 3.13 (classifiers list 3.10–3.13 but requires_python only specifies >=3.10)
- Performance characteristics when running large or complex analytics queries through the MCP interface
- Whether all Google Analytics Admin and Data API features are exposed or only a subset
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — google-analytics-data, google-analytics-admin, google-auth, mcp, google-adk, httpx |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,139/month — #13,101 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: analytics_mcp-0.7.0-py3-none-any.whl
Keywords: google analytics, analytics, mcp, ga4
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
notebooklm-mcp-cliProvides CLI and MCP server access to Google…
permissive · top 15,000 on PyPI
workspace-mcpWorkspace MCP is an MCP server that exposes…
permissive · top 15,000 on PyPI
universal-analytics-python3Sends event and pageview data to Google…
permissive · top 15,000 on PyPI
astro-airflow-mcpProvides AI assistants with programmatic access…
unclear · top 15,000 on PyPI
wikipedia-mcpExposes Wikipedia search, article retrieval,…
permissive · top 15,000 on PyPI
google-analytics-adminPython client library for the Google Analytics…
permissive · top 1,000 on PyPI
nextcloud-mcp-serverProvides a Model Context Protocol (MCP) server…
agpl · top 15,000 on PyPI
postgres-mcpA Model Context Protocol server that connects…
permissive · top 15,000 on PyPI
mcp-server-odooAn MCP server that bridges AI assistants like…
copyleft · top 5,000 on PyPI
secopsA Python SDK for interacting with Google…
permissive · top 15,000 on PyPI