
XcodeBuild MCP
Author: getsentry
Description: A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects (Xcode project management, simulator management, and app utilities).
Stars: 4.8k
Forks: 226
License: MIT License
Category: Specialized
Overview
Installation
brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcpxcodebuildmcp --help"XcodeBuildMCP": {
"command": "xcodebuildmcp",
"args": ["mcp"]
}npm install -g xcodebuildmcp@latest
xcodebuildmcp --help"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}claude mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcpcodex mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcp[mcp_servers.XcodeBuildMCP]
command = "npx"
args = ["-y", "xcodebuildmcp@latest", "mcp"]{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}"mcp": {
"servers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}xcodebuildmcp initnpx -y xcodebuildmcp@latest initinit
Install XcodeBuildMCP agent skills (MCP Skill and/or CLI Skill) for use with the server/CLI.
mcp
Start the MCP server (stdio) so MCP clients can access XcodeBuildMCP tools.
tools
List available tools provided by XcodeBuildMCP.
simulator build
Build an Xcode scheme for the iOS/macOS simulator (e.g., via --scheme and --project-path).
FAQs
How do I install and configure XcodeBuild MCP with Homebrew vs npm, and which method is better for my setup?
Homebrew installation is simpler because it avoids Node.js entirely: run `brew tap getsentry/xcodebuildmcp` then `brew install xcodebuildmcp`. The npm method requires Node.js eighteen or higher and uses `npx -y xcodebuildmcp@latest mcp`. Choose Homebrew for zero runtime dependencies beyond macOS tooling; choose npm if your team manages Node environments or needs version pinning.
What are the 78+ tools available in XcodeBuild MCP and how are they organized across the 10 workflow groups?
The article confirms XcodeBuild MCP exposes seventy-eight-plus tools without enumerating them individually. The official GitHub repository at getsentry/XcodeBuildMCP documents the complete tool inventory and ten workflow groups, including simulator management, device deployment, UI testing, accessibility inspection, gesture simulation, log capture, Swift Package Manager operations, and project scaffolding.
How do I set up an autonomous build-debug-fix cycle with XcodeBuild MCP and Claude Code or Cursor?
Configure XcodeBuild MCP through your client's JSON config, then prompt the agent to write Swift code, invoke build_sim_name_proj to compile, parse compiler errors, apply fixes automatically, and rebuild until successful. The agent chains these MCP tools sequentially, creating a closed loop where each build failure informs the next code change without manual intervention.
What is the XCODEBUILDMCP_DYNAMIC_TOOLS feature and how does dynamic tool loading reduce token usage for AI agents?
XCODEBUILDMCP_DYNAMIC_TOOLS enables on-demand tool registration. Instead of loading all 78+ tools upfront, it registers tools only when needed, reducing initial token consumption. This prevents context window exhaustion in token-limited clients, allowing agents to maintain more conversation history and codebase context while accessing the full Xcode toolset when operations are invoked.
How can I work around the truncated unit test output issue (#177) when using XcodeBuild MCP for test-driven development workflows?
While issue #177 remains open, work around truncated test output by using direct xcodebuild commands through shell execution when full logs are critical, then switch back to XcodeBuild MCP for other steps. Alternatively, configure xcodebuild to write verbose logs to a file using `-resultBundlePath`, then read those complete logs separately.
How does XcodeBuild MCP compare to Apple's built-in Xcode 26.3 MCP server for AI-assisted iOS development?
XcodeBuild MCP offers four times more tools (78+ versus ~20) with comprehensive UI automation, gesture simulation, and console log capture that Apple's implementation lacks. Apple's official integration provides tighter system integration and potentially more stable long-term support, though XcodeBuild MCP's Sentry backing and dynamic tool loading deliver practical flexibility for complex automation workflows beyond Apple's documented scope.