================== /// 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.
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.
add_swift_package
Add a Swift Package dependency to the current Xcode project, specifying the package URL and version requirement.
read_file
Read the contents of a file, supporting different text encodings.
write_file
Write content to a file, optionally creating the file if it does not exist.
search_in_files
Search for a text string or regular expression within files that match a given pattern inside a directory.
build_project
Build an Xcode project or workspace using the specified scheme and build configuration.
test_project
Run tests for an Xcode project or workspace using the specified scheme or test plan, returning detailed results.
Installation
git clone https://github.com/r-huijts/xcode-mcp-server.git
cd xcode-mcp-server
npm install # or: pnpm install / yarn install
npm run build # runs tsc, outputs to ./dist
npm run dev # uses ts-node / nodemon if configured
or start the compiled build
node dist/index.js
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
curl http://localhost:8080/health
Xcode ➜ Settings ➜ Source Control ➜ MCP Servers ➜ Add ➜ http://<your-host>:8080