# XcodeBuildMCP — Xcode Build Tools for Agents > XcodeBuildMCP adds an MCP server + CLI so agents can build iOS/macOS projects, list tools, and capture logs. Install via brew or npm, then run init. ## Install Merge the JSON below into your `.mcp.json`: # XcodeBuildMCP — Xcode Build Tools for Agents > XcodeBuildMCP adds an MCP server + CLI so agents can build iOS/macOS projects, list tools, and capture logs. Install via brew or npm, then run init. ## Quick Use 1) Install ```bash brew tap getsentry/xcodebuildmcp && brew install xcodebuildmcp ``` 2) Run ```bash xcodebuildmcp init ``` 3) Verify ```bash xcodebuildmcp --help ``` --- ## Intro **Best for**: iOS/macOS teams who want agents to run reproducible builds and diagnose Xcode issues with real logs **Works with**: macOS 14.5+, Xcode 16.x, Node.js 18+ (npm path) or Homebrew; MCP-capable clients **Setup time**: 10 minutes ### Quant Data - Requires macOS 14.5+ and Xcode 16.x (repo) - Setup time ~10 minutes --- ## How to Use It Well Treat Xcode builds like a data pipeline: build → capture logs → extract the exact failing command and environment → fix → verify. The MCP toolchain helps the agent stay grounded. ### Adoption Checklist - Start with one real task and keep the scope narrow - Capture a baseline: time-to-first-success and output quality - Version your config/skills so teammates stay in sync ### Guardrails Be explicit about code signing and device requirements. Many failures are environment/config related, not code logic. ### FAQ **Q: Do I need npm if I use Homebrew?** A: No. The repo provides both Homebrew and npm installation options; either gives you the CLI and MCP server. **Q: How do MCP clients run it?** A: Most clients can run the MCP server via a command; the repo links to client config snippets and `npx -y xcodebuildmcp@latest mcp`. **Q: What is a good first task?** A: Run a simulator build for a known scheme, then ask the agent to summarize warnings and failing steps from the captured logs. --- ## Source & Thanks > GitHub: https://github.com/getsentry/XcodeBuildMCP > Owner avatar: https://avatars.githubusercontent.com/u/1396951?v=4 > License (SPDX): MIT > GitHub stars (verified via `api.github.com/repos/getsentry/XcodeBuildMCP`): 5,480 --- # XcodeBuildMCP——给 Agent 的 Xcode 构建工具 > XcodeBuildMCP 提供 MCP server + CLI,让 AI 代理能构建 iOS/macOS 工程、列出可用工具并抓取日志;本地或 CI 都能复用。brew/npm 安装后跑 init 即可接入。 ## 快速使用 1)安装 ```bash brew tap getsentry/xcodebuildmcp && brew install xcodebuildmcp ``` 2)运行 ```bash xcodebuildmcp init ``` 3)验证 ```bash xcodebuildmcp --help ``` --- ## 简介 **适合谁**:希望让 AI 代理跑可复现构建,并用真实日志定位 Xcode 问题的 iOS/macOS 团队 **适用环境**:macOS 14.5+、Xcode 16.x、Node.js 18+(npm 路径)或 Homebrew;支持 MCP 的客户端 **安装耗时**:10 分钟 ### 量化信息 - 要求 macOS 14.5+ 与 Xcode 16.x(仓库) - 装机约 10 分钟 --- ## 用好它的方式 把 Xcode 构建当成数据管道:构建 → 抓日志 → 提取精确失败命令与环境 → 修复 → 验证。MCP 工具链能让 agent 保持 grounded。 ### 推广清单 - 先选一个真实任务,小范围试跑 - 记录基线:首次成功耗时与输出质量 - 配置/技能要版本化,避免团队漂移 ### 风险与护栏 对签名与设备要求要写清楚:很多失败来自环境/配置,而不是代码逻辑。 ### FAQ **Q: 用 Homebrew 还需要 npm 吗?** A: 不需要。仓库同时提供 Homebrew 与 npm 两种安装方式;任意一种都包含 CLI 与 MCP server。 **Q: MCP 客户端怎么运行?** A: 多数客户端可通过命令启动 MCP server;仓库提供配置片段,并提到 `npx -y xcodebuildmcp@latest mcp`。 **Q: 第一步做什么最合适?** A: 先对一个已知 scheme 做 simulator build,再让 agent 总结 warning 与失败环节,并把关键信息写成可复现清单。 --- ## 来源与感谢 > GitHub:https://github.com/getsentry/XcodeBuildMCP > Owner avatar:https://avatars.githubusercontent.com/u/1396951?v=4 > 许可证(SPDX):MIT > GitHub stars(已通过 `api.github.com/repos/getsentry/XcodeBuildMCP` 核验):5,480 --- Source: https://tokrepo.com/en/workflows/xcodebuildmcp-xcode-build-tools-for-agents Author: MCP Hub