The XcodeBuildMCP server provides a standardized interface for AI agents and MCP clients to interact with Xcode projects, enabling automation of Xcode-related tasks:
Xcode Project Management: Discover, clean, build, and manage Xcode projects/workspaces, list schemes, and show build settings
Simulator Management: List, boot, and control iOS simulators, deploy and launch apps on them
Build and Run Workflows: Build and run iOS apps on simulators by name or UUID, with support for advanced configurations
App Utilities: Extract bundle identifiers, retrieve build paths, and perform incremental builds (experimental)
Log Capture: Capture runtime logs from applications running on simulators
UI Automation: Interact with simulator UI and capture screenshots (beta feature)
Error Diagnostics: Troubleshoot system and dependency configurations
Provides tools for iOS simulator management including listing simulators, booting them, installing apps, launching apps, capturing logs, automating UI interactions, and taking screenshots.
Supports building and running applications on macOS, including app launching and bundle ID extraction for macOS applications.
Integrates with Sentry for error monitoring and diagnostics to track issues, crashes, and unexpected errors, with options to disable this functionality.
Handles Swift-specific features including skipping macro validation to avoid errors when building projects that use Swift Macros.
Enables programmatic interaction with Xcode projects, allowing operations like discovering projects, building for different platforms, managing schemes, cleaning build products, and extracting build settings.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@XcodeBuildMCPbuild my iOS app for the simulator"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Installation
XcodeBuildMCP ships as a single package with two modes: a CLI for direct terminal use and an MCP server for AI coding agents. Both installation methods give you both modes.
Option A — Homebrew
Use the CLI:
MCP client config:
Upgrade later with brew update && brew upgrade xcodebuildmcp.
Option B — npm / npx (Node.js 18+)
For CLI use, install globally:
For MCP server only, no global install needed — add directly to your client config:
To pin a specific version, replace @latest with an exact version (e.g. xcodebuildmcp@latest).
Client-specific setup
The examples below use npx (Option B). If you installed via Homebrew, replace the command with "command": "xcodebuildmcp", "args": ["mcp"] instead.
Recommended (project-scoped): add .cursor/mcp.json in your workspace root:
For global Cursor config (~/.cursor/mcp.json), use this variant so startup is aligned with the active workspace:
Or use the quick install link:
Run:
Run:
Or add to ~/.codex/config.toml:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Add to your VS Code settings JSON:
Or use the quick install links:
Add to ~/.codeium/windsurf/mcp_config.json:
Add to ~/Library/Application Support/Trae/User/mcp.json:
Requires Xcode 26.3 or later. Codex agent must be installed and configured in Xcode Settings -> Intelligence -> Open AI.
The only way at the time of writing to add an MCP server is to use a project scoped .codex/config.toml file in the root of your project workspace:
/path/to/your/project/.codex/config.toml
NOTE: Codex Agent when running in Xcode has a limited PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
Requires Xcode 26.3 or later. Claude Code agent must be installed and configured in Xcode Settings -> Intelligence -> Anthropic.
Add to the end or replace the existing mcpServers object in Xcode's Claude Code agent config at:
~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json
NOTE: Claude Code Agent when running in Xcode has a limited PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
For other installation options see Getting Started.
Related MCP server: Clockify MCP
Requirements
macOS 14.5 or later
Xcode 16.x or later
Node.js 18.x or later (not required for Homebrew installation)
Skills
XcodeBuildMCP now includes two optional agent skills:
MCP Skill: Primes the agent with instructions on how to use the MCP server's tools (optional when using the MCP server).
CLI Skill: Primes the agent with instructions on how to navigate the CLI (recommended when using the CLI).
To install, copy and paste the command below into a terminal and follow the on-screen instructions.
For further information on how to install the skill, see: docs/SKILLS.md
Notes
XcodeBuildMCP requests xcodebuild to skip macro validation to avoid errors when building projects that use Swift Macros.
Device tools require code signing to be configured in Xcode. See docs/DEVICE_CODE_SIGNING.md.
Privacy
XcodeBuildMCP uses Sentry for error telemetry. For more information or to opt out of error telemetry see docs/PRIVACY.md.
CLI
XcodeBuildMCP provides a unified command-line interface. The mcp subcommand starts the MCP server, while all other commands provide direct terminal access to tools:
The CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See docs/CLI.md for full documentation.
Documentation
Getting started: docs/GETTING_STARTED.md
CLI usage: docs/CLI.md
Configuration and options: docs/CONFIGURATION.md
Tools reference: docs/TOOLS.md
Troubleshooting: docs/TROUBLESHOOTING.md
Privacy: docs/PRIVACY.md
Skills: docs/SKILLS.md
Contributing: docs/dev/CONTRIBUTING.md
Licence
This project is licensed under the MIT License - see the LICENSE file for details.