Skip to content
Go back

XcodeBuild MCP: Project Scaffolding, Swift Packages & Enhanced UI Automation

XcodeBuild MCP: Project Scaffolding, Swift Packages & Enhanced UI Automation Since my last update about UI automation, XcodeBuild MCP has evolved significantly. Three major capabilities now shape what AI agents can achieve with Swift projects: project scaffolding for creating apps from scratch, comprehensive Swift Package Manager integration, and a redesigned UI automation system powered by AXe.

Project Scaffolding: From Zero to App

The new scaffolding tools address a fundamental gap in agent-driven development: creating projects from scratch. Previously, agents could only work with existing codebases. Now they can generate complete iOS and macOS projects:

When you ask an agent to “Create a new iOS app with SwiftUI,” it can now deliver a complete, buildable project without any manual intervention. The templates live in external repositories, downloaded on-demand and cached locally, which keeps the core tool lightweight while ensuring templates reflect current best practices.

Swift Package Manager: Beyond Dependencies

Swift Package Manager has become central to modern Swift development, yet most tooling still assumes Xcode project files. XcodeBuild MCP now provides comprehensive SPM support that goes well beyond dependency management:

This enables agents to work with pure Swift Package projects that have no .xcodeproj file. Whether you are building command-line tools, libraries, or even server-side Swift applications, agents can now handle the complete development workflow without requiring traditional Xcode project structures.

UI Automation Remastered with AXe

The UI automation capabilities have graduated from beta with a complete architectural overhaul. I replaced the previous multi-dependency approach with AXe, a purpose-built CLI tool that solves the complexity problem head-on:

The difference is architectural: where the previous solution required agents to orchestrate multiple tools, AXe provides a unified interface specifically designed for programmatic control. This makes UI automation more reliable and significantly easier to integrate with other development tooling.

Behind-the-Scenes Improvements

Incremental Builds Save Time

Large Swift projects can take significant time to build repeatedly during development. The new experimental incremental build support addresses this by only recompiling changed sources. Early testing shows build time reductions of up to 70% for typical iterative development workflows.

Selective Tool Control

Different development environments have different security and complexity requirements. You can now control exactly which capabilities are available to agents using environment variables:

{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "npx",
      "args": ["-y", "xcodebuildmcp@latest"],
      "env": {
        "XCODEBUILDMCP_DISABLE_UI_AUTOMATION": "true"
      }
    }
  }
}

This is particularly useful in team environments where you might want UI automation disabled but still allow build and test operations.

Editor Integration

Some AI-powered editors now provide direct installation support, though the standard npx approach remains the most reliable:

Install MCP Server Install in VS Code Install in VS Code Insiders

Installation Evolution: From mise to npx

I previously recommended using mise for installation, which required version management and local binaries. The current approach uses npx for a simpler setup that eliminates version management entirely:

{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "npx",
      "args": ["-y", "xcodebuildmcp@latest"]
    }
  }
}

Why the change? The npx approach solves several practical problems:

If you prefer version pinning or have specific deployment requirements, the traditional installation methods remain available. The GitHub README documents all supported approaches.

System Requirements

The latest features require updated system dependencies:

Looking Forward

XcodeBuild MCP now spans the complete iOS development lifecycle: from initial project creation through building, testing, and UI verification. The combination of project scaffolding, comprehensive Swift Package Manager support, and simplified UI automation represents a substantial step forward in what AI agents can accomplish with Swift projects.

These capabilities open new possibilities for agent-driven development workflows that I am eager to explore further. If you experiment with these features, I would welcome your feedback and contributions on GitHub.

Previous Updates

For the complete evolution of XcodeBuild MCP:


Share this post on:

Previous Post
The AI Coding Revolution: Magic or Mirage?
Next Post
XcodeBuild MCP: UI Automation is here!