Server facts
xcode-mcp-server
GitHub stars
386
Last commit
Feb 2, 2026
Runtime
node
License
MIT
Project
- Author
- r-huijts
- Repository
- github.com/r-huijts/xcode-mcp-server
- License
- MIT
- Category
- Developer Tools
Tech
- Runtime
- node
- Transports
- stdiohttp
- Remote access
- No
- Authentication
- None locally (path-restricted via PROJECTS_BASE_DIR and ALLOWED_PATHS)
Activity
- GitHub stars
- 386
- Last commit
- Data as of
Overview
Apple-platform engineers wiring an `xcode mcp` environment on macOS can run `r-huijts/xcode-mcp-server` (MIT license) on Node.js v16+ alongside Xcode 14.0+ and Swift 5.5+. An interactive `./setup.sh` installer checks macOS, Xcode, Node.js, Ruby, and optional CocoaPods prerequisites, builds the TypeScript project (`npm install && npm run build`), creates `.env` with your mandatory `PROJECTS_BASE_DIR`, and optionally configures `claude_desktop_config.json` over local `stdio` (`node /path/to/xcode-mcp-server/dist/index.js`). Teams automating CI or custom setups can follow manual installation and also run the server via `npm start` on a configurable local port (`PORT` defaulting to `3000`, or `--port` and `--projects-dir` CLI flags).
Across modular handlers covering project management, workspace files, builds, CocoaPods, Swift Package Manager, iOS Simulator control, and Xcode utilities, the server understands `.xcodeproj`, `.xcworkspace`, and `Package.swift` layouts natively. Agents can scaffold iOS, macOS, watchOS, or tvOS apps (`create_xcode_project`), add Swift dependencies (`add_swift_package`), search or edit source files with encoding and base64 binary handling (`read_file`, `write_file`, `search_in_files`), invoke builds and test plans (`build_project`, `test_project`), boot simulators for screenshots or recordings, compile asset catalogs, generate DocC docs, and validate App Store archives. Every file operation is constrained to `PROJECTS_BASE_DIR` and optional comma-separated `ALLOWED_PATHS`, with Zod input validation and `--debug` logging.
Install & configure
Requirements
- macOS with Xcode 14.0+ and Xcode Command Line Tools (`xcode-select --install`)
- Node.js v16+ with npm or yarn, plus Swift 5.5+ for Swift Package Manager features
- Optional Ruby and CocoaPods (`sudo gem install cocoapods`) for CocoaPods tools, and a valid `PROJECTS_BASE_DIR` path
npm install && npm run buildClone `r-huijts/xcode-mcp-server` and run `./setup.sh` for guided macOS verification, `npm install && npm run build`, `.env` creation, and Claude Desktop setup—or build manually, configure `PROJECTS_BASE_DIR` and optional `ALLOWED_PATHS`, and register `node /path/to/xcode-mcp-server/dist/index.js` in `claude_desktop_config.json`.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/path/to/xcode-mcp-server/dist/index.js"
]
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/path/to/xcode-mcp-server/dist/index.js"
]
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"xcode": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/xcode-mcp-server/dist/index.js"
]
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/path/to/xcode-mcp-server/dist/index.js"
]
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"xcode": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/xcode-mcp-server/dist/index.js"
]
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| create_xcode_project | Scaffold a new Xcode project from platform templates (iOS, macOS, watchOS, tvOS) with organization settings, language, tests, and active-project selection. |
| add_swift_package | Add a Swift Package Manager dependency by Git URL and version requirement to an active Xcode or Swift package project. |
| read_file | Read a project file within allowed directories using a specified text encoding. |
| write_file | Write file content inside allowed project paths, optionally creating missing files automatically. |
| search_in_files | Search text or regular-expression patterns across files matching a glob pattern inside a project directory. |
| build_project | Compile an Xcode scheme under a chosen build configuration such as Debug. |
| test_project | Execute an Xcode scheme's test plan and return detailed test failure reports. |
Use cases
- Create new Swift iOS, macOS, watchOS, or tvOS projects from templates and wire up Swift Package Manager or CocoaPods dependencies automatically.
- Run iterative `build_project`, `test_project`, static analysis, and clean loops from an AI assistant with structured compiler and test failure feedback.
- Boot iOS Simulators, install and launch app builds, capture screenshots or video recordings, and inspect simulator state during UI testing.
- Generate DocC package documentation, compile asset catalogs or app icon sets, switch Xcode versions, and validate App Store archives via `xcrun`.
Strengths
- Unifies `.xcodeproj`, `.xcworkspace`, Swift Package Manager, CocoaPods, iOS Simulator control, and `xcrun` utilities in a single TypeScript server.
- Ships an automated `./setup.sh` wizard that verifies macOS/Xcode/Node/CocoaPods prerequisites and configures Claude Desktop.
- Restricts all filesystem operations to `PROJECTS_BASE_DIR` and `ALLOWED_PATHS` while validating tool arguments with Zod schemas.
- Supports both `.env` configuration and CLI flags (`--projects-dir`, `--allowed-paths`, `--port`, `--debug`, `--log-level`).
Limitations
- Runs exclusively on macOS with Xcode 14.0+ installed; Windows and Linux machines cannot execute local Xcode or simulator workflows.
- Must be cloned and compiled locally (`npm install && npm run build`) rather than invoked directly from npm via `npx`.
- Full tool parameter references live in separate repository docs (`docs/tools-overview.md`) rather than inlined in the main README.
xcode-mcp-server setup notes
- xcode-mcp-server's example uses stdio, while its catalog transports are stdio / http; use the example's connection type.