Run TestFlight from Claude Code
A build lands in App Store Connect. Ask Claude Code to give it to your internal and beta groups, write What to Test from the commits, answer export compliance, and later pull the crash reports testers sent.
Setup checked October 2026 against Claude Code MCP docs, permissions
Connect Claude Code once
01 · Add the server
Run it in any terminal. --scope user makes MetaRun available in every project; leave it out to limit it to the current one.
claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp02 · Sign in
In a Claude Code session, run /mcp, choose metarun and authenticate. MetaRun opens in your browser, where you pick read-only or read and change. From a plain shell, claude mcp login metarun does the same.
/mcp03 · Optional: add the skills too
The MetaRun plug-in bundles the same server with six mission skills (release handoff, worldwide pricing, localization, review inbox, ASO audit, store media).
claude plugin marketplace add metarun/metarun-skills
claude plugin install metarun-skills@metarunPrefer a personal access token (scripts, CI)?
Add the server with a token
Mint a personal access token in MetaRun under Settings, MCP. It's shown once and can be revoked any time.
claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp \
--header "Authorization: Bearer $METARUN_TOKEN"Or share it with your team in .mcp.json
Project scope writes .mcp.json at the repo root. Claude Code expands ${METARUN_TOKEN} from each person's environment, so the token itself is never committed.
{
"mcpServers": {
"metarun": {
"type": "http",
"url": "https://metarun.dev/api/mcp",
"headers": { "Authorization": "Bearer ${METARUN_TOKEN}" }
}
}
}What Claude Code handles here
TestFlight work comes in small pieces at awkward times: a build finishes processing while you're in the middle of something, someone has to add it to the right groups, the What to Test field is empty again, and tester feedback sits in a separate tab.
Claude Code can do each piece through MetaRun, in the same session where the build was made. Crash feedback and screenshots from testers come back as data the agent can match against your code.
Before you start
- A build uploaded from Xcode, Xcode Cloud, fastlane or CI.
- Tester groups set up in App Store Connect.
- An answer for export compliance, or ITSAppUsesNonExemptEncryption in Info.plist.
How it runs
- 01
Wait for processing
Claude Code reads the build list and reports when the build is processed. A build still processing can't be assigned.
- 02
Clear export compliance
If the build has no encryption answer, the agent previews the declaration, or reuses an existing one.
- 03
Assign and describe
Each group assignment and the What to Test text is its own preview.
- 04
Read what testers found
Crash feedback, crash logs and screenshot feedback come back as structured data, ready to compare with the code.
An example session in Claude Code
When build 312 finishes processing, give it to Internal and Beta Club, with What to Test written from the commits since build 309.
- apple_list_buildsBuild 312 processed. No export compliance answer yet.
- apple_preview_declare_build_encryptionPreview: exempt encryption, assigned to build 312. Not revertible.
- Claude Code asks before running apple_apply_declare_build_encryption. You read the preview above and approve.
- apple_apply_declare_build_encryptionDeclared.
- apple_preview_assign_build_to_groupPreview: build 312 to the Beta Club group.
- Claude Code asks before running apple_apply_assign_build_to_group. You read the preview above and approve.
- apple_apply_assign_build_to_groupAssigned to Beta Club.
- apple_preview_set_what_to_testPreview: What to Test in English, from the commits since build 309.
Illustrative: your apps, versions and numbers will differ. The tool names and their order are real.
The MetaRun tools Claude Code calls
| Tool | What it does |
|---|---|
| apple_list_buildsread | Builds with version, build number, processing state and expiry. |
| apple_list_testflight_groupsread | Internal and external tester groups. |
| apple_preview_assign_build_to_grouppreview + apply | Give a build to a tester group. |
| apple_preview_set_what_to_testpreview + apply | What to Test notes for a build, per language. |
| apple_preview_declare_build_encryptionpreview + apply | Answer export compliance so the build can be tested. |
| apple_list_testflight_crash_feedbackread | Crash reports testers submitted, with their comments. |
| apple_get_crash_logread | The crash log behind a tester's report. |
| apple_list_testflight_screenshot_feedbackread | Screenshots and comments testers sent from the app. |
| apple_preview_expire_buildpreview + apply | Stop testing a build before its 90 days are up. |
Each preview has an apply twin (the same name with apply instead of preview) that only runs with the confirm token from a fresh preview, and refuses if App Store Connect changed in between. MetaRun tools save to your MetaRun workspace only (studio projects, tracked keywords), never to Apple.
What Apple enforces, and how MetaRun handles it
Builds expire after 90 days
A TestFlight build stops working 90 days after upload. Expiring one early is a preview and apply like any other change.
External testing needs Beta App Review
The first build of a version sent to external testers goes through Beta App Review. Internal testers get it as soon as it's processed.
Export compliance can't be undone
Declaring a build's encryption is permanent for that build, so the preview says it's not revertible. Setting ITSAppUsesNonExemptEncryption in Info.plist answers it at upload instead.
MetaRun doesn't upload builds
Xcode, Xcode Cloud, fastlane or your CI uploads the build. MetaRun takes over once it's in App Store Connect.
What to ask Claude Code
- Ask Claude Code: When build 312 finishes processing, give it to Internal and Beta Club, with What to Test written from the commits since build 309.
- Ask Claude Code: Pull this week's TestFlight crash feedback and match the stack traces to files in Sources/.
- Ask Claude Code: Expire every build older than 2.3.
Run it from a script with Claude Code
claude -p runs one request with no interactive session. The browser sign-in can't complete inside -p, so sign in once interactively first, or configure the server with a personal access token in CI. Tools missing from --allowedTools are refused in -p mode.
Read-only check, safe to schedule
claude -p "List the latest five builds of com.example.app with processing state, expiry date and the tester groups each one is in. Read only." \
--allowedTools "mcp__metarun__apple_list_builds,mcp__metarun__apple_list_testflight_groups,mcp__metarun__apple_preview_assign_build_to_group,mcp__metarun__apple_preview_set_what_to_test,mcp__metarun__apple_preview_declare_build_encryption,mcp__metarun__apple_list_testflight_crash_feedback,mcp__metarun__apple_get_crash_log,mcp__metarun__apple_list_testflight_screenshot_feedback,mcp__metarun__apple_preview_expire_build"Only reads and previews are on that list, so nothing can reach App Store Connect unattended. Run applies in an interactive session where Claude Code can ask you.
How Claude Code asks before a change
Claude Code asks before every MCP tool call by default. You can allow a tool for the session or permanently; allow rules look like mcp__metarun__apple_list_versions for one tool, and mcp__metarun__* allows the whole server, applies included. Allowing reads and previews is reasonable. Leave the apply tools on ask: that prompt is the confirm step for every App Store change.
Frequently asked questions
Can Claude Code upload a build to TestFlight?
Not through MetaRun: build upload belongs to Xcode, Xcode Cloud, fastlane or your CI. Everything after the upload (compliance, groups, notes, feedback) works through MetaRun.
Can it read crash reports from testers?
Yes. apple_list_testflight_crash_feedback returns the reports with tester comments and apple_get_crash_log returns the log, which Claude Code can match against your code.
Does it work with external tester groups?
Yes, internal and external groups both. The first build of a version to external testers still goes through Apple's Beta App Review.
What does export compliance mean here?
Apple's question about whether the build uses non-exempt encryption. The agent can answer it per build, or you can set ITSAppUsesNonExemptEncryption in Info.plist so Apple never asks.
How do I connect Claude Code to App Store Connect?
Run claude mcp add --transport http --scope user metarun https://metarun.dev/api/mcp, then run /mcp in Claude Code and sign in to MetaRun in your browser. After that, ask for "testflight" in plain words and Claude Code picks the MetaRun tools.
Does Claude Code see my App Store Connect key?
No. Your App Store Connect API key stays envelope-encrypted on MetaRun's servers and is decrypted per request. Claude Code holds a MetaRun token that you can revoke in Settings at any time.
More with Claude Code
Claude Code
Submit for review
Attach the build, clear export compliance, run the readiness sweep, submit.
OpenClaude Code
App Privacy and compliance
Turn your privacy manifests into App Privacy answers; set age rating and export compliance.
OpenClaude Code
Release notes
Write What's New from your changelog and stage it in every language.
OpenClaude Code
Phased release
Choose how an approved version goes out, then pause, resume or finish a phased rollout.
OpenTestFlight with another agent
In depth: App Store Connect MCP server
Agent access
14-day free trial with agent access. No credit card. Your Apple key stays encrypted on MetaRun.