An MCP (Model Context Protocol) server for Xcode and iOS development automation. Build projects, manage simulators, and add Swift package dependencies programmatically.
- Build Xcode Projects - Build
.xcodeprojor.xcworkspacewith custom schemes and configurations - Manage Simulators - List available iOS simulators and run apps on them
- Add Swift Packages - Programmatically add Swift Package Manager dependencies to projects
- List Schemes - Discover available build schemes in a project
- macOS with Xcode installed
- Node.js 18 or later
- Xcode Command Line Tools (
xcode-select --install)
git clone https://github.com/engindearing-projects/xcode-mcp.git
cd xcode-mcp
npm installAdd to your claude_desktop_config.json (update the path to where you cloned the repo):
{
"mcpServers": {
"xcode": {
"command": "node",
"args": ["/path/to/xcode-mcp/index.js"]
}
}
}- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Build an Xcode project or workspace.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
projectPath |
string | Yes | Path to .xcodeproj, .xcworkspace, or directory containing one |
scheme |
string | No | Build scheme name |
configuration |
string | No | Build configuration (Debug or Release) |
destination |
string | No | Build destination (defaults to first available iPhone simulator) |
Example:
{
"projectPath": "/path/to/MyApp",
"scheme": "MyApp",
"configuration": "Debug"
}List all available iOS simulators.
Parameters: None
Returns:
{
"devices": [
{
"name": "iPhone 15",
"udid": "...",
"state": "Shutdown",
"runtime": "iOS-17-0"
}
]
}List available schemes in an Xcode project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
projectPath |
string | Yes | Path to project or directory |
Build and run a project on an iOS simulator.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
projectPath |
string | Yes | Path to project or directory |
scheme |
string | No | Build scheme name |
simulatorName |
string | No | Simulator name (defaults to first available iPhone) |
Add a Swift Package Manager dependency to an Xcode project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
projectPath |
string | Yes | Path to .xcodeproj or directory |
packageUrl |
string | Yes | Git URL of the Swift package |
packageName |
string | Yes | Name of the package |
version |
string | No | Minimum version (default: 2.0.0) |
productNames |
string[] | No | Product names to add (default: [packageName]) |
Example:
{
"projectPath": "/path/to/MyApp.xcodeproj",
"packageUrl": "https://github.com/Alamofire/Alamofire",
"packageName": "Alamofire",
"version": "5.0.0"
}npm startnpx @modelcontextprotocol/inspector node index.jsContributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT - see LICENSE for details.