XcodeBuildMCP provides an MCP server and CLI tool that enables AI agents to work with iOS and macOS projects by offering build automation and project inspection capabilities. The server exposes tools for interacting with Xcode projects, building targets, and managing the build process, allowing agents to programmatically interact with Xcode workflows on macOS. It solves the problem of giving AI assistants direct access to native iOS/macOS development tasks without requiring manual intervention or shell command composition.
Public tool metadata for what this MCP can expose to an agent.
debug_attach_simAttach LLDB to a running iOS simulator app. Provide bundleId or pid, plus simulator defaults.5 paramsAttach LLDB to a running iOS simulator app. Provide bundleId or pid, plus simulator defaults.
pidintegerwaitForbooleanbundleIdstringmakeCurrentbooleancontinueOnAttachbooleandebug_breakpoint_addAdd a breakpoint by file/line or function name for the active debug session.5 paramsAdd a breakpoint by file/line or function name for the active debug session.
filestringlineintegerfunctionstringconditionstringdebugSessionIdstringdebug_breakpoint_removeRemove a breakpoint by id for the active debug session.2 paramsRemove a breakpoint by id for the active debug session.
breakpointIdintegerdebugSessionIdstringdebug_continueResume execution in the active debug session or a specific debugSessionId.1 paramsResume execution in the active debug session or a specific debugSessionId.
debugSessionIdstringdebug_detachDetach the current debugger session or a specific debugSessionId.1 paramsDetach the current debugger session or a specific debugSessionId.
debugSessionIdstringdebug_lldb_commandRun an arbitrary LLDB command within the active debug session.3 paramsRun an arbitrary LLDB command within the active debug session.
commandstringtimeoutMsintegerdebugSessionIdstringdebug_stackReturn a thread backtrace from the active debug session.3 paramsReturn a thread backtrace from the active debug session.
maxFramesintegerthreadIndexintegerdebugSessionIdstringdebug_variablesReturn variables for a selected frame in the active debug session.2 paramsReturn variables for a selected frame in the active debug session.
frameIndexintegerdebugSessionIdstringbuild_deviceBuilds an app for a connected device.3 paramsBuilds an app for a connected device.
extraArgsarrayderivedDataPathstringpreferXcodebuildbooleancleanCleans build products with xcodebuild.4 paramsCleans build products with xcodebuild.
platformstringmacOS · iOS · iOS Simulator · watchOS · watchOS Simulator · tvOSextraArgsarrayderivedDataPathstringpreferXcodebuildbooleandiscover_projsScans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files.3 paramsScans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files.
maxDepthintegerscanPathstringworkspaceRootstringget_app_bundle_idExtracts the bundle identifier from an app bundle (.app) for any Apple platform (iOS, iPadOS, watchOS, tvOS, visionOS). IMPORTANT: You MUST provide the appPath parameter. Example: get_app_bundle_id({ appPath: '/path/to/your/app.app' })1 paramsExtracts the bundle identifier from an app bundle (.app) for any Apple platform (iOS, iPadOS, watchOS, tvOS, visionOS). IMPORTANT: You MUST provide the appPath parameter. Example: get_app_bundle_id({ appPath: '/path/to/your/app.app' })
appPathstringget_device_app_pathRetrieves the built app path for a connected device.1 paramsRetrieves the built app path for a connected device.
platformstringiOS · watchOS · tvOS · visionOSinstall_app_deviceInstalls an app on a connected device.1 paramsInstalls an app on a connected device.
appPathstringlaunch_app_deviceLaunches an app on a connected device.1 paramsLaunches an app on a connected device.
bundleIdstringlist_devicesLists connected physical Apple devices (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro) with their UUIDs, names, and connection status. Use this to discover physical devices for testing.Lists connected physical Apple devices (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro) with their UUIDs, names, and connection status. Use this to discover physical devices for testing.
No parameter schema in public metadata yet.
list_schemesLists schemes for a project or workspace.Lists schemes for a project or workspace.
No parameter schema in public metadata yet.
show_build_settingsShows xcodebuild build settings.Shows xcodebuild build settings.
No parameter schema in public metadata yet.
start_device_log_capStarts log capture on a connected device.1 paramsStarts log capture on a connected device.
bundleIdstringstop_app_deviceStops a running app on a connected device.1 paramsStops a running app on a connected device.
processIdnumberstop_device_log_capStops an active Apple device log capture session and returns the captured logs.1 paramsStops an active Apple device log capture session and returns the captured logs.
logSessionIdstringtest_deviceRuns tests on a physical Apple device.5 paramsRuns tests on a physical Apple device.
platformstringiOS · watchOS · tvOS · visionOSextraArgsarraytestRunnerEnvobjectderivedDataPathstringpreferXcodebuildbooleandoctorProvides comprehensive information about the MCP server environment, available dependencies, and configuration status.1 paramsProvides comprehensive information about the MCP server environment, available dependencies, and configuration status.
enabledbooleanstart_sim_log_capStarts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.2 paramsStarts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.
bundleIdstringcaptureConsolebooleanstop_sim_log_capStops an active simulator log capture session and returns the captured logs.1 paramsStops an active simulator log capture session and returns the captured logs.
logSessionIdstringbuild_macosBuilds a macOS app.3 paramsBuilds a macOS app.
extraArgsarrayderivedDataPathstringpreferXcodebuildbooleanbuild_run_macosBuilds and runs a macOS app.3 paramsBuilds and runs a macOS app.
extraArgsarrayderivedDataPathstringpreferXcodebuildbooleanget_mac_app_pathRetrieves the built macOS app bundle path.2 paramsRetrieves the built macOS app bundle path.
extraArgsarrayderivedDataPathstringget_mac_bundle_idExtracts the bundle identifier from a macOS app bundle (.app). IMPORTANT: You MUST provide the appPath parameter. Example: get_mac_bundle_id({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_get_macos_bundle_id.1 paramsExtracts the bundle identifier from a macOS app bundle (.app). IMPORTANT: You MUST provide the appPath parameter. Example: get_mac_bundle_id({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_get_macos_bundle_id.
appPathstringlaunch_mac_appLaunches a macOS application. IMPORTANT: You MUST provide the appPath parameter. Example: launch_mac_app({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_launch_macos_app.2 paramsLaunches a macOS application. IMPORTANT: You MUST provide the appPath parameter. Example: launch_mac_app({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_launch_macos_app.
argsarrayappPathstringstop_mac_appStops a running macOS application. Can stop by app name or process ID.2 paramsStops a running macOS application. Can stop by app name or process ID.
appNamestringprocessIdnumbertest_macosRuns tests for a macOS target.4 paramsRuns tests for a macOS target.
extraArgsarraytestRunnerEnvobjectderivedDataPathstringpreferXcodebuildbooleanscaffold_ios_projectScaffold a new iOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper iOS configuration.11 paramsScaffold a new iOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper iOS configuration.
outputPathstringdisplayNamestringprojectNamestringcustomizeNamesbooleanbundleIdentifierstringdeploymentTargetstringmarketingVersionstringtargetedDeviceFamilyarraycurrentProjectVersionstringsupportedOrientationsarraysupportedOrientationsIpadarrayscaffold_macos_projectScaffold a new macOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper macOS configuration.8 paramsScaffold a new macOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper macOS configuration.
outputPathstringdisplayNamestringprojectNamestringcustomizeNamesbooleanbundleIdentifierstringdeploymentTargetstringmarketingVersionstringcurrentProjectVersionstringsession-clear-defaultsClear selected or all session defaults.2 paramsClear selected or all session defaults.
allbooleankeysarraysession-set-defaultsSet the session defaults needed by many tools. Most tools require one or more session defaults to be set before they can be used. Agents should set all relevant defaults up front in a single call (e.g., project/workspace, scheme, simulator or device ID, useLatestOS) to avoid i...10 paramsSet the session defaults needed by many tools. Most tools require one or more session defaults to be set before they can be used. Agents should set all relevant defaults up front in a single call (e.g., project/workspace, scheme, simulator or device ID, useLatestOS) to avoid i...
archstringarm64 · x86_64schemestringdeviceIdstringprojectPathstringsimulatorIdstringuseLatestOSbooleanconfigurationstringsimulatorNamestringworkspacePathstringsuppressWarningsbooleansession-show-defaultsShow current session defaults.Show current session defaults.
No parameter schema in public metadata yet.
boot_simBoots an iOS simulator.Boots an iOS simulator.
No parameter schema in public metadata yet.
build_run_simBuilds and runs an app on an iOS simulator.3 paramsBuilds and runs an app on an iOS simulator.
extraArgsarrayderivedDataPathstringpreferXcodebuildbooleanbuild_simBuilds an app for an iOS simulator.3 paramsBuilds an app for an iOS simulator.
extraArgsarrayderivedDataPathstringpreferXcodebuildbooleandescribe_uiGets entire view hierarchy with precise frame coordinates (x, y, width, height) for all visible elements. Use this before UI interactions or after layout changes - do NOT guess coordinates from screenshots. Returns JSON tree with frame data for accurate automation. Requires th...Gets entire view hierarchy with precise frame coordinates (x, y, width, height) for all visible elements. Use this before UI interactions or after layout changes - do NOT guess coordinates from screenshots. Returns JSON tree with frame data for accurate automation. Requires th...
No parameter schema in public metadata yet.
get_sim_app_pathRetrieves the built app path for an iOS simulator.1 paramsRetrieves the built app path for an iOS simulator.
platformstringiOS Simulator · watchOS Simulator · tvOS Simulator · visionOS Simulatorinstall_app_simInstalls an app in an iOS simulator.1 paramsInstalls an app in an iOS simulator.
appPathstringlaunch_app_logs_simLaunches an app in an iOS simulator and captures its logs.2 paramsLaunches an app in an iOS simulator and captures its logs.
argsarraybundleIdstringlaunch_app_simLaunches an app in an iOS simulator.2 paramsLaunches an app in an iOS simulator.
argsarraybundleIdstringlist_simsLists available iOS simulators with their UUIDs.1 paramsLists available iOS simulators with their UUIDs.
enabledbooleanopen_simOpens the iOS Simulator app.Opens the iOS Simulator app.
No parameter schema in public metadata yet.
record_sim_videoStarts or stops video capture for an iOS simulator.4 paramsStarts or stops video capture for an iOS simulator.
fpsintegerstopbooleanstartbooleanoutputFilestringscreenshotCaptures screenshot for visual verification. For UI coordinates, use describe_ui instead (don't determine coordinates from screenshots).Captures screenshot for visual verification. For UI coordinates, use describe_ui instead (don't determine coordinates from screenshots).
No parameter schema in public metadata yet.
stop_app_simStops an app running in an iOS simulator.1 paramsStops an app running in an iOS simulator.
bundleIdstringtest_simRuns tests on an iOS simulator.4 paramsRuns tests on an iOS simulator.
extraArgsarraytestRunnerEnvobjectderivedDataPathstringpreferXcodebuildbooleanerase_simsErases a simulator by UDID.1 paramsErases a simulator by UDID.
shutdownFirstbooleanreset_sim_locationResets the simulator's location to default.Resets the simulator's location to default.
No parameter schema in public metadata yet.
set_sim_appearanceSets the appearance mode (dark/light) of an iOS simulator.1 paramsSets the appearance mode (dark/light) of an iOS simulator.
modestringdark · lightset_sim_locationSets a custom GPS location for the simulator.2 paramsSets a custom GPS location for the simulator.
latitudenumberlongitudenumbersim_statusbarSets the data network indicator in the iOS simulator status bar. Use "clear" to reset all overrides, or specify a network type (hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc).1 paramsSets the data network indicator in the iOS simulator status bar. Use "clear" to reset all overrides, or specify a network type (hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc).
dataNetworkstringclear · hide · wifi · 3g · 4g · lteswift_package_buildBuilds a Swift Package with swift build5 paramsBuilds a Swift Package with swift build
targetNamestringpackagePathstringarchitecturesarrayconfigurationstringdebug · releaseparseAsLibrarybooleanswift_package_cleanCleans Swift Package build artifacts and derived data1 paramsCleans Swift Package build artifacts and derived data
packagePathstringswift_package_listLists currently running Swift Package processesLists currently running Swift Package processes
No parameter schema in public metadata yet.
swift_package_runRuns an executable target from a Swift Package with swift run7 paramsRuns an executable target from a Swift Package with swift run
timeoutnumberargumentsarraybackgroundbooleanpackagePathstringconfigurationstringdebug · releaseexecutableNamestringparseAsLibrarybooleanswift_package_stopStops a running Swift Package executable started with swift_package_run1 paramsStops a running Swift Package executable started with swift_package_run
pidnumberswift_package_testRuns tests for a Swift Package with swift test7 paramsRuns tests for a Swift Package with swift test
filterstringparallelbooleanpackagePathstringshowCodecovbooleantestProductstringconfigurationstringdebug · releaseparseAsLibrarybooleanbuttonPress hardware button on iOS simulator. Supported buttons: apple-pay, home, lock, side-button, siri2 paramsPress hardware button on iOS simulator. Supported buttons: apple-pay, home, lock, side-button, siri
durationnumberbuttonTypestringapple-pay · home · lock · side-button · sirigesturePerform gesture on iOS simulator using preset gestures: scroll-up, scroll-down, scroll-left, scroll-right, swipe-from-left-edge, swipe-from-right-edge, swipe-from-top-edge, swipe-from-bottom-edge7 paramsPerform gesture on iOS simulator using preset gestures: scroll-up, scroll-down, scroll-left, scroll-right, swipe-from-left-edge, swipe-from-right-edge, swipe-from-top-edge, swipe-from-bottom-edge
deltanumberpresetstringscroll-up · scroll-down · scroll-left · scroll-right · swipe-from-left-edge · swipe-from-right-edgedurationnumberpreDelaynumberpostDelaynumberscreenWidthintegerscreenHeightintegerkey_pressPress a single key by keycode on the simulator. Common keycodes: 40=Return, 42=Backspace, 43=Tab, 44=Space, 58-67=F1-F10.2 paramsPress a single key by keycode on the simulator. Common keycodes: 40=Return, 42=Backspace, 43=Tab, 44=Space, 58-67=F1-F10.
keyCodeintegerdurationnumberkey_sequencePress key sequence using HID keycodes on iOS simulator with configurable delay2 paramsPress key sequence using HID keycodes on iOS simulator with configurable delay
delaynumberkeyCodesarraylong_pressLong press at specific coordinates for given duration (ms). Use describe_ui for precise coordinates (don't guess from screenshots).3 paramsLong press at specific coordinates for given duration (ms). Use describe_ui for precise coordinates (don't guess from screenshots).
xintegeryintegerdurationnumberswipeSwipe from one point to another. Use describe_ui for precise coordinates (don't guess from screenshots). Supports configurable timing.8 paramsSwipe from one point to another. Use describe_ui for precise coordinates (don't guess from screenshots). Supports configurable timing.
x1integerx2integery1integery2integerdeltanumberdurationnumberpreDelaynumberpostDelaynumbertapTap at specific coordinates or target elements by accessibility id or label. Use describe_ui to get precise element coordinates prior to using x/y parameters (don't guess from screenshots). Supports optional timing delays.6 paramsTap at specific coordinates or target elements by accessibility id or label. Use describe_ui to get precise element coordinates prior to using x/y parameters (don't guess from screenshots). Supports optional timing delays.
xintegeryintegeridstringlabelstringpreDelaynumberpostDelaynumbertouchPerform touch down/up events at specific coordinates. Use describe_ui for precise coordinates (don't guess from screenshots).5 paramsPerform touch down/up events at specific coordinates. Use describe_ui for precise coordinates (don't guess from screenshots).
xintegeryintegerupbooleandownbooleandelaynumbertype_textType text (supports US keyboard characters). Use describe_ui to find text field, tap to focus, then type.1 paramsType text (supports US keyboard characters). Use describe_ui to find text field, tap to focus, then type.
textstring
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP ships as a single package with two modes: a CLI for direct terminal use and an MCP server for AI coding agents. Either install method gives you both.
brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcp
npm install -g xcodebuildmcp@latest
Verify either install:
xcodebuildmcp --help
Drop-in config snippets for Cursor, Claude Code, Codex, can be found in the official docs page MCP Clients. Most clients can also run the MCP server on demand via npx -y xcodebuildmcp@latest mcp without a global install.
XcodeBuildMCP now includes two optional agent skills:
MCP Skill: Primes the agent with instructions on how to use the MCP server's tools (optional when using the MCP server).
CLI Skill: Primes the agent with instructions on how to navigate the CLI (recommended when using the CLI).
To install with a global binary:
xcodebuildmcp init
Or install directly via npx without a global install:
npx -y xcodebuildmcp@latest init
For further information on installing skills, see Agent Skills.
XcodeBuildMCP uses Sentry for internal runtime error telemetry only. For details and opt-out instructions, see Privacy & Telemetry.
XcodeBuildMCP provides a unified command-line interface. The mcp subcommand starts the MCP server, while all other commands provide direct terminal access to tools:
# Install globally
npm install -g xcodebuildmcp@latest
# Start the MCP server (for MCP clients)
xcodebuildmcp mcp
# List available tools
xcodebuildmcp tools
# Build for simulator
xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeproj
Check for updates and upgrade in place:
xcodebuildmcp upgrade --check
xcodebuildmcp upgrade --yes
The CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See the CLI guide for full documentation.
This project is licensed under the MIT License - see the LICENSE file for details. For third-party licensing notices see the THIRD_PARTY_LICENSES file for details. For npm package attributions see the THIRD_PARTY_PACKAGE_LICENSES file for details.
INCREMENTAL_BUILDS_ENABLEDdefault: falseEnable experimental xcodemake incremental builds (true/false or 1/0).
XCODEBUILDMCP_ENABLED_WORKFLOWSComma-separated list of workflows to load at startup (e.g., 'simulator,device,project-discovery').
XCODEBUILDMCP_SENTRY_DISABLEDdefault: falseDisable Sentry error reporting (preferred flag).
XCODEBUILDMCP_DEBUGdefault: falseEnable verbose debug logging from the server.
inditextech/mcp-server-simulator-ios-idb
mobile-next/mobile-mcp
alexgladkov/claude-in-mobile
srmorete/mobile-device-mcp