Xcode MCP Server

An MCP server for Xcode on macOS: the agent creates projects, builds and tests apps, installs dependencies and drives the iOS simulator

  • 387 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • The agent writes files in the projects folder, runs builds and arbitrary xcrun and pod commands and also archives and exports apps for the App Store
  • One tool runs any pod command, and file access is limited only by the directories you set
All reasons and checks

r-huijts/xcode-mcp-server

Install

Manual install

git clone https://github.com/r-huijts/xcode-mcp-server.git && cd xcode-mcp-server && chmod +x setup.sh && ./setup.sh

The script checks the environment, installs dependencies, builds the project, creates .env and, if you agree, adds an entry to the Claude Desktop configuration.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent writes files in the projects folder, runs builds and arbitrary xcrun and pod commands and also archives and exports apps for the App Store
  • One tool runs any pod command, and file access is limited only by the directories you set

This is third-party code. Review the repository files before installing.

What it does

Xcode MCP Server gives an agent a way to work with Xcode projects on a Mac. The agent creates a project from a template for iOS, macOS, watchOS or tvOS, adds files to the right target and group and reads project and workspace schemes. The file tools read and write text in different encodings, handle binary files through base64 and search by pattern or regular expression. For building there is a configurable project build, a test run with a detailed failure report, static analysis, cleaning and archiving. Separate tool groups cover CocoaPods (initialize, install, update, add and remove dependencies) and Swift Package Manager (new packages, dependencies, updates, DocC documentation, builds and tests). The iOS simulator is driven by commands: list devices, boot and shut down, install and launch apps, take screenshots, record video and change settings. The server also runs `xcrun` commands, compiles asset catalogs, builds app icon sets from a source image, exports and validates archives for the App Store and switches Xcode versions. File access is limited to a base projects folder and a list of allowed paths.

Who it is for. For Apple platform developers who want to hand an agent builds, tests, dependencies and launching the app in the simulator without leaving the conversation.

Good fit when

  • You need a new Xcode project for iOS from a template with a Swift package such as Alamofire added right away
  • The agent should build a scheme, run tests and find the broken spot from the failure report
  • You want to run the app in the simulator and take a screenshot or record video for a bug report
  • The project needs dependencies installed or updated through CocoaPods or Swift Package Manager
  • Before an App Store release you need to build, export and validate an archive

Not a fit when

  • You use Windows or Linux: the server runs only on macOS with Xcode installed
  • You only need to write SwiftUI code: the server is unnecessary, the agent's ordinary file tools are enough
  • The agent must not run arbitrary commands: the server can run any pod and xcrun command
  • You need to drive a physical device: the tools are built for the simulator

Example request

Create an iOS project MyApp in Swift with tests, add Alamofire through Swift Package Manager, build the Debug scheme and run the tests.

MCP

Transport
stdio, http
Authentication
not required

Environment variables

PROJECTS_BASE_DIR required
The base projects folder; file operations outside it are blocked
ALLOWED_PATHS
Additional allowed directories, comma-separated
DEBUG
Verbose logging, false by default
PORT
Server port, 3000 by default

Limitations

It runs on macOS only. It needs Xcode 14 or newer, Node.js 16 or newer and npm, Swift 5.5 or newer for Swift Package Manager and Ruby as well for CocoaPods. The server is not on the npm registry: you build it from source with `npm install` and `npm run build` or with the `setup.sh` script, which checks the environment and creates the `.env` file.

There is one required setting, the projects folder in `PROJECTS_BASE_DIR`. All file operations are limited to it and to the paths in `ALLOWED_PATHS`, and the server will open nothing else. A detailed log is switched on with `DEBUG`.

The launch story is unclear. In the Claude Desktop section the server starts with the `node` command on the `dist/index.js` file, while the general description says to point the client at an address such as `http://localhost:3000`, with the port set by `PORT`. Choose the way your client supports. The latest commit in the repository dates from February 2026.

How to disable. Delete the xcode entry from claude_desktop_config.json and restart the client. If you started the server by hand with `npm start`, stop the process. You can delete the clone folder and the `.env` file.

FAQ

How do I connect Xcode to Claude Desktop?

Build the server with npm install and npm run build, then add an xcode entry to claude_desktop_config.json with the command node and the path to dist/index.js. The setup.sh script does the same with prompts and can write the configuration entry itself.

What do I need to run it?

A Mac with Xcode 14 or newer and the command line tools, and Node.js 16 or newer. Swift Package Manager needs Swift 5.5 or newer, and CocoaPods needs Ruby and CocoaPods itself.

How do I limit the folders the server can access?

Set PROJECTS_BASE_DIR for the main projects folder and list extra directories in ALLOWED_PATHS separated by commas. Every path is validated, and outside these directories the server reads and writes nothing.

What can the server do in the iOS simulator?

It lists devices, boots and shuts them down, installs and launches apps, takes screenshots, records video and manages simulator settings.

How does Xcode MCP Server differ from simulator-only tools?

The server covers the whole development cycle: project creation, files, builds, tests, packages and the simulator. Narrow simulator tools, such as MCP Server for iOS Simulator, drive only the device itself.

Discussion

No questions or reviews yet.

An MCP server for the iOS Simulator: taps, swipes, text input, accessibility tree, screenshots, video and app control

MCP serverExtended access2.2KRepository stars

An MCP server that takes plain-language commands and drives the iOS Simulator through idb: apps, taps, logs

MCP serverExtended access343Repository stars
Official

An MCP server and CLI from Sentry for building, running and testing Xcode iOS and macOS projects from an AI agent

MCP serverExtended access6.5KRepository stars

An MCP server to drive iOS and Android: simulators, emulators and real devices via accessibility trees and screenshots

MCP serverBroad access10.3KRepository stars

MCP server for Apple's official developer docs: search frameworks, APIs, code samples and WWDC sessions from your agent

MCP serverExtended access1.4KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Xcode MCP Server (this card)nonot required387
iOS Simulator Skillno1,311a skill with scripts for building and driving the simulator, without projects, packages and dependencies
MCP Server for iOS Simulatornonot required343drives only the iOS simulator through idb

README in short

The README splits the capabilities into seven groups, explains two ways to install and walks through common build, permission and configuration failures. The how-it-works section describes the server's layers: tool registration, path validation, project type detection and safe launching of external processes, and the JavaScript examples show creating a project, writing a file and running tests.

README badge

Report a problem

Foxx AIXcode MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.