A Model Context Protocol (MCP) server that provides Xcode-related tools for integration with AI assistants and other MCP clients.
This project implements an MCP server that exposes Xcode operations as tools that can be invoked by AI agents via the MCP protocol. It enables programmatic interaction with Xcode projects through a standardised interface, optimised for agent-driven development workflows.
The XcodeBuild MCP tool exists primarily to streamline and standardise interaction between AI agents and Xcode projects. By providing dedicated tools for common Xcode operations, it removes reliance on manual or potentially incorrect command-line invocations.
This ensures a reliable and efficient development process, allowing agents to seamlessly leverage Xcode's capabilities while reducing the risk of configuration errors.
Critically, this MCP enables AI agents to independently validate code changes by building projects, inspecting errors, and iterating autonomously. In contrast to user-driven tools like Sweetpad, XcodeBuild MCP empowers agents to automate these workflows effectively.
The XcodeBuildMCP server provides the following tool capabilities:
[!NOTE] If you are using mise, you can skip the Node.js and npm installation steps.
To install mise:
# macOS (Homebrew)
brew install mise
# Other installation methods
# See https://mise.jdx.dev/getting-started.html
For more information about mise, visit the official documentation.
Configure your MCP client (Windsurf, Cursor, Claude Desktop, etc.) to use the XcodeBuildMCP server by adding the following configuration:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "mise",
"args": [
"x",
"npm:xcodebuildmcp@latest",
"--",
"xcodebuildmcp"
]
}
}
}
Or, if you have an existing Node.js environment, you can use npx instead of mise:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"xcodebuildmcp"
]
}
}
}
https://github.com/user-attachments/assets/b9d334b5-7f28-47fc-9d66-28061bc701b4
https://github.com/user-attachments/assets/e3c08d75-8be6-4857-b4d0-9350b26ef086
npm install
npm run build
node build/index.js
To configure your MCP client to use the local XcodeBuildMCP server, add the following configuration:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "node",
"args": [
"/path_to/XcodeBuildMCP/build/index.js"
]
}
}
}
You can use MCP Inspector via:
npx @modelcontextprotocol/inspector node build/index.js
This project is licensed under the MIT License - see the LICENSE file for details.
{
"mcpServers": {
"XcodeBuildMCP": {
"args": [
"x",
"npm:xcodebuildmcp@latest",
"--",
"xcodebuildmcp"
],
"command": "mise"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.