cameroncooke_xcodebuildmcp
v1.15.1XcodeBuildMCP is a ModelContextProtocol server that provides tools for Xcode project management, simulator management, and app utilities.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
debug_attach_sim
Attach LLDB to a running iOS simulator app. Provide bundleId or pid, plus simulator defaults.
| Parameter | Type | Description |
|---|---|---|
bundleId | string | Bundle identifier of the app to attach (e.g., 'com.example.MyApp') |
continueOnAttach | boolean | Resume execution automatically after attaching (default: true) |
makeCurrent | boolean | Set this debug session as the current session (default: true) |
pid | integer | Process ID to attach directly |
waitFor | boolean | Wait for the process to appear when attaching |
debug_breakpoint_add
Add a breakpoint by file/line or function name for the active debug session.
| Parameter | Type | Description |
|---|---|---|
condition | string | Optional condition expression for the breakpoint |
debugSessionId | string | Debug session ID to target (defaults to current session) |
file | string | Source file path for breakpoint |
function | string | Function name to break on |
line | integer | Line number for breakpoint |
debug_breakpoint_remove
Remove a breakpoint by id for the active debug session.
| Parameter | Type | Description |
|---|---|---|
breakpointId * | integer | Breakpoint id to remove |
debugSessionId | string | Debug session ID to target (defaults to current session) |
debug_continue
Resume execution in the active debug session or a specific debugSessionId.
| Parameter | Type | Description |
|---|---|---|
debugSessionId | string | Debug session ID to resume (defaults to current session) |
debug_detach
Detach the current debugger session or a specific debugSessionId.
| Parameter | Type | Description |
|---|---|---|
debugSessionId | string | Debug session ID to detach (defaults to current session) |
debug_lldb_command
Run an arbitrary LLDB command within the active debug session.
| Parameter | Type | Description |
|---|---|---|
command * | string | |
debugSessionId | string | |
timeoutMs | integer |
debug_stack
Return a thread backtrace from the active debug session.
| Parameter | Type | Description |
|---|---|---|
debugSessionId | string | Debug session ID to target (defaults to current session) |
maxFrames | integer | Maximum frames to return |
threadIndex | integer | Thread index for backtrace |
debug_variables
Return variables for a selected frame in the active debug session.
| Parameter | Type | Description |
|---|---|---|
debugSessionId | string | Debug session ID to target (defaults to current session) |
frameIndex | integer | Frame index to inspect |
build_device
Builds an app for a connected device.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path to derived data directory |
extraArgs | array | Additional arguments to pass to xcodebuild |
preferXcodebuild | boolean | Prefer xcodebuild over faster alternatives |
clean
Cleans build products with xcodebuild.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Optional: Path where derived data might be located |
extraArgs | array | Additional xcodebuild arguments |
platform | string | Optional: Platform to clean for (defaults to iOS). Choose from macOS, iOS, iOS Simulator, watchOS, watchOS Simulator, tvOS, tvOS Simulator, visionOS, visionOS Simulator |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails. |
discover_projs
Scans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files.
| Parameter | Type | Description |
|---|---|---|
workspaceRoot * | string | The absolute path of the workspace root to scan within. |
maxDepth | integer | Optional: Maximum directory depth to scan. Defaults to 5. |
scanPath | string | Optional: Path relative to workspace root to scan. Defaults to workspace root. |
get_app_bundle_id
Extracts 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' })
| Parameter | Type | Description |
|---|---|---|
appPath * | string | Path to the .app bundle to extract bundle ID from (full path to the .app directory) |
get_device_app_path
Retrieves the built app path for a connected device.
| Parameter | Type | Description |
|---|---|---|
platform | string | Target platform (defaults to iOS) |
install_app_device
Installs an app on a connected device.
| Parameter | Type | Description |
|---|---|---|
appPath * | string | Path to the .app bundle to install (full path to the .app directory) |
launch_app_device
Launches an app on a connected device.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to launch (e.g., "com.example.MyApp") |
list_devices
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.
list_schemes
Lists schemes for a project or workspace.
show_build_settings
Shows xcodebuild build settings.
start_device_log_cap
Starts log capture on a connected device.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to launch and capture logs for. |
stop_app_device
Stops a running app on a connected device.
| Parameter | Type | Description |
|---|---|---|
processId * | number | Process ID (PID) of the app to stop |
stop_device_log_cap
Stops an active Apple device log capture session and returns the captured logs.
| Parameter | Type | Description |
|---|---|---|
logSessionId * | string | The session ID returned by start_device_log_cap. |
test_device
Runs tests on a physical Apple device.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path to derived data directory |
extraArgs | array | Additional arguments to pass to xcodebuild |
platform | string | Target platform (defaults to iOS) |
preferXcodebuild | boolean | Prefer xcodebuild over faster alternatives |
testRunnerEnv | object | Environment variables to pass to the test runner (TEST_RUNNER_ prefix added automatically) |
doctor
Provides comprehensive information about the MCP server environment, available dependencies, and configuration status.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Optional: dummy parameter to satisfy MCP protocol |
start_sim_log_cap
Starts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to capture logs for. |
captureConsole | boolean | Whether to capture console output (requires app relaunch). |
stop_sim_log_cap
Stops an active simulator log capture session and returns the captured logs.
| Parameter | Type | Description |
|---|---|---|
logSessionId * | string | The session ID returned by start_sim_log_cap. |
build_macos
Builds a macOS app.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system |
build_run_macos
Builds and runs a macOS app.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system |
get_mac_app_path
Retrieves the built macOS app bundle path.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path to derived data directory |
extraArgs | array | Additional arguments to pass to xcodebuild |
get_mac_bundle_id
Extracts 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.
| Parameter | Type | Description |
|---|---|---|
appPath * | string | Path to the macOS .app bundle to extract bundle ID from (full path to the .app directory) |
launch_mac_app
Launches 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.
| Parameter | Type | Description |
|---|---|---|
appPath * | string | Path to the macOS .app bundle to launch (full path to the .app directory) |
args | array | Additional arguments to pass to the app |
stop_mac_app
Stops a running macOS application. Can stop by app name or process ID.
| Parameter | Type | Description |
|---|---|---|
appName | string | Name of the application to stop (e.g., "Calculator" or "MyApp") |
processId | number | Process ID (PID) of the application to stop |
test_macos
Runs tests for a macOS target.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system |
testRunnerEnv | object | Environment variables to pass to the test runner (TEST_RUNNER_ prefix added automatically) |
scaffold_ios_project
Scaffold a new iOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper iOS configuration.
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Path where the project should be created |
projectName * | string | Name of the new project |
bundleIdentifier | string | Bundle identifier (e.g., com.example.myapp). If not provided, will use com.example.projectname |
currentProjectVersion | string | Build number (e.g., 1, 42, 100). If not provided, will use 1 |
customizeNames | boolean | Whether to customize project names and identifiers. Default is true. |
deploymentTarget | string | iOS deployment target (e.g., 18.4, 17.0). If not provided, will use 18.4 |
displayName | string | App display name (shown on home screen/dock). If not provided, will use projectName |
marketingVersion | string | Marketing version (e.g., 1.0, 2.1.3). If not provided, will use 1.0 |
supportedOrientations | array | Supported orientations for iPhone |
supportedOrientationsIpad | array | Supported orientations for iPad |
targetedDeviceFamily | array | Targeted device families |
scaffold_macos_project
Scaffold a new macOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper macOS configuration.
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Path where the project should be created |
projectName * | string | Name of the new project |
bundleIdentifier | string | Bundle identifier (e.g., com.example.myapp). If not provided, will use com.example.projectname |
currentProjectVersion | string | Build number (e.g., 1, 42, 100). If not provided, will use 1 |
customizeNames | boolean | Whether to customize project names and identifiers. Default is true. |
deploymentTarget | string | macOS deployment target (e.g., 15.4, 14.0). If not provided, will use 15.4 |
displayName | string | App display name (shown on home screen/dock). If not provided, will use projectName |
marketingVersion | string | Marketing version (e.g., 1.0, 2.1.3). If not provided, will use 1.0 |
session-clear-defaults
Clear selected or all session defaults.
| Parameter | Type | Description |
|---|---|---|
all | boolean | |
keys | array |
session-set-defaults
Set 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 iterative prompts; only set the keys your workflow needs.
| Parameter | Type | Description |
|---|---|---|
arch | string | Target architecture for macOS builds. |
configuration | string | Build configuration, e.g. Debug or Release. |
deviceId | string | Physical device ID for device workflows. |
projectPath | string | Xcode project (.xcodeproj) path. Mutually exclusive with workspacePath. Required for most build/test tools when workspacePath is not set. |
scheme | string | Xcode scheme. Required by most build/test tools. Use list_schemes to discover available schemes before setting. |
simulatorId | string | Simulator UUID for simulator workflows. Preferred over simulatorName when both are provided. |
simulatorName | string | Simulator device name for simulator workflows. If simulatorId is also provided, simulatorId is preferred and simulatorName is ignored. |
suppressWarnings | boolean | When true, warning messages are filtered from build output to conserve context |
useLatestOS | boolean | When true, prefer the latest available OS for simulatorName lookups. |
workspacePath | string | Xcode workspace (.xcworkspace) path. Mutually exclusive with projectPath. Required for most build/test tools when projectPath is not set. |
session-show-defaults
Show current session defaults.
boot_sim
Boots an iOS simulator.
build_run_sim
Builds and runs an app on an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails. |
build_sim
Builds an app for an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails. |
describe_ui
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 the target process to be running; paused debugger/breakpoints can yield an empty tree.
get_sim_app_path
Retrieves the built app path for an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target simulator platform (Required) |
install_app_sim
Installs an app in an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
appPath * | string | Path to the .app bundle to install (full path to the .app directory) |
launch_app_logs_sim
Launches an app in an iOS simulator and captures its logs.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to launch (e.g., 'com.example.MyApp') |
args | array | Additional arguments to pass to the app |
launch_app_sim
Launches an app in an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to launch (e.g., 'com.example.MyApp') |
args | array | Additional arguments to pass to the app |
list_sims
Lists available iOS simulators with their UUIDs.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Optional flag to enable the listing operation. |
open_sim
Opens the iOS Simulator app.
record_sim_video
Starts or stops video capture for an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
fps | integer | Frames per second (default 30) |
outputFile | string | Destination MP4 path to move the recorded video to on stop |
start | boolean | Start recording if true |
stop | boolean | Stop recording if true |
screenshot
Captures screenshot for visual verification. For UI coordinates, use describe_ui instead (don't determine coordinates from screenshots).
stop_app_sim
Stops an app running in an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
bundleId * | string | Bundle identifier of the app to stop (e.g., 'com.example.MyApp') |
test_sim
Runs tests on an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
derivedDataPath | string | Path where build products and other derived data will go |
extraArgs | array | Additional xcodebuild arguments |
preferXcodebuild | boolean | If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails. |
testRunnerEnv | object | Environment variables to pass to the test runner (TEST_RUNNER_ prefix added automatically) |
erase_sims
Erases a simulator by UDID.
| Parameter | Type | Description |
|---|---|---|
shutdownFirst | boolean | If true, shuts down the simulator before erasing. |
reset_sim_location
Resets the simulator's location to default.
set_sim_appearance
Sets the appearance mode (dark/light) of an iOS simulator.
| Parameter | Type | Description |
|---|---|---|
mode * | string | The appearance mode to set (either "dark" or "light") |
set_sim_location
Sets a custom GPS location for the simulator.
| Parameter | Type | Description |
|---|---|---|
latitude * | number | The latitude for the custom location. |
longitude * | number | The longitude for the custom location. |
sim_statusbar
Sets 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).
| Parameter | Type | Description |
|---|---|---|
dataNetwork * | string | Data network type to display in status bar. Use "clear" to reset all overrides. Valid values: clear, hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc. |
swift_package_build
Builds a Swift Package with swift build
| Parameter | Type | Description |
|---|---|---|
packagePath * | string | Path to the Swift package root (Required) |
architectures | array | Target architectures to build for |
configuration | string | Swift package configuration (debug, release) |
parseAsLibrary | boolean | Build as library instead of executable |
targetName | string | Optional target to build |
swift_package_clean
Cleans Swift Package build artifacts and derived data
| Parameter | Type | Description |
|---|---|---|
packagePath * | string | Path to the Swift package root (Required) |
swift_package_list
Lists currently running Swift Package processes
swift_package_run
Runs an executable target from a Swift Package with swift run
| Parameter | Type | Description |
|---|---|---|
packagePath * | string | Path to the Swift package root (Required) |
arguments | array | Arguments to pass to the executable |
background | boolean | Run in background and return immediately (default: false) |
configuration | string | Build configuration: 'debug' (default) or 'release' |
executableName | string | Name of executable to run (defaults to package name) |
parseAsLibrary | boolean | Add -parse-as-library flag for @main support (default: false) |
timeout | number | Timeout in seconds (default: 30, max: 300) |
swift_package_stop
Stops a running Swift Package executable started with swift_package_run
| Parameter | Type | Description |
|---|---|---|
pid * | number | Process ID (PID) of the running executable |
swift_package_test
Runs tests for a Swift Package with swift test
| Parameter | Type | Description |
|---|---|---|
packagePath * | string | Path to the Swift package root (Required) |
configuration | string | Swift package configuration (debug, release) |
filter | string | Filter tests by name (regex pattern) |
parallel | boolean | Run tests in parallel (default: true) |
parseAsLibrary | boolean | Add -parse-as-library flag for @main support (default: false) |
showCodecov | boolean | Show code coverage (default: false) |
testProduct | string | Optional specific test product to run |
button
Press hardware button on iOS simulator. Supported buttons: apple-pay, home, lock, side-button, siri
| Parameter | Type | Description |
|---|---|---|
buttonType * | string | |
duration | number |
gesture
Perform 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
| Parameter | Type | Description |
|---|---|---|
preset * | string | The gesture preset to perform. Must be one of: scroll-up, scroll-down, scroll-left, scroll-right, swipe-from-left-edge, swipe-from-right-edge, swipe-from-top-edge, swipe-from-bottom-edge. |
delta | number | Optional: Distance to move in pixels. |
duration | number | Optional: Duration of the gesture in seconds. |
postDelay | number | Optional: Delay after completing the gesture in seconds. |
preDelay | number | Optional: Delay before starting the gesture in seconds. |
screenHeight | integer | Optional: Screen height in pixels. Used for gesture calculations. Auto-detected if not provided. |
screenWidth | integer | Optional: Screen width in pixels. Used for gesture calculations. Auto-detected if not provided. |
key_press
Press a single key by keycode on the simulator. Common keycodes: 40=Return, 42=Backspace, 43=Tab, 44=Space, 58-67=F1-F10.
| Parameter | Type | Description |
|---|---|---|
keyCode * | integer | |
duration | number |
key_sequence
Press key sequence using HID keycodes on iOS simulator with configurable delay
| Parameter | Type | Description |
|---|---|---|
keyCodes * | array | |
delay | number |
long_press
Long press at specific coordinates for given duration (ms). Use describe_ui for precise coordinates (don't guess from screenshots).
| Parameter | Type | Description |
|---|---|---|
duration * | number | |
x * | integer | |
y * | integer |
swipe
Swipe from one point to another. Use describe_ui for precise coordinates (don't guess from screenshots). Supports configurable timing.
| Parameter | Type | Description |
|---|---|---|
x1 * | integer | |
x2 * | integer | |
y1 * | integer | |
y2 * | integer | |
delta | number | |
duration | number | |
postDelay | number | |
preDelay | number |
tap
Tap 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.
| Parameter | Type | Description |
|---|---|---|
id | string | |
label | string | |
postDelay | number | |
preDelay | number | |
x | integer | |
y | integer |
touch
Perform touch down/up events at specific coordinates. Use describe_ui for precise coordinates (don't guess from screenshots).
| Parameter | Type | Description |
|---|---|---|
x * | integer | |
y * | integer | |
delay | number | |
down | boolean | |
up | boolean |
type_text
Type text (supports US keyboard characters). Use describe_ui to find text field, tap to focus, then type.
| Parameter | Type | Description |
|---|---|---|
text * | string |