When using Claude Code for iOS development, raw xcodebuild commands are slow. While xcodebuild does support incremental builds, it’s not optimized for speed.

XcodeBuildMCP solves this by integrating with xcodemake — a tool that makes incremental builds significantly faster!

Setup

claude mcp add -s user XcodeBuildMCP npx xcodebuildmcp@latest \
    -e INCREMENTAL_BUILDS_ENABLED=true \
    -e XCODEBUILDMCP_ENABLED_WORKFLOWS="simulator,device,project-discovery,session-management" \
    -e XCODEBUILDMCP_SENTRY_DISABLED=true
Argument Description
-s user Scope: save to user config (available in all projects)
-e INCREMENTAL_BUILDS_ENABLED=true Enable fast incremental builds via experimental xcodemake
-e XCODEBUILDMCP_ENABLED_WORKFLOWS="..." Which tool groups to expose to Claude
-e XCODEBUILDMCP_SENTRY_DISABLED=true Disable error reporting to Sentry

There are a few workflows for this MCP and we only enable what is necessary:

  • simulator — Build/run on iOS Simulator
  • device — Build/run on physical devices
  • project-discovery — Find Xcode projects and schemes
  • session-management — Set project/scheme/simulator defaults

Restart Claude Code after adding the MCP server.

Pitfall: Set Session Defaults First

When Claude attempts to build, it will encounter errors if session defaults aren’t configured. Tell Claude what to use upfront:

“Build and run. Use scheme MyApp on iPhone 17 Pro with latest OS.”

Claude will set the session defaults and build in one go.