Engineering
xcodebuildmcp avatar

xcodebuildmcp

Official MCP server for iOS/macOS development: streamline builds, tests, runs, debugging, and UI automation using Xcode and CLI workflows.

Introduction

XcodeBuildMCP is a powerful Model Context Protocol (MCP) server and CLI tool designed to assist AI agents in managing iOS, macOS, watchOS, tvOS, and visionOS development lifecycles. By acting as an interface between the agent and Apple's development stack, it replaces manual execution of xcodebuild, xcrun, and simctl with structured, tool-based workflows. It is ideal for developers who need to automate complex build cycles, perform automated UI tests, or debug applications on simulators and physical devices without leaving their terminal or agent-assisted environment.

  • Full support for Xcode project and workspace discovery, including scheme listing and build setting inspection.

  • Comprehensive simulator management, including booting, erasing, location manipulation, and app lifecycle control (install/launch).

  • Advanced device workflows for physical hardware, covering build, test, and deployment with code-signing requirements.

  • Integrated LLDB debugger connectivity, enabling the agent to attach to processes, set breakpoints, and inspect variables and stack traces.

  • Robust UI automation capabilities, including screenshot capture, view hierarchy inspection with coordinate-based interaction, and input simulation like taps, swipes, and text entry.

  • Unified support for Swift Package Manager (SwiftPM) projects and project scaffolding for generating new application templates.

  • Efficient log streaming and capture from connected simulators and physical devices for real-time error diagnosis.

  • Users should define project, scheme, and destination defaults via session configuration to minimize redundant parameter overhead.

  • The agent must call session_show_defaults before initiating any build or test action to ensure the correct context is active.

  • Certain advanced features, such as physical device interaction and UI automation, may require specific configuration in the .xcodebuildmcp/config.yaml file to be enabled beyond the default simulator-focused toolset.

  • Projects involving Swift Macros should be handled with the provided skip-macro-validation settings to prevent build-time errors.

  • The tool operates as a stateful agent helper, utilizing a per-workspace daemon to handle persistent tasks like log streaming and debugging sessions seamlessly.

Repository Stats

Stars
5,374
Forks
262
Open Issues
18
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
May 1, 2026, 07:27 AM
View on GitHub