getsentry/MobileBuildMCP
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
What it is
MobileBuildMCP is a small open‑source package that runs a Model Context Protocol (MCP) server and a matching command‑line interface (CLI). Its purpose is to give AI coding agents (e.g., Claude, Cursor, Codex) a way to invoke Xcode‑related build and test commands for iOS/macOS projects without the agent having to know the exact xcodebuild syntax.
Who might use it
- AI‑powered development assistants that need to compile, test, or package an iOS/macOS app as part of an automated workflow.
- Human developers who want a convenient CLI to run common Xcode build tasks (simulator builds, test‑product preparation, device signing) from a single, cross‑platform entry point.
- Tooling teams building higher‑level automation on top of Xcode and wanting a stable, language‑agnostic RPC surface (the MCP server).
Core features (as described in the README)
| Feature | What it does |
|---|---|
| MCP server | Listens for requests from MCP‑compatible AI agents and exposes a set of Xcode‑related tools (build, test, device signing, etc.) over the Model Context Protocol. |
| CLI | Provides the same tools directly from the terminal (mobilebuildmcp <subcommand>). |
| Two‑mode install | Available via Homebrew (brew install mobilebuildmcp) or as a global npm package (npm install -g mobilebuildmcp). |
| Agent skills | Optional “MCP Skill” and “CLI Skill” JSON blobs that can be fed to an AI agent to teach it how to talk to the server or use the CLI. |
| Simulator workflow | Commands to build for a specific simulator, optionally produce test bundles without running them, and later execute those bundles on a chosen simulator. |
| Device tooling | Supports building for real devices, assuming code‑signing is set up in Xcode. |
| Upgrade helper | mobilebuildmcp upgrade --check / --yes lets users update the installed binary in place. |
| Telemetry | Sends runtime error data to Sentry (opt‑out possible). |
| Documentation | Extensive markdown docs hosted in a companion repo (getsentry/xcodebuildmcp.com) covering installation, configuration, tool reference, and troubleshooting. |
How it works (high‑level)
- Installation – The user installs the package (Homebrew or npm). The install provides both the
mobilebuildmcpbinary and the MCP server code. - Starting the server – Running
mobilebuildmcp mcplaunches an HTTP‑like MCP endpoint that listens for JSON‑RPC style requests from AI agents. - Agent interaction – An AI agent loads the provided MCP Skill (or CLI Skill) which tells it which JSON methods are available (e.g.,
simulator.build,simulator.test). The agent then sends a request, the server translates it into the appropriatexcodebuildcommand, runs it, captures logs, and returns the result. - CLI fallback – If the user prefers manual control, they can invoke the same operations directly via subcommands such as
mobilebuildmcp simulator build …. - Stateful daemon – The CLI spins up a per‑workspace background daemon to keep logs, cache state, and speed up repeated operations.
Why it matters for AI‑assisted development
- Standardised interface: By exposing Xcode functionality through MCP, any LLM‑based coding assistant can interact with iOS/macOS projects without custom scripting for each tool.
- Reduced prompt complexity: The skill files give the agent a concise “API spec”, letting prompts stay focused on business logic rather than low‑level build flags.
- Cross‑platform entry point: Developers can run the same commands locally or let an AI agent run them remotely, making it easier to integrate into CI/CD pipelines that already use AI‑driven code generation.
Getting started (quick steps)
# Homebrew (recommended on macOS)
brew tap getsentry/xcodebuildmcp
brew install mobilebuildmcp
# Or npm
npm install -g mobilebuildmcp@latest
# Verify
mobilebuildmcp --help
# Start the MCP server for an AI client
mobilebuildmcp mcp
# Example CLI build for a simulator
mobilebuildmcp simulator build \
--scheme MyApp \
--project-path ./MyApp.xcodeproj \
--simulator-name "iPhone 17"
License & community
- Licensed under the MIT License.
- Uses Sentry for error telemetry (opt‑out available).
- Contributions are welcomed via the usual GitHub pull‑request workflow; detailed contribution guidelines are linked in the docs.
All information above is taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project