Integrations
Supports app archiving and IPA export for App Store distribution through export options plist integration
Enables iOS app deployment, testing on iOS simulators, and launching apps on physical iOS devices with log streaming capabilities
Provides macOS-specific tooling for Xcode project management and iOS development workflows
xcode-mcp
An MCP (Model Context Protocol) server that provides tools for Xcode-related operations, making it easier to work with Xcode projects from MCP clients like Claude Desktop. The server offers various utilities for Xcode project management, building, testing, archiving, code signing, and related iOS development tools.
Features
- Xcode project information retrieval and scheme listing
- Enhanced build capabilities with clean and custom output options
- Comprehensive test execution with granular control
- App archiving and IPA export for distribution
- Code signing and provisioning profile management
- Swift Package Manager integration
- iOS Simulator management via simctl
- NEW: Real Device App Deployment and Launch with automatic Xcode installation detection and improved device management
- Intelligent handling of app installation failures with auto-retry
- Smart caching of device and Xcode information for better performance
Installation
Usage
Using with Claude Desktop
- Open Claude Desktop config file:Copy
- Add or modify the following configuration:Copy
- Restart Claude Desktop.
Available Tools
1. xcode-project-info
Retrieves detailed information about an Xcode project or workspace, including targets, configurations, and schemes.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)
Example:
Sample Output:
2. xcode-list-schemes
Provides a comprehensive list of all available schemes, targets, and configurations in an Xcode project or workspace.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)
Example:
Sample Output:
3. xcode-build
Builds an Xcode project or workspace with enhanced options. Supports both workspace and project builds, clean builds, and custom output directories.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)scheme
(required): The scheme to buildconfiguration
(optional): Build configuration (e.g., Debug, Release)destination
(optional): Build destination (e.g., 'platform=iOS Simulator,name=iPhone 14')extraArgs
(optional): Additional xcodebuild arguments as array of stringsoutputDir
(optional): Custom build output directory (SYMROOT)clean
(optional): Whether to perform clean build (default: false)
Example:
Command Generated:
4. xcode-test
Runs tests for an Xcode project or workspace with extensive options. Provides fine-grained control over test execution, including running specific tests, test plans, and various testing modes.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)scheme
(required): The scheme to testdestination
(required): Test destination (e.g., 'platform=iOS Simulator,name=iPhone 14')testPlan
(optional): Name of the test plan to useonlyTesting
(optional): Array of specific test identifiers to runskipTesting
(optional): Array of test identifiers to skipresultBundlePath
(optional): Path to save test result bundlebuildForTesting
(optional): Build for testing only without running teststestWithoutBuilding
(optional): Run tests without building
Example:
Command Generated:
5. xcode-archive
Creates an archive (.xcarchive) of an Xcode project and optionally exports it to an IPA file for distribution. Supports App Store, ad-hoc, and enterprise distribution methods through export options plist.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)scheme
(required): The scheme to archiveconfiguration
(optional): Build configuration (e.g., Release)archivePath
(required): Path to save the .xcarchive fileexportPath
(optional): Path to export the archive (e.g., IPA file)exportOptionsPlist
(optional): Path to the exportOptions.plist file
Example:
Commands Generated:
6. xcode-codesign-info
Retrieves comprehensive code signing and provisioning profile information for an Xcode project. Shows installed code signing identities, project code signing settings, and provisioning profiles on the system.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)target
(optional): Specific target name
Example:
Sample Output:
7. swift-package-manager
Provides access to Swift Package Manager (SPM) functionality for managing Swift packages. Supports common SPM commands like init, update, resolve, reset, and clean.
Parameters:
command
(required): SPM command to execute ("init", "update", "resolve", "reset", "clean")packageDir
(required): Directory path of the Swift PackageextraArgs
(optional): Additional SPM arguments as array of strings
Example:
Command Generated:
Sample Output:
8. simctl-manager
Provides access to iOS Simulator management capabilities via the simctl
command-line tool. Supports listing, creating, booting, installing apps, and managing simulator devices.
Parameters:
command
(required): SimCtl command ("list", "create", "boot", "shutdown", "erase", "install", "launch", "delete")extraArgs
(optional): Additional simctl arguments as array of strings
Example:
Command Generated:
Sample Output (abbreviated):
9. run-on-device
Builds, installs, and runs an app on a physical iOS device. Supports device name (including Korean names) or UUID for device selection, environment variables, and log streaming. Now with direct bundleId specification, skip build option, and additional launch arguments.
Parameters:
projectPath
(required): Path to the Xcode project (.xcodeproj) or workspace (.xcworkspace)scheme
(required): The scheme to build and rundevice
(required): Device identifier or name (supports Korean names)configuration
(optional): Build configuration (e.g., Debug, Release)streamLogs
(optional): Whether to stream device logs after launchingstartStopped
(optional): Whether to start the app in a paused state for debugger attachmentenvironmentVars
(optional): Environment variables to pass to the app (key1=value1,key2=value2 format)xcodePath
(optional): Xcode application path (default: "/Applications/Xcode-16.2.0.app")listDevices
(optional): Display all detected devices with their IDs before runningskipBuild
(optional): Skip the build and install step for already installed appsextraLaunchArgs
(optional): Additional arguments to pass to the devicectl launch commanddirectBundleId
(optional): Directly specify the bundle ID instead of extracting from project
Example:
Process:
- The tool identifies both Xcode UDID and CoreDevice UUID for the specified device
- It uses the Xcode UDID for building and installing the app
- It uses the CoreDevice UUID for launching the app with
devicectl
- It retrieves the app's bundle identifier
- If requested, it streams the device logs
Key Improvements in v0.4.0:
- Ability to specify bundleId directly without needing a project
- Skip build and install step for already installed apps
- Support for additional devicectl launch command arguments
- Better device model and OS version information display
- Improved path handling and logging for devicectl commands
Sample Output:
Example Scenario: Using with LLMs
Below is an example of how you might prompt an LLM like Claude to use these tools in sequence:
User Prompt to Claude:
Expected Workflow:
- Claude will execute the
xcode-list-schemes
tool to retrieve all schemes:Copy - Claude will execute the
xcode-test
tool with the identified scheme:Copy - Claude will then use the
xcode-archive
tool to create an archive:Copy
This workflow demonstrates how to chain multiple tools together, using the output from one tool to inform the parameters for another.
Example: Running on a Real Device
User Prompt to Claude:
Expected Workflow:
- Claude will first get the list of devices:Copy
- Claude will identify your physical device and run the app on it:Copy
- For quick re-launch without rebuilding:Copy
Security Considerations
This tool can execute Xcode-related commands, which poses security risks. Please note:
- Only use with trusted Xcode projects.
- Be cautious with projects from unknown sources.
- Do not include sensitive information in build parameters.
Development
Requirements
- Node.js 16 or higher
- npm 6 or higher
- Xcode 14 or higher (for all features)
- Xcode 16 or higher (required for
devicectl
and real device features)
Local Development and Testing
License
MIT
You must be authenticated.
Tools
A Model Context Protocol server that provides tools for Xcode-related operations, making it easier to work with iOS project management, building, testing, archiving, and deploying apps to both simulators and physical devices.