get_coverage_report
Show per-target code coverage from an xcresult bundle.
Give an agent full control of Xcode: build, run on a simulator or a device, debug with LLDB, and drive the UI.
The plugin OpenAI-Curated Plugins includes connection settings for this server.
LABSCO SUMMARY
Stable tool names, pre-parsed build diagnostics and session defaults are what make an iOS loop survivable for an agent: it stops re-supplying the scheme on every call and stops parsing raw build output.
An MCP server and CLI from Sentry, shipped as one binary. By the project site's count it exposes 82 tools across 15 workflows for iOS, iPadOS, macOS, watchOS, tvOS and visionOS, and every tool is callable from the terminal for scripting and CI. Both modes share the same code, the same config file and the same per-workspace daemon.
.xcodeproj, .xcworkspace and Swift packages, then structured build, test and clean for simulators, devices and macOS targetsxcodebuildmcp init — one that primes an agent on the MCP tools, one on the CLImacOS 14.5 or later and Xcode 16.x or later. Install with brew install getsentry/xcodebuildmcp/xcodebuildmcp, or npm install -g xcodebuildmcp@latest on Node.js 18 or newer — Homebrew does not need Node at all. Most clients can also run it on demand with npx -y xcodebuildmcp@latest mcp. Loading every workflow is a lot of context, so XCODEBUILDMCP_ENABLED_WORKFLOWS narrows startup to the workflows you actually use. Device tools need code signing configured in Xcode first. Sentry reporting covers the tool's own runtime errors only — build, test and config failures in your project are never sent and tool arguments and outputs are never captured — and XCODEBUILDMCP_SENTRY_DISABLED=true switches it off.
One command — npm install -g xcodebuildmcp@latest
USE CASES
Build returns parsed diagnostics rather than a wall of xcodebuild output, so the agent reads the error, edits, and builds again without a human translating in between.
One call compiles, installs, launches and streams the logs, then the UI automation tools tap and type through the flow. What you get back is whether the change works, not whether it compiled.
Attach LLDB, set the breakpoint, inspect the frames and variables, and drop to raw LLDB when the structured tools run out. The debugging session happens where the agent already is.
Install and launch on a paired iPhone, iPad, Watch or Vision Pro over USB or Wi-Fi, with logs coming back. Set code signing up in Xcode first — the device tools depend on it.
Every tool is a CLI command as well, so the sequence an agent worked out interactively becomes a script. Same binary, same config, same daemon.
Set XCODEBUILDMCP_ENABLED_WORKFLOWS to the workflows you actually use — simulator and project discovery, say — and the other tools never load. Worth doing on a project that only ever targets one platform.
Listed in project docs. Your client may show a different list.
get_coverage_reportShow per-target code coverage from an xcresult bundle.
get_file_coverageShow function-level coverage and uncovered line ranges for a specific file.
debug_attach_simAttach LLDB to sim app.
debug_breakpoint_addAdd breakpoint.
debug_breakpoint_removeRemove breakpoint.
debug_continueContinue debug session.
debug_detachDetach debugger.
debug_lldb_commandRun LLDB command.
debug_stackGet backtrace.
debug_variablesGet frame variables.
build_deviceBuild for device.
build_run_deviceBuild, install, and launch on physical device. Preferred single-step run tool when defaults are set.
test_deviceTest on device.
list_devicesList connected devices.
install_app_deviceInstall app on device.
launch_app_deviceLaunch app on device.
stop_app_deviceStop device app.
get_device_app_pathGet device built app path.
doctorMCP environment info.
build_macosBuild macOS app.
build_run_macosBuild and run macOS app.
test_macosTest macOS target.
launch_mac_appLaunch macOS app.
stop_mac_appStop macOS app.
get_mac_app_pathGet macOS built app path.
discover_projsScans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files. Use when project/workspace path is unknown.
list_schemesList Xcode schemes.
show_build_settingsShow build settings.
get_app_bundle_idExtract bundle id from .app.
get_mac_bundle_idExtract bundle id from macOS .app.
scaffold_ios_projectScaffold iOS project.
scaffold_macos_projectScaffold macOS project.
session_show_defaultsShow current active defaults. Required before your first build/run/test call in a session — do not assume defaults are configured.
session_use_defaults_profileSwitch the active session defaults profile.
session_set_defaultsSet session defaults for the active profile, or for a specified profile and make it active.
session_clear_defaultsClear session defaults for the active profile or a specified profile.
erase_simsErase simulator.
set_sim_locationSet sim location.
reset_sim_locationReset sim location.
set_sim_appearanceSet sim appearance.
sim_statusbarSet sim status bar network.
toggle_software_keyboardToggle the iOS Simulator software keyboard. Shows or hides the on-screen keyboard. Requires the simulator to be booted and Accessibility permission for the MCP host.
toggle_connect_hardware_keyboardToggle whether the iOS Simulator simulates a hardware keyboard connection. Disconnecting makes the on-screen keyboard appear for tap-based input. Requires the simulator to be booted and Accessibility permission for the MCP host.
boot_simBoot iOS simulator for manual/non-build flows. Not required before simulator build-and-run (build_run_sim).
list_simsList iOS simulators.
open_simOpen the simulator frontend for visibility and manual workflows. Not required before simulator build-and-run (build_run_sim).
build_simBuild for iOS sim (compile-only, no launch).
build_run_simBuild, install, and launch on iOS Simulator, booting it when needed. Runtime logs are captured automatically and the log file path is included in the response. Preferred single-step run tool when defaults are set.
test_simTest on iOS sim.
get_sim_app_pathGet sim built app path.
install_app_simInstall app on sim.
launch_app_simLaunch app on simulator. Runtime logs are captured automatically and the log file path is included in the response.
stop_app_simStop sim app.
record_sim_videoRecord sim video.
swift_package_buildswift package target build.
swift_package_testRun swift package target tests.
swift_package_cleanswift package clean.
swift_package_runswift package target run.
swift_package_stopStop SwiftPM run.
swift_package_listList SwiftPM processes.
screenshotCapture screenshot.
snapshot_uiCapture a semantic rs/1 runtime UI snapshot with elementRef targets. Observe once, use tap for one target or batch for multiple same-screen targets, and refresh after navigation, scrolling, sheet changes, or obvious layout changes.
wait_for_uiPoll rs/1 runtime UI snapshots until a selector-based UI predicate, selector-free textContains/gone text predicate, or selector-free settled predicate is satisfied, then record the latest snapshot. Prefer this after navigation or layout changes. Select with elementRef, identifier, label, role, or value when a selector is needed.
batchtaptouchSend touch down/up events to a UI element by elementRef from a current rs/1 runtime snapshot.
long_pressLong press a UI element by elementRef from a current rs/1 runtime snapshot.
swipewithinElementRef is required; do not use elementRef. Optional distance is a normalized stroke fraction greater than 0 and up to 1. Example input: {"withinElementRef":"e7","direction":"up","distance":0.7}.
draggestureSimulator gesture preset.
buttonPress simulator hardware button.
key_pressPress one hardware key using an AXe HID key code. Prefer type_text for text entry. Common values include 40 Return/Enter, 42 Backspace, 43 Tab, and 44 Space.
key_sequencePress hardware keys using AXe HID key codes. Prefer type_text for text entry. Common values include 40 Return/Enter, 42 Backspace, 43 Tab, and 44 Space.
type_textcleanClean build products.
manage-workflowsWorkflows are groups of tools exposed by XcodeBuildMCP. By default, not all workflows (and therefore tools) are enabled; only simulator tools are enabled by default. Some workflows are mandatory and can't be disabled.
sync_xcode_defaultsSync session defaults (scheme, simulator) from Xcode's current IDE selection.
xcode_ide_list_toolsLists Xcode-IDE-only MCP capabilities (Use for: SwiftUI previews image capture, code snippet execution, issue Navigator/build logs, and window/tab context).
xcode_ide_call_toolCall a remote Xcode IDE MCP tool.
xcode_tools_bridge_statusShow xcrun mcpbridge availability and proxy tool sync status.
xcode_tools_bridge_syncOne-shot connect + tools/list sync (manual retry; avoids background prompt spam).
xcode_tools_bridge_disconnectDisconnect bridge and unregister proxied xcode_tools_* tools.
BEFORE YOU INSTALL
Docs list 82; a default launch gives you 25.
The documented client runs the server on your machine.
INSTALLATION
npm install -g xcodebuildmcp@latest{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest",
"mcp"
]
}
}
}