xcode-cloud-mcp
xcode-cloud-mcp
Servidor MCP mínimo para descubrir productos de Xcode Cloud, inspeccionar y editar flujos de trabajo, supervisar ejecuciones de compilación y recuperar problemas de compilación, registros, resúmenes de pruebas y artefactos de pruebas de interfaz de usuario a través de la API de App Store Connect.
Características
Característica | Herramienta(s) | Ejemplo de uso | Ejemplo de retorno |
Descubrir productos |
| "Muéstrame los productos de Xcode Cloud disponibles en esta cuenta." |
|
Descubrir flujos de trabajo |
| "Enumera los flujos de trabajo del producto |
|
Inspeccionar configuración del flujo de trabajo |
| "Muéstrame los detalles completos del flujo de trabajo |
|
Supervisar compilaciones en ejecución o recientes |
| "Muéstrame las compilaciones en ejecución del flujo de trabajo |
|
Habilitar o deshabilitar un flujo de trabajo |
| "Deshabilita el flujo de trabajo |
|
Actualizar nombre, descripción o modo de limpieza |
| "Cambia el nombre del flujo de trabajo |
|
Actualizar condiciones de inicio explícitamente |
| "Cambia el flujo de trabajo |
|
Reemplazar la lista de acciones del flujo de trabajo |
| "Elimina la acción de archivo del flujo de trabajo |
|
Ver el estado de la compilación rápidamente |
| "¿Qué salió mal en la última compilación fallida del flujo de trabajo |
|
Leer resúmenes compactos de registros de compilación |
| "Recupera los registros de la compilación |
|
Materializar registros para grep local |
| "Descarga los registros de la compilación |
|
Resumir resultados de pruebas |
| "Resume los resultados de las pruebas de la última compilación fallida." |
|
Ir directamente a las pruebas fallidas |
| "¿Qué pruebas fallaron en la compilación |
|
Recuperar artefactos de pruebas de interfaz de usuario |
| "Muéstrame las capturas de pantalla y los vídeos de la última ejecución de pruebas de interfaz fallida." |
|
Limpiar archivos temporales locales |
| "Elimina los registros guardados de más de 24 horas." |
|
La búsqueda de compilaciones está limitada al flujo de trabajo. Las herramientas de recuperación aceptan un buildRunId directo, o un workflowId más buildNumber, o un workflowId más buildSelector: "latest" | "latestFailing".
list_products y list_workflows pagan automáticamente por todos los resultados.
list_build_runs admite status: "all" | "failed" | "succeeded" | "running" | "pending" y un limit opcional, que por defecto es 20, para que los agentes puedan consultar flujos de trabajo activos sin tener que procesar cada ejecución localmente ni aumentar el tamaño de la respuesta de MCP.
Related MCP server: appstore-release-mcp
Requisitos
Node.js
20+Credenciales de la API de App Store Connect con acceso a Xcode Cloud
Variables de Entorno
Nombres principales:
APPSTORE_CONNECT_API_KEY_IDAPPSTORE_CONNECT_API_ISSUER_IDAPPSTORE_CONNECT_API_KEY_CONTENT
Alias de compatibilidad:
APP_STORE_KEY_IDAPP_STORE_ISSUER_IDAPP_STORE_PRIVATE_KEY
La clave privada se puede pasar como contenido PEM literal de varias líneas o como una cadena con \n escapado.
Configuración de Claude
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-mcpConfiguración de Codex
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-mcpHerramientas Disponibles
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?)
Comportamiento de Recuperación de Registros
get_build_logs mantiene la respuesta de MCP compacta a propósito:
descarga y extrae los artefactos de registro de compilación de tipo texto a un directorio temporal local
devuelve
savedLogsDirectoryysavedLogspara que los agentes locales puedan inspeccionar los archivos extraídos conrg,grepocatdevuelve un resumen compacto de
failedTests,highlightsy unexcerptlimitadoincluso si el llamador pasa un
maxCharactersmuy grande, el extracto en línea se limita para evitar respuestas de MCP demasiado grandes
Flujo de trabajo recomendado para el agente:
Llama a
get_failed_testsoget_build_logs.Lee
savedLogsDirectory.Usa
rgen ese directorio para inspeccionar la prueba o aserción exacta que falla.Si es necesario, llama a
cleanup_saved_logscuando termines la investigación.
Los registros temporales se escriben en el directorio temporal del sistema en una ruta como:
/tmp/xcode-cloud-mcp/build-logs/<buildRunId>En macOS, normalmente se resuelve a una ruta en /var/folders/.../T/.
Política de limpieza:
cada nueva llamada para el mismo
buildRunIdelimina y vuelve a crear primero ese directorio temporal específico de la compilaciónlos directorios de compilación antiguos se eliminan automáticamente cuando tienen más de 24 horas
también puedes llamar a
cleanup_saved_logsdirectamente para unbuildRunIdo para todos los directorios más antiguos que el período de retención elegido
Ejemplos de 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.Comportamiento de Detalles del Flujo de Trabajo
get_workflow_details devuelve la configuración en vivo del flujo de trabajo expuesta por App Store Connect, agrupada en:
generalenvironmentstartConditionsactionspostActions
Notas:
environmentincluye el repositorio,xcodeVersionymacOsVersioncuando App Store Connect los devuelve.actionsincluye el tipo de acción, esquema, plataforma, destino, estado de requerido para pasar y detalles del plan de pruebas cuando estén presentes.postActionsactualmente se devuelve como una matriz vacía con una nota porque la carga útil del flujo de trabajo de App Store Connect no expone acciones posteriores separadas en la respuesta de API observada.
Comportamiento de Actualización del Flujo de Trabajo
Las herramientas de actualización del flujo de trabajo son intencionadamente explícitas:
set_workflow_enabledsolo alternaisEnabledupdate_workflow_generalsolo cambianame,descriptionycleanupdate_workflow_start_conditionssolo cambia los objetos de condición de inicio que pasesupdate_workflow_actionsreemplaza la matriz completa deactions, por lo que los llamadores deben obtener primero el flujo de trabajo actual y luego enviar la lista de acciones final deseada
Restricción importante:
si el flujo de trabajo tiene
Restrict Editinghabilitado en Xcode Cloud, las ediciones pueden fallar incluso si la clave de API de App Store Connect tiene acceso deApp Managerpara que las ediciones de MCP funcionen de forma fiable, desmarca la casilla
Restrict Editingde ese flujo de trabajo antes de usar las herramientas de escriturasi Apple sigue rechazando la solicitud después de eso, usa un rol de clave de API más potente, como
Admin
Desarrollo Local
Instala las dependencias:
npm installEjecuta las pruebas:
npm testCompila el paquete:
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