Skip to main content
Glama
play-console-mcp-server

play-console-mcp-server

by inov8ing
README.md
# play-console-mcp-server (v2.0.0)

Fast, security-hardened Model Context Protocol (MCP) server for **Google Play Console**. Built for solo Android/Flutter developers with one-click Windows installation, sub-second tool loading, client caching, and full Play Console automation.

## One-Click Setup (Windows)

1. Double-click **`Install-PlayConsoleMCP.cmd`** in this folder (or run `npm run setup -- --key "C:\path\to\service-account.json"`).
2. It automatically verifies Node.js 20+, builds if needed, lets you pick (or auto-detects) your Google Cloud Service Account JSON key, writes your Antigravity `mcp_config.json` using the absolute `node.exe` path, and runs live API diagnostics (`--doctor`).
3. Click **Reload MCP Servers** (or restart your IDE/client).

Also includes [`manifest.json`](./manifest.json) for MCPB one-click desktop extension packaging.

## Tools (12)

| Tool | Purpose |
| :--- | :--- |
| `play_list_apps` | List accessible Play Console apps (`apps.search`) with optional search filter & active tracks |
| `play_get_app_status` | Inspect active releases, `versionCode`s, statuses, and rollout fractions across tracks |
| `play_release_build` | Atomic edit: upload `.aab`/`.apk` + optional ProGuard `mapping.txt` + release notes -> track -> commit (or `dry_run`) |
| `play_promote_release` | Promote a release between tracks (`internal` -> `closed` -> `production`) or adjust staged rollout % |
| `play_get_closed_testers` | Read Google Group tester lists on a closed testing track |
| `play_manage_closed_testers` | Add, remove, or replace Google Groups on a closed testing track |
| `play_get_listings` | Fetch localized store listing metadata |
| `play_update_listing` | Patch localized title/descriptions/video and upload screenshots or icons |
| `play_preflight_audit` | Offline linear-time scan of `build.gradle(.kts)`, `AndroidManifest.xml`, and `pubspec.yaml` |
| `play_check_vitals` | Query Google Play Developer Reporting API (`v1beta1`) for anomalies, crash rates, and ANR rates |
| `play_list_reviews` | Fetch recent user reviews with pagination (`page_token`) |
| `play_reply_review` | Post or update a public developer reply to a user review |

## Performance & Security Architecture

- **Lazy Google SDK Loading**: Replaces the monolithic `googleapis` package with targeted `@googleapis/androidpublisher` and `@googleapis/playdeveloperreporting`, loaded on demand via dynamic `import()` so server boot and `tools/list` never parse 200+ unused Google APIs.
- **Client & Key Caching**: Reuses authenticated Google API clients keyed by `(realpath, mtimeMs, size)` with automatic key-rotation invalidation and 30s/120s API/upload timeouts.
- **Zero Known Vulnerabilities**: Updated `@modelcontextprotocol/sdk`, `zod@4`, and `@googleapis/*` (`0` `npm audit` findings).
- **Hardened Boundaries**:
  - `service_account_path` runtime overrides are confined to configured key directories (`GOOGLE_PLAY_SERVICE_ACCOUNT_KEY` dir + optional `PLAY_MCP_ALLOWED_KEY_DIRS`) and validated as regular `.json` service-account files.
  - Upload paths and `project_path` validate regular file/directory types, extensions, and size limits (`PLAY_MCP_WORKSPACE_ROOT` optional confinement).
  - Strict Zod regexes on `package_name`, `track`, `language`, and `review_id` prevent path-parameter injection.
  - `redactSensitiveText()` scrubs OAuth tokens, Bearer headers, and PEM private keys from errors and logs.
  - ReDoS-free linear-time XML/Gradle preflight scanners.

## Diagnostics & CLI

```bash
npm run build
npm run verify
npm run doctor
npm run setup -- --key "C:\path\to\service-account.json" --client antigravity
```