google-play-analytics-mcp

google-play-analytics-mcp

An MCP server that exposes Google Play Console analytics to AI agents, including store-listing acquisitions by traffic source, installs, uninstalls, ratings, crashes, subscriptions, and reviews by reading bulk CSV reports from Cloud Storage.

Category
访问服务器

README

google-play-analytics-mcp

An MCP server that exposes Google Play Console analytics to AI agents — store-listing acquisitions by traffic source (Explore / Search / Ads & referrals), installs & uninstalls, ratings, crashes, subscriptions and reviews.

It reads the bulk CSV reports that Google Play Console automatically exports to your developer Cloud Storage bucket (pubsite_prod_rev_*), using a Google Cloud service account (fully non-interactive — no browser login, no token refresh dance). Reports are monthly files of daily rows; the server discovers, downloads, decodes, parses and aggregates them behind a small set of tools.

Play Console publishes these reports with a lag of ~1–2 days, so the freshest data is usually yesterday or the day before.

Why this exists

The Play Console UI shows acquisition data (how many people found your app by browsing vs searching the Play Store, and how well your store listing converts visitors to installers), but there's no convenient API for an agent to read it. The underlying data, however, is exported as CSV to a Cloud Storage bucket. This server turns that bucket into typed, queryable tools — the Android counterpart to Apple's "App Store Browse vs Search" source-type analytics.

Tools

Tool What it returns
health_check Verifies auth + bucket connectivity; lists top-level report prefixes
list_apps Configured aliases + packages actually present in the bucket
list_report_families Every report family, its dimensions and description
get_acquisitions_by_traffic_source Store acquisitions split by Google Play Explore / Search / Ads & referrals, with share-of-total %
get_acquisitions_by_country Store acquisitions by country
get_store_conversion Store-listing visitors, acquisitions & visitor→install conversion rate by traffic source or country (current)
get_search_terms Google Play search terms with visitors, acquisitions & CVR (low-volume terms k-anonymized into 'Other')
get_utm_performance UTM source / campaign performance (Ads & referrals) with visitors, acquisitions & CVR (low-volume values k-anonymized)
get_store_listing_conversion Legacy visitors/CVR + retention (historical: ≤2021-06 — use get_store_conversion for current data)
get_buyers Users who purchased within 7 days of install, by channel/country (historical: ≤2021-06)
get_installs Installs / uninstalls / active devices, daily or by dimension
get_ratings Average rating over time or by dimension
get_crashes Crashes & ANRs, daily or by dimension
get_subscriptions New / cancelled / active subscriptions by country
get_reviews Individual user reviews (rating + text)
fetch_raw_report Escape hatch — raw parsed rows for any family/dimension

Common parameters: package (an alias or a full package name), start_date / end_date (ISO YYYY-MM-DD, default = last 30 days), and per-tool dimension, daily, top.

Report families & data coverage

Family Bucket prefix Current data? Dimensions
store_performance stats/store_performance/ (total_store_performance_*) ✅ live traffic_source, country
store_conversion stats/store_performance/ (store_performance_*) ✅ live traffic_source, country — adds visitors + conversion rate
installs stats/installs/ ✅ live overview, country, device, language, app_version, os_version, carrier
ratings stats/ratings/ ✅ live same as installs
crashes stats/crashes/ ✅ live overview, device, os_version, app_version
subscriptions financial-stats/subscriptions/ ✅ live country
reviews reviews/ ✅ live
retained_installers acquisition/retained_installers/ ⚠️ ≤ 2021-06 channel, country, play_country, utm_tagged
buyers_7d acquisition/buyers_7d/ ⚠️ ≤ 2021-06 channel, country, play_country

Google discontinued the retained_installers and buyers_7d bulk exports after June 2021 (and ratings_v2 was a short-lived 2022–2023 schema). Their store-listing conversion rate was replaced by the current store_conversion family (visitors + CVR); acquisitions live in store_performance. The historical families remain queryable for backfill.

Prerequisites

  1. A Google Play Console account with reports being exported to a Cloud Storage bucket (this is on by default; the bucket is pubsite_prod_rev_<number>).
  2. A Google Cloud service account with read access to that bucket, plus its JSON key. Two ways to grant access:
    • Play Console link (recommended): Play Console → Users and permissions → invite the service-account email → grant View app information and download bulk reports; or
    • Bucket IAM: grant the service account roles/storage.objectViewer on the pubsite_prod_rev_* bucket in the Google Cloud console.
  3. Python 3.11+.

