xcode-build-optimizer-mcp
xcode-build-optimizer-mcp
An MCP server for deterministic Xcode build-time optimization: build-timing analysis, DerivedData/module-cache management, and build-speed config linting — for AI coding agents (Claude Code, Claude Desktop, and other MCP clients).
This is deliberately not a build/test/simulator orchestration tool — use it alongside XcodeBuildMCP or any other build runner.
Install
npx xcode-build-optimizer-mcpAdd to your MCP client config (e.g. Claude Code ~/.claude.json or Claude
Desktop claude_desktop_config.json):
{
"mcpServers": {
"xcode-build-optimizer": {
"command": "npx",
"args": ["xcode-build-optimizer-mcp"]
}
}
}Tools
Tool | Purpose |
| Run an instrumented |
| Ranked slow build task categories/functions/expressions for a |
| DerivedData/module-cache size, staleness, and bloat report. |
| Delete a specific cache path reported by |
| Scan |
Requirements
macOS with Xcode Command Line Tools installed.
Node.js >= 20.
For per-expression timing, pass deep: true to build_run; build_timing_report
then reports deepSource: "debug-time-function-bodies".
Not yet implemented: an opportunistic XCLogParser enhancement was prototyped but is not wired up in v0.1 — its JSON output shape and the
.xcactivitylognaming convention it depends on have not been verified against a real XCLogParser install.build_timing_reportnever invokesxclogparser, whether or not it is onPATH.
Contributing
Issues and PRs welcome. Run npm test before submitting; npm run test:integration additionally requires a full Xcode install and runs a real build against the fixture project in test/integration/.
License
MIT