xcode
MCP (Model Context Protocol) server for Xcode integration with AI assistants
claude mcp add --transport stdio proofmath-owner-xcode-mcp node /path/to/xcode-mcp/build/index.js \ --env LOG_LEVEL="1"
How to use
The Xcode MCP Server is a comprehensive Model Context Protocol server tailored for iOS development workflows. It exposes a suite of tools to create, build, manage, and test Xcode projects, simulate devices, manage Swift packages, and perform code quality tasks like linting and formatting. Clients can connect to the server via Node.js execution of the built index.js file, and then invoke the available tools through natural language prompts that map to the underlying actions (e.g., create_xcode_project, build_project, list_simulators, analyze_swift_code). The included tooling covers project lifecycle from scratch generation to distribution artifacts, as well as simulator lifecycle and Swift package management, enabling AI assistants to orchestrate end-to-end iOS development tasks.
To use the server, run it with Node.js and point your client (e.g., Claude Desktop or other MCP clients) at the built index.js. The server will expose commands under the xcode namespace that you can invoke via your client’s MCP interface. For example, you can request creating a new Xcode project, then building it, adding dependencies, configuring code signing, and finally simulating the app. The tooling set is organized into Build Tools, Simulator Tools, Swift Tools, and Project Tools, each with a defined set of capabilities and parameters. The server also supports performance optimizations like caching and parallel operations to speed up repetitive tasks and multi-target builds.
How to install
Prerequisites:
- Node.js 18+ installed on your machine
- Xcode 15+ installed from the Mac App Store
- Xcode Command Line Tools (xcode-select --install)
Installation steps:
- Clone the repository
git clone https://github.com/yourusername/xcode-mcp.git
cd xcode-mcp
- Install dependencies
npm install
- Build the project
npm run build
- Run tests (optional)
npm test
- Start the MCP server (example)
node build/index.js
Configuration for clients:
- If integrating with Claude or another MCP client, configure the client to connect to the server at the built index.js entry point and ensure the appropriate environment variables are set as needed.
Additional notes
Tips and notes:
- The server is Node.js-based; ensure your environment has Node 18+ and npm installed.
- Xcode and command line tools must be installed and properly configured; issues often stem from xcode-select path problems.
- You can adjust log verbosity via the LOG_LEVEL environment variable provided in the mcp_config example (0=DEBUG, 1=INFO, 2=WARN, 3=ERROR).
- For full functionality, install optional tools like SwiftLint, SwiftFormat, and Jazzy as outlined in the README to enable code analysis, formatting, and documentation generation.
- If you encounter build or tool resolution issues, verify that xcodebuild can be invoked from the command line and that Swift Package dependencies resolve correctly.
- When integrating with Claude Desktop, ensure the path in the config matches where your built index.js resides; adjust "/path/to/xcode-mcp/build/index.js" accordingly.
Related MCP Servers
XcodeBuildMCP
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
mcp -simulator-ios-idb
A Model Context Protocol (MCP) server that enables LLMs to interact with iOS simulators through natural language commands.
mobile
A Model Context Protocol (MCP) server that provides mobile automation capabilities.
mirroir
MCP server for controlling a real iPhone via macOS iPhone Mirroring...and any MacOs app. Screenshot, tap, swipe, type — from any MCP client.
swift-patterns
An MCP server providing curated Swift and SwiftUI best practices from leading iOS sources.
apple-notes
MCP server for Apple Notes - create, search, update, and manage notes via Claude and other AI assistants