npm xcodebuildmcpstdioMITupdated 8d ago
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP 能做什么?
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Installation
XcodeBuildMCP ships as a single package with two modes: a CLI for direct terminal use and an MCP server for AI coding agents. Either install method gives you both.
Option A — Homebrew
brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcp
Option B — npm (Node.js 18+)
npm install -g xcodebuildmcp@latest
Verify either install:
xcodebuildmcp --help
Connect your MCP client
Drop-in config snippets for Cursor, Claude Code, Codex, can be found in the official docs page MCP Clients. Most clients can also run the MCP server on demand via npx -y xcodebuildmcp@latest mcp without a global install.
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 init
Or install directly via npx without a global install:
npx -y xcodebuildmcp@latest init
For further information on installing skills, see Agent Skills.
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 Device Code Signing.
Privacy
XcodeBuildMCP uses Sentry for internal runtime error telemetry only. For details and opt-out instructions, see Privacy & Telemetry.
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.xcodeproj
# Prepare portable test products without running tests
xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeproj --simulator-name "iPhone 17" --build-for-testing --test-products-path ./MyApp.xctestproducts
# Run previously prepared test products
xcodebuildmcp simulator test --test-products-path ./MyApp.xctestproducts --simulator-name "iPhone 17"
Check for updates and upgrade in place:
xcodebuildmcp upgrade --check
xcodebuildmcp upgrade --yes
The CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See the CLI guide for full documentation.
Documentation
- Installation: https://xcodebuildmcp.com/docs/installation
- Setup: https://xcodebuildmcp.com/docs/setup
- MCP clients: https://xcodebuildmcp.com/docs/clients
- CLI usage: https://xcodebuildmcp.com/docs/cli
- Configuration and options: https://xcodebuildmcp.com/docs/configuration
- Tools reference: https://xcodebuildmcp.com/docs/tools
- Troubleshooting: https://xcodebuildmcp.com/docs/troubleshooting
- Privacy: https://xcodebuildmcp.com/docs/privacy
- Skills: https://xcodebuildmcp.com/docs/skills
- Contributing: https://xcodebuildmcp.com/docs/contributing
Licence
This project is licensed under the MIT License - see the LICENSE file for details. For third-party licensing notices see the THIRD_PARTY_LICENSES file for details. For npm package attributions see the THIRD_PARTY_PACKAGE_LICENSES file for details.
安装
把 XcodeBuildMCP 添加到你的客户端。选择你正在使用的那个。
claude mcp add xcodebuildmcp -- npx -y xcodebuildmcpcodex mcp add xcodebuildmcp -- npx -y xcodebuildmcpamp mcp add xcodebuildmcp -- npx -y xcodebuildmcp{
"mcpServers": {
"xcodebuildmcp": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"xcodebuildmcp": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"xcodebuildmcp","command":"npx","args":["-y","xcodebuildmcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"xcodebuildmcp": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"xcodebuildmcp": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"xcodebuildmcp": {
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"xcodebuildmcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"xcodebuildmcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"xcodebuildmcp": {
"command": {
"path": "npx",
"args": [
"-y",
"xcodebuildmcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y xcodebuildmcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
评分
39 / 100
不完整
- 文档25/25
- 维护25/25
- 可信度16/20
- 能力0/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 1 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 2.7.0最新 | 2026年7月23日 |
| 2.6.2 | 2026年6月2日 |
| 2.6.1 | 2026年6月2日 |
| 2.6.0 | 2026年6月1日 |
| 2.5.2 | 2026年5月12日 |
| 2.5.1 | 2026年5月8日 |
| 2.5.0 | 2026年5月7日 |
| 2.3.2 | 2026年3月31日 |
| 2.3.1 | 2026年3月27日 |
| 2.3.0 | 2026年3月16日 |
| 2.2.1 | 2026年3月8日 |
| 2.2.0 | 2026年3月7日 |
| 2.1.0 | 2026年2月23日 |
| 2.0.7 | 2026年2月10日 |
| 2.0.6 | 2026年2月10日 |
| 2.0.5 | 2026年2月10日 |
| 2.0.4 | 2026年2月10日 |
| 2.0.3 | 2026年2月10日 |
| 2.0.2 | 2026年2月10日 |
| 2.0.1 | 2026年2月10日 |
| 2.0.0 | 2026年2月8日 |
| 1.14.1 | 2025年9月22日 |
| 1.12.10 | 2025年9月10日 |