cameroncooke_xcodebuildmcp

v1.15.1
@iflow-mcp/cameroncooke_xcodebuildmcp Checked 10 hours ago Published 10 months ago

XcodeBuildMCP 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.

ParameterTypeDescription
bundleIdstringBundle identifier of the app to attach (e.g., 'com.example.MyApp')
continueOnAttachbooleanResume execution automatically after attaching (default: true)
makeCurrentbooleanSet this debug session as the current session (default: true)
pidintegerProcess ID to attach directly
waitForbooleanWait for the process to appear when attaching

debug_breakpoint_add

Add a breakpoint by file/line or function name for the active debug session.

ParameterTypeDescription
conditionstringOptional condition expression for the breakpoint
debugSessionIdstringDebug session ID to target (defaults to current session)
filestringSource file path for breakpoint
functionstringFunction name to break on
lineintegerLine number for breakpoint

debug_breakpoint_remove

Remove a breakpoint by id for the active debug session.

ParameterTypeDescription
breakpointId *integerBreakpoint id to remove
debugSessionIdstringDebug session ID to target (defaults to current session)

debug_continue

Resume execution in the active debug session or a specific debugSessionId.

ParameterTypeDescription
debugSessionIdstringDebug session ID to resume (defaults to current session)

debug_detach

Detach the current debugger session or a specific debugSessionId.

ParameterTypeDescription
debugSessionIdstringDebug session ID to detach (defaults to current session)

debug_lldb_command

Run an arbitrary LLDB command within the active debug session.

ParameterTypeDescription
command *string
debugSessionIdstring
timeoutMsinteger

debug_stack

Return a thread backtrace from the active debug session.

ParameterTypeDescription
debugSessionIdstringDebug session ID to target (defaults to current session)
maxFramesintegerMaximum frames to return
threadIndexintegerThread index for backtrace

debug_variables

Return variables for a selected frame in the active debug session.

ParameterTypeDescription
debugSessionIdstringDebug session ID to target (defaults to current session)
frameIndexintegerFrame index to inspect

build_device

Builds an app for a connected device.

ParameterTypeDescription
derivedDataPathstringPath to derived data directory
extraArgsarrayAdditional arguments to pass to xcodebuild
preferXcodebuildbooleanPrefer xcodebuild over faster alternatives

clean

Cleans build products with xcodebuild.

ParameterTypeDescription
derivedDataPathstringOptional: Path where derived data might be located
extraArgsarrayAdditional xcodebuild arguments
platformstringOptional: Platform to clean for (defaults to iOS). Choose from macOS, iOS, iOS Simulator, watchOS, watchOS Simulator, tvOS, tvOS Simulator, visionOS, visionOS Simulator
preferXcodebuildbooleanIf 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.

ParameterTypeDescription
workspaceRoot *stringThe absolute path of the workspace root to scan within.
maxDepthintegerOptional: Maximum directory depth to scan. Defaults to 5.
scanPathstringOptional: 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' })

ParameterTypeDescription
appPath *stringPath 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.

ParameterTypeDescription
platformstringTarget platform (defaults to iOS)

install_app_device

Installs an app on a connected device.

ParameterTypeDescription
appPath *stringPath to the .app bundle to install (full path to the .app directory)

launch_app_device

Launches an app on a connected device.

ParameterTypeDescription
bundleId *stringBundle 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.

ParameterTypeDescription
bundleId *stringBundle identifier of the app to launch and capture logs for.

stop_app_device

Stops a running app on a connected device.

ParameterTypeDescription
processId *numberProcess ID (PID) of the app to stop

stop_device_log_cap

Stops an active Apple device log capture session and returns the captured logs.

ParameterTypeDescription
logSessionId *stringThe session ID returned by start_device_log_cap.

test_device

Runs tests on a physical Apple device.

ParameterTypeDescription
derivedDataPathstringPath to derived data directory
extraArgsarrayAdditional arguments to pass to xcodebuild
platformstringTarget platform (defaults to iOS)
preferXcodebuildbooleanPrefer xcodebuild over faster alternatives
testRunnerEnvobjectEnvironment 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.

ParameterTypeDescription
enabledbooleanOptional: 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.

ParameterTypeDescription
bundleId *stringBundle identifier of the app to capture logs for.
captureConsolebooleanWhether to capture console output (requires app relaunch).

stop_sim_log_cap

Stops an active simulator log capture session and returns the captured logs.

ParameterTypeDescription
logSessionId *stringThe session ID returned by start_sim_log_cap.

build_macos

Builds a macOS app.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf true, prefers xcodebuild over the experimental incremental build system

build_run_macos

Builds and runs a macOS app.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf true, prefers xcodebuild over the experimental incremental build system

get_mac_app_path

Retrieves the built macOS app bundle path.

ParameterTypeDescription
derivedDataPathstringPath to derived data directory
extraArgsarrayAdditional 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.

ParameterTypeDescription
appPath *stringPath 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.

ParameterTypeDescription
appPath *stringPath to the macOS .app bundle to launch (full path to the .app directory)
argsarrayAdditional arguments to pass to the app

stop_mac_app

Stops a running macOS application. Can stop by app name or process ID.

ParameterTypeDescription
appNamestringName of the application to stop (e.g., "Calculator" or "MyApp")
processIdnumberProcess ID (PID) of the application to stop

test_macos

Runs tests for a macOS target.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf true, prefers xcodebuild over the experimental incremental build system
testRunnerEnvobjectEnvironment 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.

ParameterTypeDescription
outputPath *stringPath where the project should be created
projectName *stringName of the new project
bundleIdentifierstringBundle identifier (e.g., com.example.myapp). If not provided, will use com.example.projectname
currentProjectVersionstringBuild number (e.g., 1, 42, 100). If not provided, will use 1
customizeNamesbooleanWhether to customize project names and identifiers. Default is true.
deploymentTargetstringiOS deployment target (e.g., 18.4, 17.0). If not provided, will use 18.4
displayNamestringApp display name (shown on home screen/dock). If not provided, will use projectName
marketingVersionstringMarketing version (e.g., 1.0, 2.1.3). If not provided, will use 1.0
supportedOrientationsarraySupported orientations for iPhone
supportedOrientationsIpadarraySupported orientations for iPad
targetedDeviceFamilyarrayTargeted 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.

ParameterTypeDescription
outputPath *stringPath where the project should be created
projectName *stringName of the new project
bundleIdentifierstringBundle identifier (e.g., com.example.myapp). If not provided, will use com.example.projectname
currentProjectVersionstringBuild number (e.g., 1, 42, 100). If not provided, will use 1
customizeNamesbooleanWhether to customize project names and identifiers. Default is true.
deploymentTargetstringmacOS deployment target (e.g., 15.4, 14.0). If not provided, will use 15.4
displayNamestringApp display name (shown on home screen/dock). If not provided, will use projectName
marketingVersionstringMarketing version (e.g., 1.0, 2.1.3). If not provided, will use 1.0

session-clear-defaults

Clear selected or all session defaults.

ParameterTypeDescription
allboolean
keysarray

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.

ParameterTypeDescription
archstringTarget architecture for macOS builds.
configurationstringBuild configuration, e.g. Debug or Release.
deviceIdstringPhysical device ID for device workflows.
projectPathstringXcode project (.xcodeproj) path. Mutually exclusive with workspacePath. Required for most build/test tools when workspacePath is not set.
schemestringXcode scheme. Required by most build/test tools. Use list_schemes to discover available schemes before setting.
simulatorIdstringSimulator UUID for simulator workflows. Preferred over simulatorName when both are provided.
simulatorNamestringSimulator device name for simulator workflows. If simulatorId is also provided, simulatorId is preferred and simulatorName is ignored.
suppressWarningsbooleanWhen true, warning messages are filtered from build output to conserve context
useLatestOSbooleanWhen true, prefer the latest available OS for simulatorName lookups.
workspacePathstringXcode 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.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf 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.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf 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.

ParameterTypeDescription
platform *stringTarget simulator platform (Required)

install_app_sim

Installs an app in an iOS simulator.

ParameterTypeDescription
appPath *stringPath 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.

ParameterTypeDescription
bundleId *stringBundle identifier of the app to launch (e.g., 'com.example.MyApp')
argsarrayAdditional arguments to pass to the app

launch_app_sim

Launches an app in an iOS simulator.

ParameterTypeDescription
bundleId *stringBundle identifier of the app to launch (e.g., 'com.example.MyApp')
argsarrayAdditional arguments to pass to the app

