Metadata-Version: 2.4
Name: measure-analytics-mcp
Version: 0.3.0
Summary: AI-powered Measurement Operations for the Google analytics stack (GA4, GTM, BigQuery, Consent Mode, Server-Side, Data Quality, Alerts), over the Model Context Protocol.
Project-URL: Homepage, https://github.com/measure-mcp/measure-analytics-mcp
Project-URL: Repository, https://github.com/measure-mcp/measure-analytics-mcp
Author: Measure AI contributors
License: Apache-2.0
License-File: LICENSE
Keywords: bigquery,consent-mode,ga4,google-tag-manager,mcp,measureops,model-context-protocol
Requires-Python: >=3.12
Requires-Dist: google-analytics-admin>=0.22.0
Requires-Dist: google-analytics-data>=0.18.0
Requires-Dist: google-api-python-client>=2.100.0
Requires-Dist: google-cloud-bigquery>=3.25.0
Requires-Dist: measure-sdk<0.3,>=0.2
Requires-Dist: sqlalchemy>=2.0.30
Requires-Dist: sqlglot>=25.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.11.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Requires-Dist: types-requests; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.6.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.26.0; extra == 'docs'
Description-Content-Type: text/markdown

<div align="center">

# 📊 Measure Analytics MCP

**AI-powered Measurement Operations for the Google analytics stack, over the
[Model Context Protocol](https://modelcontextprotocol.io).**

A product of the [Measure MCP ecosystem](https://github.com/measure-mcp) ·
built on **[measure-sdk](https://github.com/measure-mcp/measure-sdk)**.

[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.12%2B-blue.svg)](pyproject.toml)
[![SDK](https://img.shields.io/badge/measure--sdk-%3E%3D0.1%2C%3C0.2-blue.svg)](https://github.com/measure-mcp/measure-sdk)

</div>

---

## What it is

Audit, analyse and monitor your Google analytics stack in natural language, from
Claude Desktop, ChatGPT or any MCP client. Seven focused MCP servers, each
consuming the shared **measure-sdk** (domain models, Health Score, OAuth, …):

| Server | Run with | Domain |
| --- | --- | --- |
| **BigQuery Analyst** | `measure-bigquery` | Cost-aware, read-only SQL. |
| **GA4 Intelligence** | `measure-ga4` | GA4 Admin + Data API audits. |
| **Consent Mode Auditor** | `measure-consent` | Consent Mode v2 compliance. |
| **Data Quality** | `measure-dataquality` | GA4-export health monitoring. |
| **GTM Operations** | `measure-gtm` | Web container audits + guarded writes. |
| **Server-Side Auditor** | `measure-sgtm` | sGTM config + Cloud Run health. |
| **Alerts Engine** | `measure-alerts` | Persistent cross-domain alerts. |

> Paid-media analysis (Google Ads, Meta, …) lives in the sibling product
> **[measure-paid-media-mcp](https://github.com/measure-mcp/measure-paid-media-mcp)**.

## Install

```bash
pip install measure-analytics-mcp     # pulls measure-sdk automatically
measure login                         # Google OAuth — that's all you need
measure doctor                        # see what's connected
measure-bigquery                      # start a server (stdio)
```

`measure login` (from the SDK) caches an OAuth token locally; every server then
works with **no `.env`** and no manual IDs. ADC / service accounts still work as a
fallback. Read-only by default; writes require explicit confirmation.

## Develop

```bash
git clone https://github.com/measure-mcp/measure-analytics-mcp.git
cd measure-analytics-mcp
uv sync --all-extras            # resolves measure-sdk from its pinned tag
uv run ruff check . && uv run mypy . && uv run pytest
```

This repo is a **single installable package** (`measure-analytics-mcp`) that
ships seven focused MCP servers under `src/` (`measure_ga4`, `measure_gtm`,
`measure_bigquery`, `measure_consent`, `measure_sgtm`, `measure_dataquality`,
`measure_alerts`). It depends only on **measure-sdk**.

## Ecosystem

| | |
| --- | --- |
| **measure-sdk** | Shared core: domain models, enums, Health Score, infra. |
| **measure-analytics-mcp** | This product. |
| **measure-paid-media-mcp** | Google Ads, Meta, LinkedIn, TikTok, CM360. |

See **[CHANGELOG.md](CHANGELOG.md)** · **[ROADMAP.md](ROADMAP.md)** ·
**[SECURITY.md](SECURITY.md)** · **[CONTRIBUTING.md](CONTRIBUTING.md)**.

## License

[Apache-2.0](LICENSE).
