### Interactive Setup Wizard for XcodeBuildMCP Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md Initiates an interactive setup wizard to guide users through creating or updating the `.xcodebuildmcp/config.yaml` file. This wizard helps configure workflows, simulators, schemes, and projects without manual YAML editing. ```bash xcodebuildmcp setup ``` -------------------------------- ### Preflight Commands for CLI Tool Setup Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md Define commands to run before Claude's measured execution for host setup, such as starting companion apps or validating local health. Ensure these commands prepare the environment for the benchmark. ```yaml preflightCommands: - open -a LocalBenchTool - sleep 3 - vendorcli status - vendorcli ui inspect --udid "$CLAUDE_UI_BENCHMARK_SIMULATOR_ID" - vendorcli ui home --udid "$CLAUDE_UI_BENCHMARK_SIMULATOR_ID" ``` -------------------------------- ### Install App on Simulator Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt Use this command to install an application bundle onto a specified simulator. Requires the simulator's ID and the path to the app bundle. ```bash install_app_sim({ simulatorId: "SIMULATOR_UUID", appPath: "/BundleTest.app" }) ``` -------------------------------- ### Install App on Simulator Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/boot--success.txt Installs an application onto a specified simulator. Requires the simulator's UUID and the path to the app file. ```shell install_app_sim({ simulatorId: "", appPath: "PATH_TO_YOUR_APP" }) ``` -------------------------------- ### Install XcodeBuildMCP CLI with npm Source: https://github.com/getsentry/xcodebuildmcp/blob/main/skills/xcodebuildmcp-cli/SKILL.md Install the latest version of the xcodebuildmcp CLI globally using npm. ```bash npm install -g xcodebuildmcp@latest ``` -------------------------------- ### Install App on Device Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt Installs an application bundle onto a physical device. Requires the device's UDID and the path to the app bundle. ```bash install_app_device({ deviceId: "DEVICE_UDID", appPath: "/BundleTest.app" }) ``` -------------------------------- ### Migrate from Standalone Log Capture to Build-and-Run Tools Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md Demonstrates the transition from using standalone log capture commands to the integrated build-and-run or launch-app commands. Use the new commands to get runtime log paths directly from the result. ```bash xcodebuildmcp logging start-sim-log-cap --simulator-id --bundle-id com.example.MyApp xcodebuildmcp simulator launch-app --simulator-id --bundle-id com.example.MyApp xcodebuildmcp logging stop-sim-log-cap --pid ``` ```bash xcodebuildmcp simulator build-and-run --scheme MyApp --project-path ./MyApp.xcodeproj ``` ```bash # Or, for an app that is already installed on a simulator: xcodebuildmcp simulator launch-app --simulator-id --bundle-id com.example.MyApp ``` -------------------------------- ### Start MCP Server Source: https://github.com/getsentry/xcodebuildmcp/blob/main/README.md Starts the MCP server, which is used by MCP clients. This command is part of the CLI. ```bash xcodebuildmcp mcp ``` -------------------------------- ### Initialize Agent Skills with npx Source: https://github.com/getsentry/xcodebuildmcp/blob/main/README.md Initializes the agent skills for XcodeBuildMCP without a global installation, using npx. ```bash npx -y xcodebuildmcp@latest init ``` -------------------------------- ### CLI JSON Output Example Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md This is an example of the JSON output when using the `--output json` flag. It includes request details, summary, artifacts, and diagnostics. ```json { "schema": "xcodebuildmcp.output.build-run-result", "schemaVersion": "1", "didError": false, "error": null, "data": { "request": { "scheme": "CalculatorApp", "platform": "iOS Simulator" }, "summary": { "status": "SUCCEEDED", "durationMs": 1234, "target": "simulator" }, "artifacts": { "buildLogPath": "~/Library/Developer/XcodeBuildMCP/logs/build_run_sim_...log" }, "diagnostics": { "warnings": [], "errors": [] } } } ``` -------------------------------- ### Install and Use XcodeBuildMCP CLI Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md Install the xcodebuildmcp CLI globally using npm and list available tools. This is useful for direct terminal usage, scripting, and CI workflows. ```bash npm install -g xcodebuildmcp@beta xcodebuildmcp tools # List available tools xcodebuildmcp simulator build-and-run --scheme MyApp --project-path ./MyApp.xcodeproj ``` -------------------------------- ### Launch App on Simulator Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt Launches an installed application on a specific simulator. You need the simulator's ID and the application's bundle ID. ```bash launch_app_sim({ simulatorId: "SIMULATOR_UUID", bundleId: "com.test.snapshot" }) ``` -------------------------------- ### Initialize Agent Skills Source: https://github.com/getsentry/xcodebuildmcp/blob/main/README.md Initializes the agent skills for XcodeBuildMCP. This can be done with a global binary installation. ```bash xcodebuildmcp init ``` -------------------------------- ### Install XcodeBuildMCP CLI with Homebrew Source: https://github.com/getsentry/xcodebuildmcp/blob/main/skills/xcodebuildmcp-cli/SKILL.md Install the xcodebuildmcp CLI using the Homebrew package manager. Ensure you have tapped the correct repository first. ```bash brew tap getsentry/xcodebuildmcp brew install xcodebuildmcp ``` -------------------------------- ### Launch App on Device Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt Launches an installed application on a physical device. Requires the device's UDID and the application's bundle ID. ```bash launch_app_device({ deviceId: "DEVICE_UDID", bundleId: "com.test.snapshot" }) ``` -------------------------------- ### Stumbles and Inspect Hints Report Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md Example of a report showing incomplete suite status due to stumbles, listing tool errors and providing paths to inspect artifacts. ```text INCOMPLETE stumbles: 1 • tool errors: 1 boot_sim @ line 9: Boot failed: device not found Inspect result.json out.nosync/claude-benchmarks/reminders/20260522T213905Z/result.json transcript out.nosync/claude-benchmarks/reminders/20260522T213905Z/claude.jsonl stderr out.nosync/claude-benchmarks/reminders/20260522T213905Z/claude.stderr run dir out.nosync/claude-benchmarks/reminders/20260522T213905Z ``` -------------------------------- ### HTTP GET Request for Default Locations Source: https://github.com/getsentry/xcodebuildmcp/blob/main/example_projects/Weather/README.md Example HTTP request to fetch default saved locations from the API. ```http GET /v1/locations/default ``` -------------------------------- ### Build and Run Benchmark Suite Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md First build the project, then execute a specific benchmark suite. This is useful for ensuring the latest code is used before running tests. ```bash npm run build npx tsx benchmarks/claude-ui/run.ts --suite weather ``` -------------------------------- ### HTTP GET Request for Weather Report Source: https://github.com/getsentry/xcodebuildmcp/blob/main/example_projects/Weather/README.md Example HTTP request to retrieve a weather report for a specific location using its ID. ```http GET /v1/weather/loc-current-san-francisco ``` -------------------------------- ### HTTP GET Request for Searching Locations Source: https://github.com/getsentry/xcodebuildmcp/blob/main/example_projects/Weather/README.md Example HTTP request to search for locations, including a query parameter for the search term. ```http GET /v1/locations/search?query=San%20Francisco ``` -------------------------------- ### Boot a Simulator Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/simulator/list--success.txt Boots a specific simulator using its UDID. Ensure the simulator ID is correctly set before execution. ```python boot_sim({ simulatorId: "UUID_FROM_ABOVE" }) ``` -------------------------------- ### Get Device App Path Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt Retrieves the application path on the default device. This command is useful for locating installed applications for further inspection or automation. ```bash get_device_app_path() ``` -------------------------------- ### List Available Tools Source: https://github.com/getsentry/xcodebuildmcp/blob/main/README.md Lists all the tools available through the XcodeBuildMCP CLI. ```bash xcodebuildmcp tools ``` -------------------------------- ### Discover XcodeBuildMCP Workflows and Arguments Source: https://github.com/getsentry/xcodebuildmcp/blob/main/skills/xcodebuildmcp-cli/SKILL.md Use the CLI's built-in help system to discover available workflows, tools, and their arguments. This is the recommended method for understanding the CLI's capabilities. ```bash xcodebuildmcp --help ``` ```bash xcodebuildmcp tools ``` ```bash xcodebuildmcp --help ``` ```bash xcodebuildmcp --help ``` -------------------------------- ### Boot Simulator Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/open--success.txt Boots a simulator for manual workflows. Requires a valid simulator ID. ```javascript boot_sim({ simulatorId: "UUID_FROM_LIST_SIMS" }) ``` -------------------------------- ### Build and Run on macOS Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-macos--success.txt Use this command to build and then run the macOS project. Verify the workspacePath and scheme parameters. ```javascript build_run_macos({ workspacePath: "/macos/SnapshotTestMacApp.xcworkspace", scheme: "SnapshotTestMacApp" }) ``` -------------------------------- ### Check XcodeBuildMCP CLI Availability Source: https://github.com/getsentry/xcodebuildmcp/blob/main/skills/xcodebuildmcp-cli/SKILL.md Verify if the xcodebuildmcp CLI is installed and accessible in your system's PATH. ```bash xcodebuildmcp --help ``` -------------------------------- ### CLI Command with Session Defaults Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md Demonstrates how CLI commands can now pick up arguments like scheme and project path automatically from session defaults, simplifying command execution. ```bash # Before: every command needed explicit flags xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeproj # Now: flags are filled from session defaults xcodebuildmcp simulator build ``` -------------------------------- ### Aggregate Summary Report Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md An example of the aggregate summary generated after running multiple benchmark suites with the --all flag. ```text ════════════════════════════════════════════════════════════════════════ Claude UI Benchmarks · Summary ════════════════════════════════════════════════════════════════════════ Suites: 3 total · 2 completed · 1 incomplete Duration: total 4m 49.8s · slowest reminders (1m 39.8s) Artifacts: out.nosync/claude-benchmarks/ ✓ COMPLETED weather 1m 38.6s sequence delta: 4m/0a ! INCOMPLETE reminders 1m 39.8s 1 stumble · sequence delta: 7m/4a ✓ COMPLETED contacts 1m 31.4s sequence delta: 2m/2a ════════════════════════════════════════════════════════════════════════ ``` -------------------------------- ### Get Simulator App Path Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/simulator/list--success.txt Retrieves the application path on the simulator. Requires the scheme name, platform, and simulator UDID. ```python get_sim_app_path({ scheme: "YOUR_SCHEME", platform: "iOS Simulator", simulatorId: "UUID_FROM_ABOVE" }) ``` -------------------------------- ### Run Build Source: https://github.com/getsentry/xcodebuildmcp/blob/main/AGENTS.md Builds the project using tsup for ESM output. ```bash npm run build ``` -------------------------------- ### Snapshot UI Capture Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/snapshot-ui--success.txt Captures the current UI state of the simulator. Use this to get an initial snapshot or refresh after layout changes. ```javascript snapshot_ui({ simulatorId: "" }) ``` -------------------------------- ### Build for Device Source: https://github.com/getsentry/xcodebuildmcp/blob/main/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt Initiates a build process for a specified scheme, targeting a device. Ensure the desired device identifier is set in session defaults before running. ```bash build_device({ scheme: "YOUR_SCHEME" }) ``` -------------------------------- ### Single Suite Completion Report Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md Example of a completed benchmark suite report, showing suite name, duration, model details, exit codes, metrics, and tool calls. ```text ──────────────────────────────────────────────────────────────────────── COMPLETED weather 1m 38.6s suite benchmarks/claude-ui/suites/weather.yml artifacts out.nosync/claude-benchmarks/weather/20260522T214044Z claude model requested=claude-sonnet-4-7 observed=claude-sonnet-4-7 version=1.2.3 exit claude=0 parser=0 Metrics METRIC ACTUAL BASELINE DELTA totalToolCalls 13 19 −6 mcpToolCalls 12 18 −6 uiAutomationCalls 10 16 −6 wallClockSeconds 98.62 125.00 −26.38 Tool calls (baseline-observed) TOOL ACTUAL BASELINE DELTA session_show_defaults 1 1 0 build_run_sim 1 1 0 snapshot_ui 1 1 0 tap 6 9 −3 batch 1 1 0 OBSERVED stumbles: 0 ``` -------------------------------- ### Shortcut to Run Benchmark Suite Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md A shortcut command to build and run the Claude UI benchmark suite for a specified suite. This simplifies the execution process. ```bash npm run bench:claude-ui -- --suite weather ``` -------------------------------- ### Claude Configuration for Benchmarks Source: https://github.com/getsentry/xcodebuildmcp/blob/main/benchmarks/claude-ui/README.md Configure Claude's model, server usage, allowed tools, system prompt, plugin directories, working directory, and extra arguments for benchmark runs. Use this to customize Claude's environment and capabilities. ```yaml claude: model: claude-sonnet-4-7 useMcpServer: false tools: - Bash allowedTools: - Bash(vendorcli *) - Bash(xcodebuild *) appendSystemPrompt: | Use the simulator from `$CLAUDE_UI_BENCHMARK_SIMULATOR_ID`. You may use the configured local CLI and xcodebuild directly. pluginDirs: - benchmarks/claude-ui/local/skills/vendor-cli isolatedWorkingDirectory: true extraArgs: - --setting-sources - project,local toolAnalysis: matchers: - kind: bashCommand commandPrefix: vendorcli ui screen shortName: vendorcli.screen uiAutomation: true - kind: bashCommand commandPrefix: vendorcli ui tap shortName: vendorcli.tap uiAutomation: true - kind: bashCommand commandPrefix: xcodebuild shortName: xcodebuild ``` -------------------------------- ### Example Build & Run Result Shape Source: https://github.com/getsentry/xcodebuildmcp/blob/main/CHANGELOG.md This JSON structure represents a successful build and run operation. It details the summary of the operation and paths to various artifacts like logs and the application bundle. ```json { "schema": "xcodebuildmcp.output.build-run-result", "schemaVersion": "1", "didError": false, "error": null, "data": { "summary": { "status": "SUCCEEDED", "durationMs": 1234, "target": "simulator" }, "artifacts": { "appPath": "~/Library/Developer/XcodeBuildMCP/DerivedData/.../CalculatorApp.app", "bundleId": "io.sentry.calculatorapp", "processId": 99999, "buildLogPath": "~/Library/Developer/XcodeBuildMCP/logs/build_run_sim_...log", "runtimeLogPath": "~/Library/Developer/XcodeBuildMCP/logs/io.sentry.calculatorapp_...log", "osLogPath": "~/Library/Developer/XcodeBuildMCP/logs/io.sentry.calculatorapp_oslog_...log" } } } ```