home / mcp / xcodebuildmcp

XcodeBuildMCP

Provides an MCP server and CLI for agents to work with iOS and macOS projects, enabling automated builds and coding assistance.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "getsentry-xcodebuildmcp": {
      "command": "npx",
      "args": [
        "-y",
        "xcodebuildmcp@latest",
        "mcp"
      ]
    }
  }
}

XcodeBuildMCP provides a unified way to run an MCP server and a CLI for working with iOS and macOS projects. The MCP server enables AI agents to interact with XcodeBuildMCP tooling, while the CLI gives you direct terminal access to the same capabilities for hands-on workflows.

How to use

You run the MCP server to let AI agents connect and execute build-related tasks. A typical workflow is to start the MCP server and then configure your MCP client to point at it. The server exposes functionality that agents can invoke to build, debug, and query project state, while the CLI lets you perform similar actions directly from your terminal.

To start using the MCP server with a client, install the server as an MCP-enabled tool and configure your client to launch the server with the mcp entry point. For example, you can run the MCP server using the recommended MCP invocation for your environment and then direct your agent to communicate with that local endpoint.

How to install

Prerequisites: ensure you have macOS 14.5 or later, Xcode 16.x or later, and Node.js 18.x or later installed if you plan to use the npm/npx installation path.

Option 1: Homebrew install (CLI and MCP server in one package)

brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcp

# Start the MCP server via the CLI for local use
xcodebuildmcp mcp

# Help for CLI usage
xcodebuildmcp --help

Option 2: npm / npx install (Node.js 18+)

For CLI use, install globally and verify the CLI help:

npm install -g xcodebuildmcp@latest
xcodebuildmcp --help

For MCP server only, add a client-side config that starts the server via npx without a global install:

"XcodeBuildMCP": {
  "command": "npx",
  "args": ["-y", "xcodebuildmcp@latest", "mcp"]
}

To pin a specific version, replace "+latest+" with the exact version you want (for example, [email protected]).

Notes

XcodeBuildMCP can instruct 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.

CLI

XcodeBuildMCP provides a unified command-line interface. The mcp subcommand starts the MCP server, while all other commands give direct terminal access to tools.

# Install globally
npm install -g xcodebuildmcp@latest

# Start the MCP server (for MCP clients)
xcodebuildmcp mcp

# List available tools
xcodebuildmcp tools

# Build for simulator
xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeproj

Privacy

XcodeBuildMCP uses telemetry to report errors to a centralized service. You can opt out of telemetry where available by adjusting privacy settings.

Documentation

Comprehensive guides cover getting started, CLI usage, configuration, tools reference, troubleshooting, and privacy.

Licence

XcodeBuildMCP is licensed under the MIT License.

Available tools

mcp

Starts the MCP server for MCP clients to interact with development tooling.

tools

Lists the available tools exposed by the MCP CLI.

simulatorBuild

Builds the project for the simulator with a specified scheme and project path.