Skip to main content
Glama

xcode-mcp

An MCP (Model Context Protocol) server for Xcode and iOS development automation. Build projects, manage simulators, and add Swift package dependencies programmatically.

Features

  • Build Xcode Projects - Build .xcodeproj or .xcworkspace with 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

Related MCP server: Xcode MCP Server

Requirements

  • macOS with Xcode installed

  • Node.js 18 or later

  • Xcode Command Line Tools (xcode-select --install)

Installation

git clone https://github.com/jfuginay/xcode-mcp.git
cd xcode-mcp
npm install

Configuration

Claude Desktop

Add 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"]
    }
  }
}

Config file locations

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Tools

build_project

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_simulators

List all available iOS simulators.

Parameters: None

Returns:

{
  "devices": [
    {
      "name": "iPhone 15",
      "udid": "...",
      "state": "Shutdown",
      "runtime": "iOS-17-0"
    }
  ]
}

list_schemes

List available schemes in an Xcode project.

Parameters:

Name

Type

Required

Description

projectPath

string

Yes

Path to project or directory

run_on_simulator

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_swift_package

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"
}

Development

Running locally

npm start

Testing with MCP Inspector

npx @modelcontextprotocol/inspector node index.js

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT - see LICENSE for details.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      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.
      9
      12 npm
      9
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides programmatic access to Xcode functionality, enabling AI assistants to create, build, test, and manage iOS/macOS projects directly.
      33
      5
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to build, test, run, and manage Apple platform projects (iOS, macOS, tvOS, watchOS, visionOS) directly through Xcode. Provides comprehensive control over Xcode projects, Swift packages, simulators, and development workflows without leaving your editor.
      5
      3
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Provides structured access to Xcode development tools including xcrun, xcodebuild, and xctrace for building, testing, and analyzing projects.
      15
      2
      MIT