Skip to main content
Glama
Google Play Vitals MCP Server

Google Play Vitals MCP Server

by today-fo

Google Play Vitals MCP Server

PyPI version Python Version License: MIT MCP Protocol CI

Google Play Vitals MCP is a high-performance, token-efficient Model Context Protocol (MCP) server for the Google Play Developer Reporting API (Android Vitals).

Designed specifically for AI coding assistants and autonomous agents (Cursor, Claude Desktop, Claude Code, Codex, Windsurf, and Cline), it empowers AI to analyze Android production stability, diagnose ANRs (Application Not Responding), track crash trends, inspect de-obfuscated call stacks, and verify startup optimizations (such as AndroidX Baseline Profiles) with minimal context token consumption.


๐ŸŒŸ Key Highlights

  • Full-Spectrum Atomic Architecture: Complete, orthogonal coverage of Google Play Developer Reporting API endpoints (Viewer scope) โ€” release track discovery, AIP-160 error cluster search, stack drilldown, and anomaly monitoring.

  • Autonomous Chained Workflows: Empowers AI agents to autonomously identify the active production release, retrieve top Crash/ANR issues, and drill down into de-obfuscated stack traces in a natural chain without hardcoded assumptions.

  • Token Economy by Design (Token Saver): Upstream Google Developer Reporting APIs return deeply nested, verbose Protobuf responses. Our built-in compression engine strips 80%+ redundant metadata and automatically reassembles raw frame data into clean, single-line standard Java stack traces (at com.example.Foo.bar(Foo.java:42)).

  • Version Comparative Analysis (play_compare_versions): Quantifies release optimizations. Compare before-and-after versions (e.g. verifying ANR governance or Baseline Profile cold-start acceleration) with automated delta calculation and percentage improvement reporting.

  • Universal & Production Decoupled: Zero proprietary hardcoding. Supports any Android package, dynamic runtime parameters, environment variables, Service Account JSON files, JSON strings, or Google Application Default Credentials (ADC).

  • Zero-Latency In-Memory Hot Cache: Built-in 5-minute LRU cache prevents accidental quota exhaustion during multi-step AI reasoning.

  • Broad Agent Compatibility: Works out of the box with Cursor, Claude Desktop, Claude Code, Windsurf, Codex, and standard MCP JSON-RPC 2.0 stdio clients.


Related MCP server: Google Play Store MCP Server

๐Ÿ› ๏ธ MCP Tools Overview

1. Release & App Discovery

Tool Name

Type

Description

play_get_release_tracks

Release Discovery

Fetches active release tracks (PRODUCTION, BETA, ALPHA, INTERNAL) and serving releases with their release names and versionCodes. Essential for discovering latest stable releases.

play_list_accessible_apps

App Discovery

Lists all Google Play applications accessible by the configured GCP Service Account.

2. Error Issues & Stack Traces

Tool Name

Type

Description

play_search_error_issues

Issue Search

Searches error clusters (CRASH, ANR, or NON_FATAL) with full AIP-160 filter support (versionCode, isUserPerceived, appProcessState, custom_filter). Sorted by user impact and occurrences.

play_get_error_reports

Deep Drilldown

Fetches multi-device environmental samples and cleaned, de-obfuscated stack traces for an issue ID or resource name.

play_get_top_anr_summary

Quick Triage

One-shot aggregator for top ANR clusters and sample main-thread stack traces.

play_get_raw_error_reports

Raw Reports

Retrieves raw error reports and multi-device environment samples for an issue.

3. Vitals Metrics & Analytics

Tool Name

Type

Description

play_get_metric_trends

Metrics

Queries historical daily trends and overall averages for ANR, STARTUP (slow cold starts), or CRASH with optional version code filters.

play_compare_versions

Analytics

Compares metrics between two app versions (e.g. baseline 100 vs target 101) and computes net percentage improvement.

4. Monitoring & Diagnostics

Tool Name

Type

Description

play_list_anomalies

Anomaly Monitor

Retrieves sudden metric spikes and regression alerts detected by Google Play algorithms.

play_check_status

Diagnostics

Self-tests Python dependencies, GCP Service Account key presence, and environment readiness.


๐Ÿ“ MCP Prompts & Resources

Capability

Name / URI

Purpose

Prompt

analyze-anr-incident