Install

git clone git@github.com:desunit/google-play-analytics-mcp.git
cd google-play-analytics-mcp
python3 -m venv .venv
./.venv/bin/pip install -r requirements.txt

Configure

The server is configured entirely through environment variables (no secrets in the repo):

Variable Required Meaning
GOOGLE_PLAY_SA_JSON yes* Path to the service-account key JSON
GOOGLE_PLAY_REPORTS_BUCKET yes Reports bucket, e.g. pubsite_prod_rev_1234567890
GOOGLE_PLAY_APP_ALIASES no JSON object of {"alias": "com.pkg"}
GOOGLE_PLAY_CACHE_DIR no Download cache dir (default ~/.cache/google-play-analytics-mcp)

* If GOOGLE_PLAY_SA_JSON is unset, the server also looks for google-play.json in ~/.config/google-play-analytics-mcp/ or next to server.py. Never commit the key — it's gitignored.

Finding your bucket name: Play Console → Download reports → open any report category → Copy Cloud Storage URI. The bucket is the part between gs:// and the first /.

App aliases (optional): copy apps.example.jsonapps.json (gitignored) to map short names like my-app to package names, or set GOOGLE_PLAY_APP_ALIASES. Full package names always work without aliases.

Register with your MCP client

Copy .mcp.json.example and fill in absolute paths, or add to your client config:

{
  "mcpServers": {
    "google-play-analytics": {
      "command": "/abs/path/google-play-analytics-mcp/.venv/bin/python",
      "args": ["/abs/path/google-play-analytics-mcp/server.py"],
      "env": {
        "GOOGLE_PLAY_SA_JSON": "/abs/path/service-account.json",
        "GOOGLE_PLAY_REPORTS_BUCKET": "pubsite_prod_rev_XXXXXXXXXXXXXXXX"
      }
    }
  }
}

For Claude Code, the equivalent one-liner:

claude mcp add google-play-analytics \
  -e GOOGLE_PLAY_SA_JSON=/abs/path/service-account.json \
  -e GOOGLE_PLAY_REPORTS_BUCKET=pubsite_prod_rev_XXXXXXXXXXXXXXXX \
  -- /abs/path/.venv/bin/python /abs/path/server.py

Verify

export GOOGLE_PLAY_SA_JSON=/abs/path/service-account.json
export GOOGLE_PLAY_REPORTS_BUCKET=pubsite_prod_rev_XXXXXXXXXXXXXXXX
./.venv/bin/python -c "import server, json; print(json.dumps(server.health_check(), indent=2))"

A healthy response lists your bucket's top-level prefixes (acquisition/, stats/, financial-stats/, reviews/, …).

Example questions it answers

  • "What share of my Play Store installs come from browsing (Explore) vs Search?"get_acquisitions_by_traffic_source
  • "Which countries drive the most store acquisitions this month?"get_acquisitions_by_country
  • "Which Google Play search terms bring visitors, and which convert best?"get_search_terms (branded terms typically convert far higher than generic ones)
  • "Which UTM campaigns and sources drive store installs?"get_utm_performance (e.g. <source> / <campaign>)
  • "What's my visitor→install conversion rate by country?"get_store_conversion(dimension="country")
  • "How do installs break down by language?"get_installs(dimension="language")
  • "What's my daily install and uninstall trend?"get_installs(daily=True)
  • "How is my rating trending?"get_ratings
  • "Which app versions crash most?"get_crashes(dimension="app_version")

How it works

service account key ──► google-auth ──► short-lived Storage token
                                             │
        GCS JSON API: list + download objects under pubsite_prod_rev_*
                                             │
     BOM-aware decode (UTF-16 / UTF-8) ──► CSV parse ──► date-filter ──► aggregate

Downloaded report files are cached under GOOGLE_PLAY_CACHE_DIR so repeat queries don't re-fetch. Object listings are cached per process.

Security

  • No credentials are stored in this repository. The service-account key, the bucket name and any app aliases are all supplied at runtime via env vars or gitignored local files (google-play.json, apps.json).
  • The service account only needs read-only Storage scope (devstorage.read_only). This server never writes to your bucket or Play Console.
  • Downloaded reports (which contain your business data) are cached outside the repo tree by default (~/.cache/...).

Author

Built by Songtive@desunit on X.

License

MIT © Songtive

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选