# Xcode MCP Build

> Build the active Xcode workspace/project scheme through the Xcode MCP tools. Use when the user asks to compile, build, rebuild, or verify an iOS/macOS/Xcode project with Xcode MCP, especially when they explicitly say "xcode mcp", "use Xcode", "build current project", or "compile in Xcode".

- Skill: `ai-x-builder/xcode-mcp-build` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ai-x-builder/xcode-mcp-build`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ai-x-builder/xcode-mcp-build/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ai-x-builder (https://skillmd.com/u/ai-x-builder)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ai-x-builder/xcode-mcp-build

---


# Xcode MCP Build

## Overview

Use Xcode MCP as the primary build path for the Xcode window the user has open. Do not fall back to command-line `xcodebuild` when the user explicitly asks to use Xcode MCP unless they later approve a fallback.

## Tool Availability

Before calling MCP tools, confirm the `mcp__xcode` namespace is available. If it is not available, use `tool_search` to expose Xcode MCP tools; if the tools still are not available, tell the user Xcode MCP is not connected and stop rather than using `xcodebuild` for an MCP-requested build.

## Workflow

1. Discover Xcode windows with `mcp__xcode.XcodeListWindows`.
2. Select the `tabIdentifier` that matches the requested workspace/project. If there is only one Xcode tab, use it.
3. Call `mcp__xcode.BuildProject` with the selected `tabIdentifier`.
4. If `BuildProject` returns normally, call `mcp__xcode.GetBuildLog` with `severity: "error"` and `mcp__xcode.XcodeListNavigatorIssues` with `severity: "error"` to confirm the result.
5. If `BuildProject` reports that the build started but the resulting build log could not be located, treat the outcome as indeterminate, then poll `GetBuildLog` and `XcodeListNavigatorIssues`.
6. If `BuildProject` times out, do not treat the build as failed. Poll `GetBuildLog` and `XcodeListNavigatorIssues`; Xcode may still be building while MCP waits.
7. Report the build result, whether `buildIsRunning` is false, the workspace path, the `tabIdentifier`, and any log path returned by `GetBuildLog`.

## Result Handling

- Success: say that the Xcode MCP build succeeded and include the active workspace/project.
- Build failure: list the highest-signal errors from `GetBuildLog` or Issue Navigator with file paths and messages.
- Build started but log missing: say the initial MCP build response was non-terminal, then report the later polled build result or say the outcome remains indeterminate.
- MCP timeout: say that the MCP call timed out, then continue checking `GetBuildLog`/Issue Navigator before deciding whether the outcome is inconclusive.
- No open Xcode window: ask the user to open the workspace/project in Xcode, because this MCP operates on Xcode tabs.

## Constraints

- The MCP build uses Xcode's currently active scheme and run destination for the tab.
- Do not modify project files or run dependency installers just to trigger a build.
- If multiple Xcode windows are open and the requested project is ambiguous, ask which tab/workspace to use.

