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 "Install 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-mcpRun 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.
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | Enable full per-expression -debug-time-function-bodies output | |
| scheme | Yes | ||
| destination | No | ||
| projectPath | Yes | Path to .xcodeproj or .xcworkspace | |
| configuration | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must carry the transparency burden. It discloses that instrumentation is always enabled, which is a key behavioral trait, and mentions structured error/warning output and a buildId. However, it omits potential side effects (e.g., DerivedData creation, system modifications) and does not explain failure modes, so it is only partially transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that packs all key information: the action, the always-on instrumentation, the structured output, and the buildId for later reporting. There is zero waste or redundancy, making it appropriately concise and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description gives a solid high-level overview, it lacks details on the expected output structure (no output schema), parameter formatting for the undocumented fields, and any prerequsites or side-effect caveats. For a build tool with 5 parameters, it is adequate but leaves notable gaps in fully guiding an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is low (40%): only deep and projectPath have descriptions, while scheme, destination, and configuration are undocumented. The tool description does not compensate for these missing semantics; it only mentions instrumentation generally without linking to specific parameters. This leaves the agent guessing about accepted values for three out of five parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Run an Xcode build' and distinguishes this tool by noting build-timing instrumentation is always enabled, returning structured errors/warnings and a buildId for build_timing_report. This differentiates it from sibling tools like cache_inspect and build_timing_report.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: this is the tool to use when you want to run a build with timing instrumentation and obtain a buildId for later reporting. It does not explicitly mention alternatives or when-not-to-use, but the specific mention of instrumentation and buildId implies the intended usage scenario.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
build_timing_reportA
Return ranked slow build task categories/functions/expressions for a previous build_run call.
| Name | Required | Description | Default |
|---|---|---|---|
| buildId | No | Defaults to the most recent build_run result |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It discloses that output is ranked, slow, and tied to a previous build_run, which is useful. However, it doesn't mention side effects (likely none), permissions, or what happens if no previous build exists. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that conveys all essential information without unnecessary words. It is perfectly scannable and immediately understandable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and no output schema, the description covers the core purpose well. However, it could specify the return format (e.g., array of objects with timings) to fully equip the agent, as the tool appears to generate a report.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with the buildId parameter already documented as defaulting to the most recent build_run. The description's language 'previous build_run call' aligns with this but adds no new insight beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Return' and clearly identifies the resource ('ranked slow build task categories/functions/expressions') and context ('for a previous build_run call'). It effectively differentiates itself from sibling tools like build_run or cache_inspect by focusing on report generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for a previous build_run call' implies usage after build_run, but there is no explicit guidance on when to choose this over alternatives or any exclusion criteria. Sibling tools are distinct enough that usage is inferable, but the description doesn't make it explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cache_cleanA
Delete a specific DerivedData or ModuleCache.noindex path previously reported by cache_inspect. Requires confirm: true.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Exact path from a cache_inspect result | |
| confirm | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of revealing behavior. It states a destructive action and scope but doesn't explicitly warn about irreversibility, permission requirements, or side effects. The 'Requires confirm: true' adds a small but useful safety note. More transparency about the consequence of deletion would improve this score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, well-structured sentence communicates purpose, constraints, and prerequisite without wasted words. Every element contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive operation with no output schema or annotations, this description covers input scope, source data, and an important requirement (confirm). It could mention that deletion is permanent, but given the simple two-parameter tool and clear sibling context, it is adequately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only documents 'path' with a description, leaving 'confirm' as a bare boolean. The description compensates by clarifying 'Requires confirm: true', which adds meaning about how to use the confirm parameter. While path semantics come from the schema, the additional constraint on confirm bridges the coverage gap effectively.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Delete a specific DerivedData or ModuleCache.noindex path', using a specific verb and resource. It also distinguishes itself by referencing 'previously reported by cache_inspect', which differentiates it from siblings like build_run or config_lint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly implies usage as a follow-up to cache_inspect, naming the source tool and stating a prerequisite ('Requires confirm: true'). It provides clear context for when to use this destruction tool rather than alternatives, though it doesn't explicitly say when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cache_inspectA
Report DerivedData and module cache size, staleness, and bloat for all projects.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It discloses the reporting aspects (size, staleness, bloat) but does not explicitly state that it is a read-only operation, whether it has side effects, or how it computes metrics. It is not contradictory, but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single concise sentence that front-loads the action and object. No redundant wording, every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has zero parameters and no output schema, the description covers the essential purpose and scope. It lists the key aspects (size, staleness, bloat) and target (DerivedData, module cache). A note about read-only behavior would improve completeness but is not essential for selecting/invoking.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has zero parameters, and description supplies no additional parameter info, which is acceptable because there are no parameters. Baseline for 0 params is 4; the description does not need to compensate for anything.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'Report' with clear resource 'DerivedData and module cache' and scope 'for all projects' (size, staleness, bloat). It fully distinguishes from siblings like cache_clean (which cleans) and build_timing_report (which reports timing).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It does not mention that cache_clean is for cleaning rather than reporting, nor any exclusions. The usage context is implied but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
config_lintA
Scan a project's .pbxproj/.xcconfig for known build-speed anti-patterns.
| Name | Required | Description | Default |
|---|---|---|---|
| pbxprojPath | Yes | Path to the project.pbxproj file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. 'Scan' reasonably implies read-only and the scope is stated, but key behaviors are undisclosed: what the output looks like, how .xcconfig files relate to the lone pbxprojPath input, and error handling for invalid/missing paths. Adequate but not transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence with zero filler: verb first, target second, purpose third. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should compensate by explaining return format but does not. The .xcconfig handling path is unresolved, and there is no severity/fix guidance. For a simple 1-param lint tool the gap is moderate — usable but the agent must guess at outputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% — the single pbxprojPath parameter is clearly described in the schema, so baseline 3 applies. The description adds no extra parameter meaning; it even introduces mild ambiguity by mentioning .xcconfig without explaining how those files are discovered from pbxprojPath.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb 'Scan' + specific resources '.pbxproj/.xcconfig' + clear objective 'known build-speed anti-patterns'. This clearly differentiates from siblings: build_run executes, cache tools manage entries, build_timing_report profiles execution — config_lint is static analysis of build config files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose statement implies usage context (checking config for build-speed issues), but there is no explicit when-to-use/when-not-to-use guidance, no named alternatives, and no exclusions. An agent would infer usage from the verb rather than being told.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
build_run - First observed
build_timing_report - First observed
cache_clean - First observed
cache_inspect - First observed
config_lint
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP 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.268658Apache 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 gradedqualityDmaintenanceMCP server and CLI for iOS development — build, test, automate, and diagnose from any AI agent or terminal.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with Xcode build tools, iOS Simulator, and Apple notarization services.125MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sanatillayev/xcode-build-optimizer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server