list_sims

Lists available iOS simulators with their UUIDs.

ParameterTypeDescription
enabledbooleanOptional 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.

ParameterTypeDescription
fpsintegerFrames per second (default 30)
outputFilestringDestination MP4 path to move the recorded video to on stop
startbooleanStart recording if true
stopbooleanStop 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.

ParameterTypeDescription
bundleId *stringBundle identifier of the app to stop (e.g., 'com.example.MyApp')

test_sim

Runs tests on an iOS simulator.

ParameterTypeDescription
derivedDataPathstringPath where build products and other derived data will go
extraArgsarrayAdditional xcodebuild arguments
preferXcodebuildbooleanIf true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails.
testRunnerEnvobjectEnvironment variables to pass to the test runner (TEST_RUNNER_ prefix added automatically)

erase_sims

Erases a simulator by UDID.

ParameterTypeDescription
shutdownFirstbooleanIf 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.

ParameterTypeDescription
mode *stringThe appearance mode to set (either "dark" or "light")

set_sim_location

Sets a custom GPS location for the simulator.

ParameterTypeDescription
latitude *numberThe latitude for the custom location.
longitude *numberThe 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).

ParameterTypeDescription
dataNetwork *stringData 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

ParameterTypeDescription
packagePath *stringPath to the Swift package root (Required)
architecturesarrayTarget architectures to build for
configurationstringSwift package configuration (debug, release)
parseAsLibrarybooleanBuild as library instead of executable
targetNamestringOptional target to build

swift_package_clean

Cleans Swift Package build artifacts and derived data

ParameterTypeDescription
packagePath *stringPath 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

ParameterTypeDescription
packagePath *stringPath to the Swift package root (Required)
argumentsarrayArguments to pass to the executable
backgroundbooleanRun in background and return immediately (default: false)
configurationstringBuild configuration: 'debug' (default) or 'release'
executableNamestringName of executable to run (defaults to package name)
parseAsLibrarybooleanAdd -parse-as-library flag for @main support (default: false)
timeoutnumberTimeout in seconds (default: 30, max: 300)

swift_package_stop

Stops a running Swift Package executable started with swift_package_run

ParameterTypeDescription
pid *numberProcess ID (PID) of the running executable

swift_package_test

Runs tests for a Swift Package with swift test

ParameterTypeDescription
packagePath *stringPath to the Swift package root (Required)
configurationstringSwift package configuration (debug, release)
filterstringFilter tests by name (regex pattern)
parallelbooleanRun tests in parallel (default: true)
parseAsLibrarybooleanAdd -parse-as-library flag for @main support (default: false)
showCodecovbooleanShow code coverage (default: false)
testProductstringOptional specific test product to run

button

Press hardware button on iOS simulator. Supported buttons: apple-pay, home, lock, side-button, siri

ParameterTypeDescription
buttonType *string
durationnumber

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

ParameterTypeDescription
preset *stringThe 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.
deltanumberOptional: Distance to move in pixels.
durationnumberOptional: Duration of the gesture in seconds.
postDelaynumberOptional: Delay after completing the gesture in seconds.
preDelaynumberOptional: Delay before starting the gesture in seconds.
screenHeightintegerOptional: Screen height in pixels. Used for gesture calculations. Auto-detected if not provided.
screenWidthintegerOptional: 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.

ParameterTypeDescription
keyCode *integer
durationnumber

key_sequence

Press key sequence using HID keycodes on iOS simulator with configurable delay

ParameterTypeDescription
keyCodes *array
delaynumber

long_press

Long press at specific coordinates for given duration (ms). Use describe_ui for precise coordinates (don't guess from screenshots).

ParameterTypeDescription
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.

ParameterTypeDescription
x1 *integer
x2 *integer
y1 *integer
y2 *integer
deltanumber
durationnumber
postDelaynumber
preDelaynumber

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.

ParameterTypeDescription
idstring
labelstring
postDelaynumber
preDelaynumber
xinteger
yinteger

touch

Perform touch down/up events at specific coordinates. Use describe_ui for precise coordinates (don't guess from screenshots).

ParameterTypeDescription
x *integer
y *integer
delaynumber
downboolean
upboolean

type_text

Type text (supports US keyboard characters). Use describe_ui to find text field, tap to focus, then type.

ParameterTypeDescription
text *string