xcmcp is a macOS-focused toolkit for Xcode, Simulator, Accessibility, and AppleScript automation.
The repository has two main faces:
cmd/xcmcpis a stdio MCP server for project inspection, build and test, simulator control, device control, UI inspection, and Xcode integration.cmd/xcis a direct CLI built on the same packages for local use from a terminal.
It also includes focused tools for macOS automation:
cmd/axandcmd/axmcpfor the macOS Accessibility API.cmd/ascriptandcmd/ascriptmcpfor AppleScript dictionaries and scriptable applications.
- macOS with Xcode installed.
- Command Line Tools available through
xcrun. - Go 1.26 or newer to build from source.
- Accessibility permission for commands that drive the UI, including
xcmcp,xc,ax, andaxmcp. - A booted simulator or connected device for simulator and device workflows.
Build the commands you need:
go install ./cmd/xcmcp ./cmd/xc ./cmd/ax ./cmd/axmcp ./cmd/ascript ./cmd/ascriptmcp
Or build everything in the module:
go build ./...
Run the MCP server:
xcmcp
xcmcp starts with:
- core project, build, test, simulator, and Xcode target tools
- MCP resources
- Xcode bridge tools via
xcrun mcpbridge
Optional toolsets can be enabled at startup:
xcmcp --enable-ui-tools --enable-device-tools --enable-ios-tools
Or all at once:
xcmcp --enable-all
An MCP client configuration usually looks like this:
{
"mcpServers": {
"xcmcp": {
"command": "/absolute/path/to/xcmcp",
"args": [
"--enable-ui-tools",
"--enable-device-tools",
"--enable-ios-tools"
]
}
}
}
Within a session, optional toolsets can also be enabled dynamically with list_toolsets and enable_toolset.
xcmcp serves tools and resources over stdio.
Always-on native tools include:
discover_projects,list_schemes,show_build_settingsbuild,testlist_simulators,boot_simulator,shutdown_simulatorxcode_add_targetlist_toolsets,enable_toolset
The Xcode bridge toolset is enabled by default and adds IDE-facing tools discovered from xcrun mcpbridge.
Optional toolsets include:
app: app lifecycle, install, uninstall, logs, and app listingui: UI tree, tap, inspect, query, screenshot, and waitdevice: simulator orientation, privacy, location, appearance, and screenshotsios: direct CoreSimulator-based accessibility tree and hit-testingsimulator_extras: open URL, add media, and app container lookupphysical_device: connected device inspection and app lifecycle actionsvideo: simulator recordingcrash: crash report listing and readingfilesystem: file access helpersdependency: Swift Package Manager helpersasc: App Store Connect andaltoolhelpers
xc exposes the same building blocks as a direct CLI.
Examples:
xc sims list
xc build --scheme MyApp
xc test --scheme MyApp
xc app launch com.example.MyApp --udid booted
xc ui tree --bundle-id com.apple.finder
xc ios tree --udid booted
xc xcode add-target --template "Widget Extension" --product MyWidget
These commands target the macOS Accessibility API directly.
Examples:
ax apps
ax tree com.apple.finder
ax find com.apple.dt.Xcode --role AXButton --title Build
axmcp exposes similar functionality as MCP tools.
These commands inspect scriptable applications and run AppleScript-backed operations.
Examples:
ascript list /Applications/Xcode.app
ascript classes /Applications/Finder.app
ascript script /Applications/Finder.app activate
xcmcp currently registers these MCP resources by default:
xcmcp://projectxcmcp://simulatorsxcmcp://appsxcmcp://apps/{bundle_id}/treexcmcp://apps/{bundle_id}/logs
This module is command-first. The reusable helper packages live under internal/
and are not intended as a public import surface.
The main internal packages are:
internal/project: discover Xcode projects and inspect schemes and build settingsinternal/xcodebuild: build and test wrappersinternal/simctl: simulator management throughxcrun simctlinternal/devicectl: physical device managementinternal/ui: macOS Accessibility access and UI screenshotsinternal/screen: screen capture helpersinternal/crash: crash report listing and readinginternal/resources: MCP resource registrationinternal/sdef: parser for AppleScript scripting definitionsinternal/altoolandinternal/asc: App Store Connect helpers
- This repository targets macOS. Many packages use AppKit, Accessibility, or Apple developer tools directly.
- UI automation depends on macOS Accessibility permission and on the target app being reachable through the Accessibility tree.
- Some simulator and Xcode automation features rely on private or implementation-defined behavior and are best treated as developer tooling rather than a stable public protocol.
- The supported entry points are the commands in
cmd/. The internal packages may change without notice.