Exploring MCP: XcodeBuildMCP for Faster Incremental Builds in VS Code, Cursor & Windsurf
26% OFF - CES Sale
Use the coupon "CES" at checkout page for AI Driven Coding, Foundation Models, MLX Swift, MusicKit, Freelancing, or Technical Writing.
In my previous post, I wrote an introduction to XcodeBuildMCP, a MCP server to help AI-IDEs like VS Code, Cursor, and Windsurf bridge with the Xcode build system.
Exploring MCP: XcodeBuildMCP for Building & Running iOS Projects in VS Code, Cursor & Windsurf
I explored how to build, run, and manage simulators directly from your preferred editor, minimizing context switching.
The dream, as always, is that one single, environment for AI-powered iOS development. While XcodeBuildMCP brought us closer by handling build and run commands, one friction point remained: the speed of iterative builds.
Every time I asked the assistant to build after a small change, it triggered a full xcodebuild, which, depending on the project size, could take a significant amount of time. This slows down the rapid feedback loop for which using an AI assistance made sense, especially for autonomous error checking and fixing.
But Cameron has been cooking with much faster incremental builds, thanks to the integration of a tool called xcodemake, you can now slash those build times dramatically after the initial compilation.
Let's explore how this works and how to enable it!
The Need for Speed: Why Incremental Builds Matter
When working iteratively, especially with an AI assistant making changes or when you are rapidly prototyping, you often build and run again after minor code adjustments.
Running xcodebuild from scratch each time involves significant overhead: launching the build system, checking dependencies, and unnecessarily recompiling unchanged files.
An incremental build system is smarter. It aims to recompile only the files that have actually changed (and their dependents), leading to much faster builds after the first one. Xcode itself does this internally, but invoking xcodebuild externally often loses some of that efficiency.
For AI workflows where you might ask the assistant to "build and check for errors" frequently, this time difference is the amount that you spend doom-scrolling on socials.
xcodemake for Xcode Builds via Makefiles
To achieve faster external builds, XcodeBuildMCP now has experimental support for xcodemake.
GitHub - johnno1962/xcodemake: Faster xcodebuilds using “make”
Here is the core idea behind xcodemake, directly from its documentation:
xcodemake is a script that logs xcodebuild output to generate a Makefile for an Xcode project. [...] Once the Makefile has been generated you can use the "make" command for incremental builds which is generally considerably faster. Note however, xcodemake only recompiles program source changes, not resources or other binary aspects of an app bundle. [...]
It's intended for folks looking to build their project outside Xcode, for example, using extenal editors such as VSCode or Cursor. When you use xcodebuild you're pretty much launching the entire Xcode app from scratch in order to perform a each single build. Converting the build into a Makefile will be faster as make is exceptionally lightweight [...].
Essentially, xcodemake observes a full xcodebuild once, figures out the necessary compilation steps, and translates them into a Makefile. Subsequent builds can then use the standard, lightweight make command, which figures out the minimal set of files needing recompilation based on modification times.
Enabling Incremental Builds in XcodeBuildMCP
The integration within XcodeBuildMCP of xcodemake is currently an experimental feature, so keep that in mind.
To turn it on, you need to use the 1.4.0 beta and add INCREMENTAL_BUILDS_ENABLED: "true" to the env section of the configuration in your editor's MCP settings file.
Here is how it would look in Cursor:
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "mise",
"args": **["x",](https://github.com/cameroncooke/XcodeBuildMCP/issues)**
"
As noted in its documentation, `xcodemake` _primarily_ speeds up the recompilation of _program source code_. Changes to resources (Assets.xcassets, Storyboards, etc.), project settings, or dependencies might not be picked up correctly by make alone.
In such cases, you might need to trigger a clean build (`clean_project` or `clean_workspace` tool in `XcodeBuildMCP`) to force a full rebuild and regenerate the `Makefile`.
Happy Faster MCPing!26% OFF - CES Sale
Use the coupon "CES" at checkout page for AI Driven Coding, Foundation Models, MLX Swift, MusicKit, Freelancing, or Technical Writing.
Post Topics
Explore more in these categories: