mcp-registry/xcode-mcp-server

    ==================
      
       /// MCP ///
      /// XCO ///
        
    ==================
        
    [server:online]
    [protocol:ready]

xcode-mcp-server

by r-huijts

An MCP (Model Context Protocol) server that offers rich Xcode, Simulator, CocoaPods and Swift-PM tooling so AI assistants can inspect, build and test Apple-platform projects.

297
19
Open Source

01

create_xcode_project

Create a new Xcode project from a chosen template with options such as name, language, organization details, test targets and output location, and optionally set it as the active project.

02

add_swift_package

Add a Swift Package dependency to the current Xcode project, specifying the package URL and version requirement.

03

read_file

Read the contents of a file, supporting different text encodings.

04

write_file

Write content to a file, optionally creating the file if it does not exist.

05

search_in_files

Search for a text string or regular expression within files that match a given pattern inside a directory.

06

build_project

Build an Xcode project or workspace using the specified scheme and build configuration.

07

test_project

Run tests for an Xcode project or workspace using the specified scheme or test plan, returning detailed results.

Installation

1. Prerequisites
• Node.js ≥ 18
• npm (comes with Node) or pnpm/yarn
2. Clone the repository
git clone https://github.com/r-huijts/xcode-mcp-server.git cd xcode-mcp-server
3. Install dependencies
npm install # or: pnpm install / yarn install
4. Build the TypeScript sources
npm run build # runs tsc, outputs to ./dist
5. Start the server (development)
npm run dev # uses ts-node / nodemon if configured or start the compiled build node dist/index.js
6. Configuration (env vars)
MCP_PORT – TCP port to bind on (default 8080) MCP_HOST – Interface to listen on (default 0.0.0.0) ACCESS_TOKEN – Optional shared secret required by Xcode when invoking MCP requests
7. Test the server
curl http://localhost:8080/health
8. Register in Xcode
Xcode ➜ Settings ➜ Source Control ➜ MCP Servers ➜ Add ➜ http://<your-host>:8080

Documentation

License: MIT License
Updated 7/30/2025

Table of Contents