Interactive prompt guiding AI to perform root-cause triage and generate architectural fixes.

Prompt

verify-baseline-profile

Automated audit prompt comparing release versions to quantify cold-start acceleration and ANR reductions.

Prompt

vitals-weekly-report

Executive prompt generating a weekly Android stability markdown dashboard.

Resource

vitals://status

Read-only JSON resource reporting connection health, credentials presence, and active configuration.


๐Ÿš€ Quick Start

1. Installation

Option A: Install via pip or uv

pip install google-play-vitals-mcp
# or
uv pip install google-play-vitals-mcp

Option B: One-click Install via Smithery (Cursor / Windsurf / Claude)

npx -y @smithery/cli install google-play-vitals-mcp --client cursor

Option C: Docker Container

docker run -i --rm -v ~/.config/gcp:/gcp -e GOOGLE_APPLICATION_CREDENTIALS=/gcp/key.json google-play-vitals-mcp

2. Authentication & Credentials

Google Play Developer Reporting API requires enterprise authentication via a Google Cloud Service Account authorized with "View app quality data" read-only permission:

Option A: Google Cloud Service Account JSON Key (Standard)

  1. Ask your Google Play Console administrator (Account Owner) for a Service Account JSON key with "View app quality data" read-only permission.

  2. Set the environment variable:

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/play_service_account.json"

Option B: CI/CD Plaintext JSON

export GOOGLE_PLAY_CREDENTIALS_JSON='{"type": "service_account", "project_id": "..."}'

๐Ÿค– AI Client Integration Guides

1. Cursor

Add to your project's .cursor/mcp.json or global Cursor settings:

{
  "mcpServers": {
    "google-play-vitals": {
      "command": "google-play-vitals-mcp",
      "args": [],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/play_service_account.json",
        "GOOGLE_PLAY_PACKAGE_NAME": "com.yourcompany.app"
      }
    }
  }
}

Note: You can also run with python -m google_play_vitals_mcp if installed in a specific virtual environment.

2. Claude Desktop

Add to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "google-play-vitals": {
      "command": "google-play-vitals-mcp",
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/play_service_account.json",
        "GOOGLE_PLAY_PACKAGE_NAME": "com.yourcompany.app"
      }
    }
  }
}

3. Claude Code CLI

Add the MCP server directly via CLI:

claude mcp add google-play-vitals -- \
  google-play-vitals-mcp \
  --package-name com.yourcompany.app \
  --credentials /path/to/play_service_account.json

4. Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "google-play-vitals": {
      "command": "google-play-vitals-mcp",
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/play_service_account.json",
        "GOOGLE_PLAY_PACKAGE_NAME": "com.yourcompany.app"
      }
    }
  }
}

๐Ÿ’ก Prompt Examples

Once configured, simply talk to your AI assistant:

  • "Find the top 10 Crashes and ANRs for our latest production release, along with de-obfuscated stack traces."

  • "Check Google Play Vitals connection status."

  • "Analyze the top ANR clusters in production right now and show me the problematic stack traces."

  • "Show me the daily ANR rate and slow startup rate for the last 14 days."

  • "Compare version 204000 against version 203000 to verify if our Baseline Profile and ANR fixes improved cold startup and reduced ANRs."

  • "Inspect issue apps/com.example/errorIssues/123456 and retrieve the raw device reports."


๐Ÿ’ป CLI Commands

The package includes a built-in CLI:

# Check configuration and credentials readiness
google-play-vitals-mcp check -p com.example.app -c /path/to/key.json

# Launch MCP stdio server manually
google-play-vitals-mcp run -p com.example.app

# Check version
google-play-vitals-mcp --version

๐Ÿ”ง Environment Variables

Variable

Description

GOOGLE_APPLICATION_CREDENTIALS

Path to Google Cloud Service Account JSON key file.

GOOGLE_PLAY_CREDENTIALS_JSON

Raw JSON string of Service Account credentials (useful for CI/CD or Cloud runtimes).

GOOGLE_PLAY_PACKAGE_NAME

Default Android application package name (e.g. com.example.app).

GOOGLE_PLAY_CACHE_TTL

Cache duration in seconds (default: 300).


๐Ÿงช Development & Testing

# Clone repository
git clone https://github.com/OldJii/google-play-vitals-mcp.git
cd google-play-vitals-mcp

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run unit tests
pytest -v

