xcode-cloud-mcp
An MCP server for Xcode Cloud that discovers products/workflows, inspects and edits workflow configuration, starts and monitors builds, and retrieves logs, issues, tests, artifacts, and TestFlight build handoff data via the App Store Connect API.
List Xcode Cloud products and workflows with automatic pagination.
Inspect full workflow configuration, including general settings, environment, start conditions, actions, and enabled state.
Start exactly one build run for a workflow; this is externally side-effecting and non-idempotent, and individual build cancellation is not supported.
List or scan recent build runs by workflow, status, limit, and exact source commit SHA, including source provenance.
Resolve externally eligible TestFlight builds linked to an exact run, workflow, and app while verifying branch/SHA provenance.
Retrieve build issue counts, compact or materialized build logs, test summaries, failed tests, and UI test artifact download metadata.
Clean up locally saved log directories by build run or retention age.
Edit workflows explicitly: enable/disable, update name/description/clean behavior, update start conditions, replace action lists, and configure a manual release-candidate preset.
Integrates with Apple's Xcode Cloud service to discover products, inspect and edit workflows, monitor builds, and retrieve build issues, logs, test summaries, and UI test artifacts via the App Store Connect API.
Provides tools for managing Xcode Cloud workflows, builds, logs, test results, and artifacts, enabling automated CI/CD monitoring and configuration through the App Store Connect API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xcode-cloud-mcp Show me my Xcode Cloud products."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xcode-cloud-mcp
MCP server for discovering Xcode Cloud products, inspecting and editing workflows, starting and monitoring build runs, and retrieving build issues, logs, test summaries, and UI test artifacts through the App Store Connect API.
Features
Feature | Tool(s) | Example use | Example return |
Discover products |
| "Show me the Xcode Cloud products available in this account." |
|
Discover workflows |
| "List the workflows for product |
|
Inspect workflow configuration |
| "Show me the full workflow details for |
|
Monitor running or recent builds |
| "Show me the running builds for workflow |
|
Resolve linked TestFlight build IDs |
| "Verify this release run and find its iOS and tvOS builds for TestFlight." | verified run provenance and per-platform readiness |
Start an Xcode Cloud build |
| "Start one build for workflow | newly created build-run ID, number, and execution state |
Enable or disable a workflow |
| "Disable workflow |
|
Update name, description, or clean mode |
| "Rename workflow |
|
Update start conditions explicitly |
| "Change workflow | updated |
Replace the workflow action list |
| "Remove the archive action from workflow |
|
See build health quickly |
| "What went wrong in the latest failing build for workflow |
|
Read compact build log summaries |
| "Retrieve logs of build |
|
Materialize logs for local grep |
| "Download the logs for build |
|
Summarize test outcomes |
| "Summarize the test results for the latest failing build." |
|
Jump straight to failed tests |
| "What tests failed in build |
|
Retrieve UI test artifacts |
| "Show me the screenshots and videos from the latest failing UI test run." |
|
Clean up local temp files |
| "Remove saved logs older than 24 hours." |
|
Build lookup is workflow-scoped. Retrieval tools accept a direct buildRunId, or a workflowId plus buildNumber, or a workflowId plus buildSelector: "latest" | "latestFailing".
list_products and list_workflows automatically paginate through all results.
list_build_runs supports status: "all" | "failed" | "succeeded" | "running" | "pending" and an optional exact sourceCommitSha filter. The limit (default 20, maximum 500) bounds the runs scanned before filtering. Each result includes the full source commit SHA, canonical source ref and its resource ID when available, the PR flag, and the start reason. For a SHA lookup with no results, check scan.hasMore for older runs and scan.unverifiedSourceCount for scanned runs whose SHA was unavailable. If several runs match, use the intended exact run ID for the handoff.
Related MCP server: appstore-release-mcp
Build Start Behavior
start_build starts exactly one build run through Apple's public POST /v1/ciBuildRuns endpoint. workflowId is required. The optional sourceBranchOrTagId and pullRequestId values are App Store Connect resource IDs, not branch names, tag names, or pull-request numbers; buildRunId may be a bare resource ID or an xcode-cloud://build-run/... URI. The optional clean value applies only to the new run and does not modify the workflow.
The operation is externally side-effecting and non-idempotent: repeating the same invocation can create another build. The server sends one POST and does not automatically retry an ambiguous failure; inspect list_build_runs before deciding whether to try again.
Apple's public App Store Connect API does not expose an operation for canceling an individual Xcode Cloud build run. This server therefore provides no cancellation tool and does not disable or otherwise mutate a workflow as a cancellation surrogate.
Requirements
Node.js
20+App Store Connect API credentials with access to Xcode Cloud
Environment Variables
Primary names:
APPSTORE_CONNECT_API_KEY_IDAPPSTORE_CONNECT_API_ISSUER_IDAPPSTORE_CONNECT_API_KEY_CONTENT
Compatibility aliases:
APP_STORE_KEY_IDAPP_STORE_ISSUER_IDAPP_STORE_PRIVATE_KEY
The private key can be passed as literal multi-line PEM content or as a string with escaped \n.
Claude Setup
claude mcp add xcode-cloud \
--env APPSTORE_CONNECT_API_KEY_ID="$APPSTORE_CONNECT_API_KEY_ID" \
--env APPSTORE_CONNECT_API_ISSUER_ID="$APPSTORE_CONNECT_API_ISSUER_ID" \
--env APPSTORE_CONNECT_API_KEY_CONTENT="$APPSTORE_CONNECT_API_KEY_CONTENT" \
-- npx -y @thatfactory/xcode-cloud-mcpCodex Setup
codex mcp add xcode-cloud \
--env APPSTORE_CONNECT_API_KEY_ID="$APPSTORE_CONNECT_API_KEY_ID" \
--env APPSTORE_CONNECT_API_ISSUER_ID="$APPSTORE_CONNECT_API_ISSUER_ID" \
--env APPSTORE_CONNECT_API_KEY_CONTENT="$APPSTORE_CONNECT_API_KEY_CONTENT" \
-- npx -y @thatfactory/xcode-cloud-mcpAvailable Tools
list_products()list_workflows(productId)get_workflow_details(workflowId)list_build_runs(workflowId, limit?, status?, sourceCommitSha?)get_build_run_testflight_builds(buildRunId, workflowId, appId, platforms, expectedSourceRef?, expectedSourceCommitSha?)start_build(workflowId, clean?, sourceBranchOrTagId?, pullRequestId?, buildRunId?)set_workflow_enabled(workflowId, enabled)update_workflow_general(workflowId, name?, description?, clean?)update_workflow_start_conditions(workflowId, branchStartCondition?, manualBranchStartCondition?, pullRequestStartCondition?, manualPullRequestStartCondition?, scheduledStartCondition?, tagStartCondition?, manualTagStartCondition?)update_workflow_actions(workflowId, actions)configure_manual_release_candidate(workflowId, scheme, branch, buildDistributionAudience)get_build_issues(buildRunId? workflowId? buildNumber? buildSelector?)get_build_logs(buildRunId? workflowId? buildNumber? buildSelector?, maxCharacters?)materialize_build_logs(buildRunId? workflowId? buildNumber? buildSelector?)get_test_results(buildRunId? workflowId? buildNumber? buildSelector?)get_failed_tests(buildRunId? workflowId? buildNumber? buildSelector?)get_test_artifacts(buildRunId? workflowId? buildNumber? buildSelector?)cleanup_saved_logs(buildRunId?, maxAgeHours?)
Log Retrieval Behavior
get_build_logs keeps the MCP response compact on purpose:
it downloads and extracts text-like build log artifacts to a temporary local directory
it returns
savedLogsDirectoryandsavedLogsso local agents can inspect the extracted files withrg,grep, orcatit returns a compact
failedTestssummary,highlights, and a cappedexcerpteven if a caller passes a very large
maxCharacters, the inline excerpt is clamped to avoid oversized MCP responses
Recommended agent workflow:
Call
get_failed_testsorget_build_logs.Read
savedLogsDirectory.Use
rginside that directory to inspect the exact failing test or assertion.If needed, call
cleanup_saved_logswhen the investigation is done.
Temporary logs are written under the system temp directory in a path like:
/tmp/xcode-cloud-mcp/build-logs/<buildRunId>On macOS this typically resolves to a path under /var/folders/.../T/.
Cleanup policy:
each new call for the same
buildRunIddeletes and recreates that build-specific temp directory firstolder build directories are pruned automatically when they are older than 24 hours
you can also call
cleanup_saved_logsdirectly for onebuildRunIdor for all directories older than a chosen retention window
Example Prompts
Retrieve logs of the latest failing build for workflow abc123.Retrieve logs of build 81, then inspect the returned savedLogsDirectory and grep for Expectation failed.Get the failed tests for build 81, then open the saved logs directory and inspect the failing test in context.Retrieve logs of build number 42 for workflow abc123.Show me the latest failing UI test artifacts for workflow abc123.List the workflows for product def456 and then summarize the latest build.Show me the full workflow details for workflow abc123, including environment, start conditions, actions, and whether it is enabled.Disable workflow abc123, remove the archive action, then restore the original action list after the experiment.Workflow Details Behavior
get_workflow_details returns the live workflow configuration exposed by App Store Connect, grouped into:
generalenvironmentstartConditionsactionspostActions
Notes:
environmentincludes repository,xcodeVersion, andmacOsVersionwhen App Store Connect returns them.actionsincludes action type, scheme, platform, destination, required-to-pass state, and test-plan details when present.postActionsis currently returned as an empty array with a note because Apple does not expose workflow post-actions in its public API. This does not mean no post-actions are configured;testFlightDistributionreportsUNSUPPORTED_BY_APPLE_APIand an actionable next step.
Workflow Update Behavior
The workflow update tools are intentionally explicit:
set_workflow_enabledonly togglesisEnabledupdate_workflow_generalonly changesname,description, andcleanupdate_workflow_start_conditionsonly changes the start-condition objects you passupdate_workflow_actionsreplaces the fullactionsarray, so callers should fetch the current workflow first and then send the final desired action list
Important restriction:
if the workflow has
Restrict Editingenabled in Xcode Cloud, edits can fail even when the App Store Connect API key hasApp Manageraccessfor MCP edits to work reliably, disable the
Restrict Editingcheckbox for that workflow before using the write toolsif Apple still rejects the request after that, use a stronger API key role such as
Admin
Local Development
Install dependencies:
npm installRun tests:
npm testBuild the package:
npm run buildManual TestFlight release candidates
configure_manual_release_candidate converts an existing workflow to one macOS archive action (ARCHIVE, MACOS, ANY_MAC) with manual starts from an exact branch. It replaces the entire action list and all seven start conditions in one PATCH, clearing automatic branch, pull-request, tag, and scheduled starts plus manual tag and pull-request starts. Fetch get_workflow_details first if you need to retain the original configuration. The preset preserves the workflow's enabled state, name, environment, and clean-build setting; enable a disabled workflow separately when ready.
{
"workflowId": "abc123",
"scheme": "Headroom",
"branch": "main",
"buildDistributionAudience": "APP_STORE_ELIGIBLE"
}The audience is required and cannot be null in this preset:
APP_STORE_ELIGIBLE: Deployment Preparation = TestFlight and App Store.INTERNAL_ONLY: Deployment Preparation = TestFlight internal testing only.
The general update_workflow_actions tool accepts only these two audience values or null/omission (Deployment Preparation = None). Use the preset when requesting a TestFlight release candidate: null/omission is rejected before any API mutation. Workflow details retain the raw buildDistributionAudience and add the human-readable deploymentPreparation value for each action.
Creating an archive, making it eligible for TestFlight, and assigning its processed build to tester groups are separate steps. This preset configures eligibility; it does not itself start a build, guarantee successful upload/processing, or assign testers. Call start_build explicitly to create a build run. To distribute automatically, edit the workflow in Xcode or App Store Connect, add a TestFlight Internal Testing post-action, and select the internal group.
Apple's OpenAPI specification, version 4.4.1, inspected on 2026-09-07, exposes no post-action field or relationship in CiWorkflow, CiWorkflowCreateRequest, or CiWorkflowUpdateRequest, and no workflow post-action endpoint. Consequently, workflow responses explicitly report testFlightDistribution.status: "UNSUPPORTED_BY_APPLE_API" and group assignment as UNKNOWN; the legacy empty postActions array is not evidence that no post-actions exist. See Apple's BuildAudienceType and TestFlight distribution guide.
Read-only TestFlight handoff
Call get_build_run_testflight_builds with an exact Xcode Cloud run ID, its expected workflow ID, the App Store Connect app resource ID, and one or more distinct Apple platform values (IOS, TV_OS, MAC_OS, VISION_OS). Run and workflow IDs may also use their xcode-cloud:// URI forms. For automated handoff, provide both expectedSourceRef (for example, refs/heads/main) and expectedSourceCommitSha (the full Git SHA). With those inputs the tool verifies the branch and revision and rejects pull-request runs.
The tool verifies the run and workflow, reads the run's linked builds, and verifies each build against its App Store Connect app and prerelease version. When the run returns a build ID without its metadata, the tool reads that exact build ID for the missing evidence. The response includes run provenance and the following statuses.
readymeans the run succeeded and each requested platform has exactly one verified, valid, unexpired, externally eligible build. Each platform includesbuild.id, marketing version, build number, processing state, audience, and expiration state.pendingmeans the run is still active, a requested platform has no linked build yet, or a relevant build is processing. Read again after the upload or processing progresses.blockedreports per-platform reasons such as a failed or canceled run, app mismatch, internal-only or expired build, missing or unknown evidence, or ambiguous eligible builds. A run, workflow, or requested source mismatch produces an MCP error.
A successful archive can precede upload and processing in App Store Connect. When the overall status is ready, pass the exact build.id values to app-store-connect-mcp or another consumer that rechecks eligibility before TestFlight distribution. Beta review and group assignment are separate App Store Connect operations.
Available Tools
18 toolscleanup_saved_logsA
Remove saved local log directories either for one build run or for all directories older than a retention window.
Inputs: buildRunId, maxAgeHours.
configure_manual_release_candidateA
Replace all actions with one macOS archive and all start conditions with manual builds from one exact branch. Requires TestFlight Deployment Preparation. Preserves enabled state. Does not configure tester-group post-actions; use Xcode or App Store Connect for those.
Inputs: branch (required), scheme (required), workflowId (required), buildDistributionAudience (required).
get_build_issuesC
Resolve a build and return build identity plus issue counts from Xcode Cloud.
Inputs: buildRunId, workflowId, buildNumber, buildSelector.
get_build_logsC
Resolve a build, download text-like log artifacts, save them under a temporary local directory, and return a compact summary with failed tests, highlights, and saved log paths that local agents can inspect with grep or cat.
Inputs: buildRunId, workflowId, buildNumber, buildSelector, +1 more.
get_build_run_testflight_buildsResolve TestFlight Builds from an Xcode Cloud RunARead-onlyIdempotent
Verify an exact run, workflow and App Store Connect app, then look up the externally eligible builds linked to the run. For automatic handoff, supply both the expected canonical branch ref and full source commit SHA. Use build IDs only when the overall status is ready.
Inputs: appId (required), platforms (required), buildRunId (required), workflowId (required), +2 more. Returns: appId, status, buildRun, platforms
get_failed_testsC
Resolve a build, ensure logs are materialized locally, and return only the detected failed tests with their assertion messages when available.
Inputs: buildRunId, workflowId, buildNumber, buildSelector.
get_test_artifactsC
Resolve a build and return metadata plus download URLs for UI test artifacts and result bundles.
Inputs: buildRunId, workflowId, buildNumber, buildSelector.
get_test_resultsC
Resolve a build and return build-level test summary information, saved local log paths, detected failed tests, and result bundle metadata.
Inputs: buildRunId, workflowId, buildNumber, buildSelector.
get_workflow_detailsA
Retrieve detailed Xcode Cloud workflow configuration, including environment, start conditions, actions, and enabled state.
Inputs: workflowId (required).
list_build_runsARead-onlyIdempotent
Scan recent build runs for a workflow with source provenance. Optionally filter by outcome and full source commit SHA. The scan reports whether additional runs remain beyond the limit.
Inputs: workflowId (required), limit, status, sourceCommitSha.
list_productsA
List Xcode Cloud products available to the configured App Store Connect account. Automatically paginates through all results.
Inputs: no named parameters.
list_workflowsA
List workflows for a given Xcode Cloud product. Automatically paginates through all results.
Inputs: productId (required).
materialize_build_logsB
Resolve a build, download and extract text-like log artifacts into a local temporary directory, and return saved file paths for grep or cat based investigation.
Inputs: buildRunId, workflowId, buildNumber, buildSelector.
set_workflow_enabledB
Explicitly enable or disable one Xcode Cloud workflow.
Inputs: enabled (required), workflowId (required).
start_buildStart Xcode Cloud BuildA
Start exactly one new Xcode Cloud build through Apple's public App Store Connect API. Each successful invocation creates a new build run, and repeating the same call can create another build. Individual build-run cancellation is not supported by Apple's public API.
Inputs: workflowId (required), clean, buildRunId, pullRequestId, +1 more.
update_workflow_actionsB
Explicitly replace the full workflow actions array. This should be used only when the caller intends to send the final desired action list.
Inputs: actions (required), workflowId (required).
update_workflow_generalC
Explicitly update general workflow fields such as name, description, and clean build behavior.
Inputs: workflowId (required), name, clean, description.
update_workflow_start_conditionsC
Explicitly update workflow start conditions. Pass null to remove a condition.
Inputs: workflowId (required), tagStartCondition, branchStartCondition, manualTagStartCondition, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Several clusters overlap: get_build_logs and materialize_build_logs both download/extract log artifacts, get_test_results and get_failed_tests both return failed-test info (the latter is a subset of the former), and get_test_artifacts covers similar ground. update_workflow_actions vs configure_manual_release_candidate also risk misselection since both rewrite the actions array, though descriptions do add disambiguating detail.
Names follow a consistent snake_case verb_noun convention (list_products, get_workflow_details, update_workflow_general, set_workflow_enabled, start_build, cleanup_saved_logs). Minor deviations: 'materialize_build_logs' uses an unusual verb and 'get_build_run_testflight_builds' is an awkward multi-noun compound, but the pattern remains readable and predictable.
18 tools is on the heavy side for a single-integration CI/CD server, and the granularity is uneven — log retrieval is split across three tools and test inspection across three more. The count is defensible given the breadth of Xcode Cloud resources, but a few tools could be consolidated.
Read/build/manage coverage is solid (products, workflows, build runs, logs, tests, TestFlight handoff), but lifecycle gaps exist: no create_workflow or delete_workflow, no way to fetch a single build run's full detail generically, and no independent TestFlight version/build listing. Some dead ends are acknowledged (build cancellation unsupported by Apple's API), which mitigates but does not eliminate the gaps.
Maintenance
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
MCP server for interacting with the Supabase platform
The official Planning Center MCP server for interacting with your ministry's data.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server to communicate with the App Store Connect API for iOS Developers25332MIT
- AlicenseAqualityDmaintenanceAn MCP server that drives the full App Store release cycle for iOS and macOS apps: version bump, archive + TestFlight upload, metadata, review submission, and status.835 npmMIT
- AlicenseNot gradedqualityCmaintenanceApp Store Connect MCP Server (Swift) that manages apps, builds, TestFlight, metadata, reviews natively on macOSMIT
- AlicenseNot gradedqualityBmaintenanceThis MCP server provides access to Apple's App Store Connect API. It allows users to inspect apps, versions, builds, TestFlight groups, sales, users, and optionally edit metadata and manage testers.302 npm2MIT