XcodeBuildMCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
XcodeBuildMCP-Secure
A highly hardened, 100% air-gapped version of the Model Context Protocol (MCP) server for Xcode. This fork is explicitly designed for highly secure Enterprise and Banking environments where outbound network connections are strictly forbidden.
Enterprise Security Benefits
This "Secure" edition has been audited and stripped of all external network dependencies to comply with strict banking security policies:
Zero Telemetry: The Sentry SDK and all error reporting modules have been completely eradicated. No data ever leaves your machine.
No Third-Party Downloads: Auto-download mechanisms (like pulling
xcodemakeor project scaffolds from GitHub) have been removed. Tools rely exclusively on binaries explicitly installed in your PATH.No Hidden Execution: Removed
.shand.jsinstallation scripts from the transfer package to bypass strict email/firewall attachments constraints (compiles locally safely).Hardened for CI/CD: Unnecessary macOS desktop, SwiftPM, and live Xcode IDE sync tools have been trimmed, focusing purely on stable iOS simulator building, recording, and UI automation workflows.
All operations execute strictly via standard xcodebuild and xcrun simctl local processes.
Related MCP server: ios-agent
Acknowledgements
This secure fork is built upon the incredible work of the original XcodeBuildMCP project.
Original Repository: getsentry/XcodeBuildMCP
Official Website: www.xcodebuildmcp.com
Original Author Contribution: Please refer to CONTRIBUTING.md in the upstream main repository for guidelines on contributing to the core logic.
Installation
XcodeBuildMCP ships as a single package with two modes: a CLI for direct terminal use and an MCP server for AI coding agents. Both installation methods give you both modes.
Option A — Homebrew
brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcpUse the CLI:
xcodebuildmcp --helpMCP client config:
"XcodeBuildMCP": {
"command": "xcodebuildmcp",
"args": ["mcp"]
}Upgrade later with brew update && brew upgrade xcodebuildmcp.
Option B — npm / npx (Node.js 18+)
For CLI use, install globally:
npm install -g xcodebuildmcp@latest
xcodebuildmcp --helpFor MCP server only, no global install needed — add directly to your client config:
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}To pin a specific version, replace @latest with an exact version (e.g. xcodebuildmcp@latest).
Client-specific setup
The examples below use npx (Option B). If you installed via Homebrew, replace the command with "command": "xcodebuildmcp", "args": ["mcp"] instead.
Recommended (project-scoped): add .cursor/mcp.json in your workspace root:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
} For global Cursor config (~/.cursor/mcp.json), use this variant so startup is aligned with the active workspace:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "/bin/zsh",
"args": [
"-lc",
"cd \"${workspaceFolder}\" && exec npx -y xcodebuildmcp@latest mcp"
]
}
}
}Or use the quick install link:
Run:
claude mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcpRun:
codex mcp add XcodeBuildMCP -- npx -y xcodebuildmcp@latest mcp Or add to ~/.codex/config.toml:
[mcp_servers.XcodeBuildMCP]
command = "npx"
args = ["-y", "xcodebuildmcp@latest", "mcp"] Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}Add to your VS Code settings JSON:
"mcp": {
"servers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}Or use the quick install links:
Workspace-level (applies only to the current workspace): add .kiro/settings/mcp.json in your project root:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
} User-level (applies globally across all workspaces): add to ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
} Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
} Add to ~/Library/Application Support/Trae/User/mcp.json:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest", "mcp"]
}
}
}Requires Xcode 26.3 or later. Codex agent must be installed and configured in Xcode Settings -> Intelligence -> Open AI.
The only way at the time of writing to add an MCP server is to use a project scoped .codex/config.toml file in the root of your project workspace:
/path/to/your/project/.codex/config.toml
[mcp_servers.XcodeBuildMCP]
args = [
"-lc",
"PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@latest mcp"
]
command = "/bin/zsh"
enabled = true
tool_timeout_sec = 10000NOTE: Codex Agent when running in Xcode has a limited PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
Requires Xcode 26.3 or later. Claude Code agent must be installed and configured in Xcode Settings -> Intelligence -> Anthropic.
Add to the end or replace the existing mcpServers object in Xcode's Claude Code agent config at:
~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json
// ... rest of file ...
"mcpServers": {
"XcodeBuildMCP": {
"command": "/bin/zsh",
"args": [
"-lc",
"PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin; export NVM_DIR=\"$HOME/.nvm\"; [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; nvm use --silent >/dev/null 2>&1 || true; npx -y xcodebuildmcp@latest mcp"
]
}
}
}NOTE: Claude Code Agent when running in Xcode has a limited PATH by default. The above example should work for most users but if you find the server doesn't start or is not available, it's likely because npx is not found so you might have to adjust the above configuration accordingly.
For other installation options see Getting Started.
Requirements
macOS 14.5 or later
Xcode 16.x or later
Node.js 18.x or later (not required for Homebrew installation)
Skills
XcodeBuildMCP now includes two optional agent skills:
MCP Skill: Primes the agent with instructions on how to use the MCP server's tools (optional when using the MCP server).
CLI Skill: Primes the agent with instructions on how to navigate the CLI (recommended when using the CLI).
To install with a global binary:
xcodebuildmcp initOr install directly via npx without a global install:
npx -y xcodebuildmcp@latest initFor further information on installing skills, see: docs/SKILLS.md
Notes
XcodeBuildMCP requests xcodebuild to skip macro validation to avoid errors when building projects that use Swift Macros.
Device tools require code signing to be configured in Xcode. See docs/DEVICE_CODE_SIGNING.md.
Privacy
XcodeBuildMCP-Secure runs 100% locally and air-gapped. Zero telemetry, crash reporting, or network calls are made.
CLI
XcodeBuildMCP provides a unified command-line interface. The mcp subcommand starts the MCP server, while all other commands provide direct terminal access to tools:
# Install globally
npm install -g xcodebuildmcp@latest
# Start the MCP server (for MCP clients)
xcodebuildmcp mcp
# List available tools
xcodebuildmcp tools
# Build for simulator
xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeprojThe CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See docs/CLI.md for full documentation.
Documentation
Getting started: docs/GETTING_STARTED.md
CLI usage: docs/CLI.md
Configuration and options: docs/CONFIGURATION.md
Tools reference: docs/TOOLS.md
Troubleshooting: docs/TROUBLESHOOTING.md
Privacy: docs/PRIVACY.md
Skills: docs/SKILLS.md
Contributing: docs/dev/CONTRIBUTING.md
Licence
This project is licensed under the MIT License - see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud iPhone Simulators for AI agents: build the Xcode project, read the screen, tap by label, test.
Cloud iPhones and Macs with Xcode for AI agents: build, run and test iOS apps, use the screen.
Build, run, and inspect iOS apps in disposable hosted Simulators from cloud coding agents.
The cloud Mac alone, with Xcode, for AI agents: run commands, build and test, use the screen.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceGives AI agents the ability to interact with iOS simulators through 21+ tools for mobile app testing.10,447 npmMIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to review Swift code, scaffold new iOS apps, and build, test, and preview them in the Xcode Simulator using local Apple guides and source references.3642MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to check setup, manage iOS Simulator devices, build/install/launch iOS apps, capture screenshots, send input, and open a live browser preview. It connects local agent workflows to Apple's simulator without requiring a custom emulator or native pane.MIT
- AlicenseNot gradedqualityBmaintenanceThe iOS Simulator for coding agents: builds and runs Xcode projects, reads the screen as compact text, taps and types by label, and runs XCTest and XCUITest case by case.1,043 npm6MIT