XcodeBuildMCPdocs
Install

MCP Clients

Drop-in config for every major MCP-speaking editor. Pick yours and paste.

All examples below use the npx command. If you installed via Homebrew, replace command with "xcodebuildmcp" and args with ["mcp"] to skip the npx download check on startup.

Claude Code#

bash
claude mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcp

Or with env-based session defaults:

bash
claude mcp add XcodeBuildMCP -e XCODEBUILDMCP_SENTRY_DISABLED=false -- npx -y xcodebuildmcp@latest mcp

Cursor#

Project-scoped (recommended): create .cursor/mcp.json in your workspace root:

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

For global Cursor config at ~/.cursor/mcp.json, use this variant so startup runs from the active workspace:

json
{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "/bin/zsh",
      "args": [
        "-lc",
        "cd \"${workspaceFolder}\" && exec npx -y xcodebuildmcp@latest mcp"
      ]
    }
  }
}

Codex CLI#

Run inside your terminal:

bash
codex mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcp

Or edit ~/.codex/config.toml:

toml
[mcp_servers.XcodeBuildMCP]
command = "npx"
args = ["-y", "xcodebuildmcp@latest", "mcp"]

If you hit timed out awaiting tools/call after 60s, bump the timeout:

toml
tool_timeout_sec = 600

Claude Desktop#

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

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

VS Code#

Add to your VS Code settings JSON:

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

Kiro#

Workspace-scoped at .kiro/settings/mcp.json, or user-scoped at ~/.kiro/settings/mcp.json:

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

Windsurf#

Add to ~/.codeium/windsurf/mcp_config.json:

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

Trae#

Add to ~/Library/Application Support/Trae/User/mcp.json:

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

Xcode (Codex Agent)#

Requires Xcode 26.3 or later with the Codex agent installed under Xcode Settings → Intelligence → Open AI. At the time of writing, Xcode's Codex agent only supports a project-scoped .codex/config.toml at your project workspace root:

toml
[mcp_servers.XcodeBuildMCP]
args = [
  "-lc",
  "PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@latest mcp"
]
command = "/bin/zsh"
enabled = true
tool_timeout_sec = 10000
Limited PATH

Codex Agent inside Xcode starts with a minimal PATH. If the server won't start, it's usually because npx can't be found. The zsh wrapper above handles Homebrew and nvm; adjust to match your toolchain.

Xcode (Claude Code Agent)#

Requires Xcode 26.3 or later with the Claude Code agent installed under Xcode Settings → Intelligence → Anthropic. Edit the config at:

path
~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json

Add or replace the mcpServers block:

json
{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "/bin/zsh",
      "args": [
        "-lc",
        "PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@latest mcp"
      ]
    }
  }
}

AdaL CLI#

At the AdaL prompt:

console
/mcp add XcodeBuildMCP --command npx --args "-y,xcodebuildmcp@latest,mcp"

Verifying the connection#

Once configured, ask your agent to list tools. With the default simulator workflow enabled you should see the simulator toolset. Expand enabledWorkflows in your configuration to surface more, or browse every tool in the Tools Reference.