XcodeBuildMCP is a Model Context Protocol (MCP) server that provides Xcode-related tools for seamless integration with AI assistants and other MCP clients. It enables AI assistants to interact with Xcode projects programmatically, handling everything from building and testing to simulator control and device management.
Use one of these one-click installation links for your preferred MCP client:
Configure your MCP client (Windsurf, Cursor, Claude Desktop, etc.) by adding XcodeBuildMCP to your client's MCP configuration:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
]
}
}
}
If you prefer not to use a specific Node.js installation, you can use mise:
# Install mise (macOS with Homebrew)
brew install mise
Then configure your MCP client with mise:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "mise",
"args": [
"x",
"npm:[email protected]",
"--",
"xcodebuildmcp"
]
}
}
}
To install with Smithery for Claude Desktop:
npx -y @smithery/cli install @cameroncooke/XcodeBuildMCP --client claude
XcodeBuildMCP offers tools for:
Enable experimental incremental builds for faster build times:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
],
"env": {
"INCREMENTAL_BUILDS_ENABLED": "true"
}
}
}
}
For device deployment to work:
You can enable only specific tools to reduce context sent to the client:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
],
"env": {
"XCODEBUILDMCP_GROUP_IOS_SIMULATOR_WORKFLOW": "true"
}
}
}
}
Use the diagnostic tool to check your environment configuration:
npx --package xcodebuildmcp@latest xcodebuildmcp-diagnostic
For Cursor, find logs at:
find ~/Library/Application\ Support/Cursor/logs -name "Cursor MCP.log" -exec zip -r matching_logs.zip {} +
XcodeBuildMCP uses Sentry for error monitoring. To opt out:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
],
"env": {
"SENTRY_DISABLED": "true"
}
}
}
}
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.