# Run linting
ruff check .
ruff format --check .

๐Ÿ“„ License

This project is licensed under the MIT License.

Available Tools

10 tools
play_check_statusC

Verify Google Play API dependencies, GCP Service Account credentials, and environment readiness.

Inputs: package_name, credentials_path.

play_compare_versionsA

[Version Comparison] Compare metrics between two app versions (e.g., before and after Baseline Profile / ANR fixes). Automatically calculates delta and percentage improvement.

Inputs: target_version (required), baseline_version (required), days, metric_type, +2 more.

play_get_error_reportsB

[Atomic Error Reports & Stack Traces] Fetch detailed multi-device sample reports and cleaned de-obfuscated stack traces for a given error issue ID or resource name.

Inputs: issue_id (required), page_size, page_token, package_name, +1 more.

play_get_raw_error_reportsA

[Deep-dive Drilldown] Fetch multi-device environmental samples and full stack traces for a specific error issue ID.

Inputs: issue_name (required), page_size, credentials_path.

play_get_release_tracksA

[Release Discovery] Fetch Google Play release tracks (PRODUCTION, BETA, ALPHA, INTERNAL) and active serving releases with their release names and versionCodes. Essential for automatically discovering the latest production version.

Inputs: package_name, credentials_path.

play_get_top_anr_summaryA

[One-shot Diagnosis] Retrieve top ANR error clusters along with affected user counts, occurrence rates, and representative cleaned main-thread stack traces. Eliminates back-and-forth round trips.

Inputs: limit, package_name, credentials_path.

play_list_accessible_appsB

[Account Apps Discovery] List all Google Play applications accessible by the configured GCP Service Account.

Inputs: page_size, page_token, credentials_path.

play_list_anomaliesA

[Anomaly Detection] List production metric anomalies and sudden regression spikes detected by Google Play algorithms for the application.

Inputs: page_size, page_token, package_name, credentials_path.

play_search_error_issuesB

[Atomic Issue Cluster Search] Search Google Play error clusters (CRASH, ANR, or NON_FATAL) with full AIP-160 filter support. Filter by specific versionCode, user-perceived state, or process state (FOREGROUND/BACKGROUND). Sorted by user impact and occurrences.

Inputs: error_type (required), page_size, page_token, package_name, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools target clearly distinct resources and actions (status, apps, release tracks, anomalies, searches, summaries, trends, version comparisons). The main ambiguity is between play_get_error_reports and play_get_raw_error_reports, which both fetch sample reports and stack traces for an issue ID; the only differentiator is 'cleaned/de-obfuscated' vs 'raw/full', a subtle distinction an agent may miss. Additionally, play_get_top_anr_summary overlaps conceptually with combining play_search_error_issues and play_get_error_reports, though its one-shot purpose is explicitly stated.

    Naming Consistency5/5

    Every tool uses the same play_ prefix followed by a consistent verb_noun snake_case pattern (check_status, get_release_tracks, list_anomalies, search_error_issues, etc.). Verb choices (get, list, search, compare, check) are appropriate and predictable for each action type. No deviations in style or casing.

    Tool Count5/5

    With 10 tools, the server is well-scoped for Google Play Vitals analysis. Each tool covers a meaningful slice of the domain (setup, discovery, error search, detailed reports, summarization, metrics, comparison), so none feel redundant or tacked on. The count sits comfortably in the ideal 3-15 range.

    Completeness4/5

    The surface covers the full diagnostic lifecycle: status check, app discovery, release track discovery, anomaly detection, error cluster search, detailed error reports, ANR summary, metric trends, and version comparison. Minor gaps exist, such as no direct tool to fetch a single anomaly's details or a general-purpose metric listing beyond the enumerated ANR/cold-start/crash trends, but these are workaroundable with existing tools.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language analysis of Perfetto traces to diagnose Android app performance issues like ANRs, jank, CPU hotspots, memory leaks, and lock contention without writing SQL queries.
      223
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to manage Google Play Console reviews and Android app releases, including replying to reviews, promoting releases, managing staged rollouts, and checking crash/ANR vitals.
      34
      550 npm
      2
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables managing releases, monitoring Android vitals, analyzing earnings and search terms, optimizing ASO, and preflighting store assets through natural language, with a confirmation gate before destructive writes.
      170
      49 PyPI
      2
      Apache 2.0