xcode-cloud-mcp
xcode-cloud-mcp
Minimaler MCP-Server zum Entdecken von Xcode-Cloud-Produkten, zum Inspizieren und Bearbeiten von Workflows, zum Überwachen von Build-Läufen und zum Abrufen von Build-Problemen, Logs, Testzusammenfassungen und UI-Test-Artefakten über die App Store Connect API.
Funktionen
Funktion | Tool(s) | Beispielverwendung | Beispielrückgabe |
Produkte entdecken |
| „Zeig mir die Xcode-Cloud-Produkte, die in diesem Konto verfügbar sind.“ |
|
Workflows entdecken |
| „Liste die Workflows für Produkt |
|
Workflow-Konfiguration anzeigen |
| „Zeig mir die vollständigen Workflow-Details für |
|
Laufende oder aktuelle Builds überwachen |
| „Zeig mir die laufenden Builds für Workflow |
|
Workflow aktivieren oder deaktivieren |
| „Deaktiviere Workflow |
|
Name, Beschreibung oder Clean-Modus aktualisieren |
| „Benenne Workflow |
|
Startbedingungen explizit aktualisieren |
| „Ändere Workflow | aktualisiertes |
Workflow-Aktionsliste ersetzen |
| „Entferne die Archiv-Aktion aus Workflow |
|
Build-Status schnell einsehen |
| „Was ist beim letzten fehlgeschlagenen Build für Workflow |
|
Kompakte Build-Log-Zusammenfassungen lesen |
| „Rufe Logs von Build |
|
Logs für lokales grep materialisieren |
| „Lade die Logs für Build |
|
Testergebnisse zusammenfassen |
| „Fasse die Testergebnisse für den letzten fehlgeschlagenen Build zusammen.“ |
|
Direkt zu fehlgeschlagenen Tests springen |
| „Welche Tests sind in Build |
|
UI-Test-Artefakte abrufen |
| „Zeig mir die Screenshots und Videos des letzten fehlgeschlagenen UI-Testlaufs.“ |
|
Lokale temporäre Dateien bereinigen |
| „Entferne gespeicherte Logs, die älter als 24 Stunden sind.“ |
|
Die Build-Suche ist workflowbezogen. Abruf-Tools akzeptieren eine direkte buildRunId, oder eine workflowId plus buildNumber, oder eine workflowId plus buildSelector: "latest" | "latestFailing".
list_products und list_workflows paginieren automatisch durch alle Ergebnisse.
list_build_runs unterstützt status: "all" | "failed" | "succeeded" | "running" | "pending" und ein optionales limit, das standardmäßig 20 beträgt, sodass Agenten aktive Workflows abfragen können, ohne jeden Lauf lokal nachzubearbeiten oder die MCP-Antwortgröße aufzublähen.
Related MCP server: appstore-release-mcp
Anforderungen
Node.js
20+App Store Connect API-Anmeldedaten mit Zugriff auf Xcode Cloud
Umgebungsvariablen
Primäre Namen:
APPSTORE_CONNECT_API_KEY_IDAPPSTORE_CONNECT_API_ISSUER_IDAPPSTORE_CONNECT_API_KEY_CONTENT
Kompatibilitäts-Aliase:
APP_STORE_KEY_IDAPP_STORE_ISSUER_IDAPP_STORE_PRIVATE_KEY
Der private Schlüssel kann als wörtlicher mehrzeiliger PEM-Inhalt oder als Zeichenfolge mit maskiertem \n übergeben werden.
Claude-Einrichtung
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-Einrichtung
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-mcpVerfügbare Tools
list_products()list_workflows(productId)get_workflow_details(workflowId)list_build_runs(workflowId, limit?, status?)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)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?)
Verhalten beim Log-Abruf
get_build_logs hält die MCP-Antwort absichtlich kompakt:
Es lädt und extrahiert textähnliche Build-Log-Artefakte in ein temporäres lokales Verzeichnis.
Es gibt
savedLogsDirectoryundsavedLogszurück, damit lokale Agenten die extrahierten Dateien mitrg,grepodercatuntersuchen können.Es gibt eine kompakte
failedTests-Zusammenfassung,highlightsund einen begrenztenexcerptzurück.Selbst wenn ein Aufrufer ein sehr großes
maxCharactersübergibt, wird der Inline-Auszug begrenzt, um übermäßig große MCP-Antworten zu vermeiden.
Empfohlener Agenten-Workflow:
Rufe
get_failed_testsoderget_build_logsauf.Lies
savedLogsDirectory.Verwende
rgin diesem Verzeichnis, um den genauen fehlgeschlagenen Test oder die Assertion zu untersuchen.Falls nötig, rufe
cleanup_saved_logsauf, wenn die Untersuchung abgeschlossen ist.
Temporäre Logs werden unter dem System-Temp-Verzeichnis in einem Pfad wie folgt geschrieben:
/tmp/xcode-cloud-mcp/build-logs/<buildRunId>Auf macOS wird dies normalerweise zu einem Pfad unter /var/folders/.../T/ aufgelöst.
Bereinigungsrichtlinie:
Jeder neue Aufruf für dieselbe
buildRunIdlöscht und erstellt zuerst das build-spezifische temporäre Verzeichnis neu.Ältere Build-Verzeichnisse werden automatisch entfernt, wenn sie älter als 24 Stunden sind.
Sie können
cleanup_saved_logsauch direkt für einebuildRunIdoder für alle Verzeichnisse aufrufen, die älter als ein gewähltes Aufbewahrungsfenster sind.
Beispiel-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.Verhalten der Workflow-Details
get_workflow_details gibt die Live-Workflow-Konfiguration zurück, die von App Store Connect bereitgestellt wird, gruppiert in:
generalenvironmentstartConditionsactionspostActions
Hinweise:
environmententhält Repository,xcodeVersionundmacOsVersion, wenn App Store Connect sie zurückgibt.actionsenthält Aktionstyp, Schema, Plattform, Ziel, erforderlichen Bestehensstatus und Testplan-Details, falls vorhanden.postActionswird derzeit als leeres Array mit einem Hinweis zurückgegeben, da die App Store Connect-Workflow-Payload in der beobachteten API-Antwort keine separaten Post-Aktionen enthält.
Verhalten bei Workflow-Aktualisierungen
Die Workflow-Aktualisierungstools sind bewusst explizit:
set_workflow_enabledschaltet nurisEnabledum.update_workflow_generaländert nurname,descriptionundclean.update_workflow_start_conditionsändert nur die von dir übergebenen Startbedingungsobjekte.update_workflow_actionsersetzt das gesamteactions-Array, daher sollten Aufrufer zuerst den aktuellen Workflow abrufen und dann die endgültige gewünschte Aktionsliste senden.
Wichtige Einschränkung:
Wenn der Workflow in Xcode Cloud
Restrict Editingaktiviert hat, können Änderungen fehlschlagen, selbst wenn der App Store Connect-API-Schlüssel überApp Manager-Zugriff verfügt.Damit MCP-Änderungen zuverlässig funktionieren, deaktiviere das Kontrollkästchen
Restrict Editingfür diesen Workflow, bevor du die Schreibwerkzeuge verwendest.Wenn Apple die Anfrage danach weiterhin ablehnt, verwende eine stärkere API-Schlüsselrolle wie
Admin.
Lokale Entwicklung
Abhängigkeiten installieren:
npm installTests ausführen:
npm testPaket erstellen:
npm run buildAvailable 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 exposing Buildkite API data (pipelines, builds, jobs, tests) to AI tooling and editors.
MCP server for interacting with the Supabase platform
The official Planning Center MCP server for interacting with your ministry's data.
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.850 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.173 npm2MIT