Get the FREE Ultimate OpenClaw Setup Guide →

XcodeBuildMCP

A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio getsentry-xcodebuildmcp npx -y xcodebuildmcp@latest mcp \
  --env XCODEBUILDMCP_PORT="3000" \
  --env XCODEBUILDMCP_LOG_LEVEL="info"

How to use

XcodeBuildMCP is an MCP server and CLI designed to assist AI agents and developers when working on iOS and macOS projects. The server runs the MCP protocol for structured agent interactions, while the CLI provides a convenient way to start the MCP server locally and obtain an mcp endpoint that clients can connect to. With this setup, agents can request build-related information, coordinate tasks, and exchange context about your Xcode projects in a standardized way. The package is distributed as an npm package and can be used directly via npx for quick experimentation or installed for longer-running workflows.

To use the MCP server, configure a client to connect to the MCP endpoint using the provided mcp configuration snippet. The README demonstrates how to invoke the server with npx, effectively starting the MCP server in the current environment. Once running, you can interact with it through the MCP protocol, leveraging the server’s capabilities to assist with iOS/macOS project tasks. The CLI also exposes common helper commands for help text and usage guidance, making it straightforward to learn what the server can do and how to integrate it into your agent workflows.

How to install

Prerequisites:

  • Node.js 18.x or newer (npm comes with Node.js)
  • Access to a terminal with npm/npx installed

Option A – Homebrew (macOS):

  1. Install via Homebrew: brew tap getsentry/xcodebuildmcp brew install xcodebuildmcp
  2. Use the CLI to inspect help: xcodebuildmcp --help
  3. Client config example (MCP server): "XcodeBuildMCP": { "command": "xcodebuildmcp", "args": ["mcp"] }

Option B – npm / npx (Node.js 18+):

  1. Install globally for CLI use: npm install -g xcodebuildmcp@latest xcodebuildmcp --help
  2. For MCP server only (no global install needed), configure via npx in your client/mcp.json: "XcodeBuildMCP": { "command": "npx", "args": ["-y", "xcodebuildmcp@latest", "mcp"] }
  3. To pin a specific version, replace @latest with a exact version, e.g. xcodebuildmcp@1.2.3

Notes:

  • Ensure your environment can reach the npm registry to fetch the package when using npx.
  • If you plan to run the server long-term, consider installing globally or within a project with a package.json.

Additional notes

Tips and notes:

  • This MCP server targets macOS/iOS development workflows; ensure your environment has access to Xcode/tools needed for your tasks.
  • If you encounter PATH issues in certain IDEs or shells, starting the server via npx may require ensuring that npm/bin directories are in PATH.
  • You can customize environment variables (e.g., logging level or port) via the mcp_config env block when embedding this server in a client config.
  • When integrating with agents, use the provided examples to connect to the MCP endpoint and begin exchanging contextual tasks and commands related to your Xcode projects.

Related MCP Servers

Sponsor this space

Reach thousands of developers