XcodeBuildMCP is a Model Context Protocol (MCP) server that provides Xcode-related tools for integration with AI assistants. It enables programmatic interaction with Xcode projects, simulators, devices, and Swift packages through a standardized interface, making it easier for AI tools to help with iOS and macOS development tasks.
For a quick install, you can use the following links:
Most MCP clients (Cursor, VS Code, Windsurf, Claude Desktop, etc.) support the following JSON configuration format:
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
]
}
Add to your Codex CLI config file:
[mcp_servers.XcodeBuildMCP]
command = "npx"
args = ["-y", "xcodebuildmcp@latest"]
env = { "INCREMENTAL_BUILDS_ENABLED" = "false", "XCODEBUILDMCP_SENTRY_DISABLED" = "false" }
Install via command line:
# Add XcodeBuildMCP server to Claude Code
claude mcp add XcodeBuildMCP npx xcodebuildmcp@latest
# Or with environment variables
claude mcp add XcodeBuildMCP npx xcodebuildmcp@latest -H INCREMENTAL_BUILDS_ENABLED=false -H XCODEBUILDMCP_SENTRY_DISABLED=false
Install for Claude Desktop automatically:
npx -y @smithery/cli install @cameroncooke/XcodeBuildMCP --client claude
XcodeBuildMCP provides tools for:
To enable faster builds using incremental build support:
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"],
"env": {
"INCREMENTAL_BUILDS_ENABLED": "true"
}
}
Dynamic tool loading optimizes context window usage in AI assistants:
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"],
"env": {
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true"
}
}
For reduced context window usage without dynamic tools:
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"],
"env": {
"XCODEBUILDMCP_ENABLED_WORKFLOWS": "simulator,device,project-discovery"
}
}
Available workflows include:
device
- iOS Device Developmentsimulator
- iOS Simulator Developmentsimulator-management
- Simulator Managementswift-package
- Swift Package Managerproject-discovery
- Project Discoverymacos
- macOS DevelopmentFor device deployment features to work, code signing must be configured in Xcode:
If you encounter issues, use the doctor tool:
npx --package xcodebuildmcp@latest xcodebuildmcp-doctor
This tool provides information about:
XcodeBuildMCP uses Sentry for error monitoring. To opt out:
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"],
"env": {
"XCODEBUILDMCP_SENTRY_DISABLED": "true"
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "XcodeBuildMCP" '{"command":"npx","args":["-y","xcodebuildmcp@latest"]}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp@latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect