codemagic-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP (Model Context Protocol) server that gives AI agents a unified surface over **Codemagic CI/CD** and **App Store Connect / Google Play**, enabling a complete mobile app delivery pipeline — from onboarding a repository through building, signing, and publishing — driven by conversation.
What it does
The server exposes tools across five domains:
- **Codemagic** — list teams and apps, trigger builds, wait for results, retrieve artifacts, fetch build logs, manage variable groups, caches, and webhooks
- **App Store Connect** — manage TestFlight, upload and submit builds, set listing text and screenshots, validate, submit, and release to the App Store
- **Google Play** — publish AABs, promote releases, manage staged rollouts, set listing text and screenshots, read and reply to user reviews
- **Testing** — parse JUnit XML test results from any Codemagic build; get a pass/fail/error/skip summary with per-failure details
- **Cross-store** — validate localized release notes against platform char limits and BCP-47 locale codes
The intended end-to-end flows are:
**iOS:** list_asc_builds → get_yaml_template → trigger_build → wait_for_build → upload_build_to_asc → set_version_metadata → validate_app_submission → submit_for_app_store_review → release_version
**Android:** get_latest_build_number → get_yaml_template → trigger_build → wait_for_build → upload_to_google_play → promote_google_play_release
Prerequisites
- **Node.js** 20 or 22 (LTS)
- **asc CLI** — asccli.sh — required for App Store Connect tools
- **google-play CLI** — part of codemagic-cli-tools — required for Google Play tools
Environment variables
Required
| Variable | Description |
|----------|-------------|
| CODEMAGIC_API_TOKEN | Your Codemagic API token. Found in Codemagic → Account settings. |
App Store Connect tools (iOS)
| Variable | Description |
|----------|-------------|
| ASC_KEY_ID | App Store Connect API key ID |
| ASC_ISSUER_ID | App Store Connect issuer ID |
| ASC_PRIVATE_KEY_B64 | Base64-encoded .p8 private key (base64 -i AuthKey_XXXX.p8) |
| ASC_BYPASS_KEYCHAIN | Set to 1 to force env var auth instead of the macOS keychain |
Google Play tools (Android)
| Variable | Description |
|----------|-------------|
| GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS | Raw JSON content of your Google Play service account key file |
For the Google Play credentials you can use the @file: prefix to avoid pasting JSON inline:
Installation
Using npx (recommended)
No installation needed. Add the server to your MCP client config with npx and it downloads and runs automatically:
See the Claude Desktop section below for the full config.
Global install
If you prefer a permanent install instead of npx:
Then use codemagic-mcp as the command in your MCP client config:
Development
To build from source:
Then use the local path in your MCP config — see Running from a local clone below.
Running
MCP Inspector (development / testing)
Set the required environment variables in your shell, then:
Claude Desktop
Add to your claude_desktop_config.json:
**If installed from npm**
**If running from a local clone (development):**
The config file is at:
- **macOS:** ~/Library/Application Support/Claude/claude_desktop_config.json
- **Windows:** %APPDATA%\Claude\claude_desktop_config.json
Using with Claude Desktop
Connecting the server
To verify the server is connected, open a new conversation and ask: *"ping the codemagic mcp server"*. If connected, Claude will call the ping tool and respond with "Codemagic MCP server is running." If not connected, check that the path in args is correct and that all required environment variables are set, then restart Claude Desktop with Cmd+Q (not just closing the window).
If the server does not appear, check that the CODEMAGIC_API_TOKEN environment variable is set correctly in the config and that the path to dist/index.js is absolute and correct.
Workflow prompts
Once connected, type / in the Claude Desktop input field to open the command picker. You will see five workflow prompts from this server: