xcode-build-optimizer-mcp
Provides tools for optimizing Xcode build performance, including instrumented build runs, ranked build-timing reports, DerivedData/module-cache inspection and cleanup, and linting of build configuration files for common build-speed anti-patterns.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xcode-build-optimizer-mcp Run a build and show me the slowest compile tasks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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"]
}
}
}Related MCP server: xcsift-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
Available Tools
5 toolsbuild_runA
Run an Xcode build with build-timing instrumentation always enabled, returning structured errors/warnings and a buildId for build_timing_report.
Inputs: scheme (required), projectPath (required), deep, destination, +1 more.
build_timing_reportA
Return ranked slow build task categories/functions/expressions for a previous build_run call.
Inputs: buildId.
cache_cleanA
Delete a specific DerivedData or ModuleCache.noindex path previously reported by cache_inspect. Requires confirm: true.
Inputs: path (required), confirm (required).
cache_inspectA
Report DerivedData and module cache size, staleness, and bloat for all projects.
Inputs: no named parameters.
config_lintA
Scan a project's .pbxproj/.xcconfig for known build-speed anti-patterns.
Inputs: pbxprojPath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: build execution, cache inspection, cache cleanup, timing analysis, and config linting. No overlap in functionality, and the descriptions further distinguish their roles.
All tool names follow a consistent verb_noun pattern (build_run, cache_inspect, cache_clean, build_timing_report, config_lint). This is uniform and predictable, making tool selection straightforward.
Five tools is well-scoped for an Xcode build optimizer server. Each tool serves a distinct part of the optimization workflow without redundancy, and the count feels neither thin nor overwhelming for the purpose.
The tool set covers the primary lifecycle: running builds, inspecting and cleaning caches, analyzing timing, and linting configs. A minor gap is the absence of a tool to directly apply optimizations (e.g., modify configs), but the existing tools enable identification and manual fixes.
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for Xcode build automation and log parsing that opens Xcode projects, triggers builds directly in Xcode, and parses build logs to extract errors and warnings.2678 npm59Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to parse Xcode and Swift build outputs into structured, token-efficient formats like JSON or TOON. It provides tools for executing build commands and extracting detailed diagnostic information such as errors, warnings, and test failures.8MIT
- AlicenseNot gradedqualityBmaintenanceMCP server and CLI for iOS development — build, test, automate, and diagnose from any AI agent or terminal.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with Xcode build tools, iOS Simulator, and Apple notarization services.7 npm5MIT