Xcodebuild MCP server

Integrates with Xcode to enable iOS project building, testing, and error handling for efficient development workflows in AI-assisted coding environments.
Back to servers
Provider
Tim Wang
Release date
Mar 02, 2025
Language
Python
Package
Stats
1.3K downloads
67 stars

The XcodeBuild MCP Server enables a smooth workflow when working with iOS projects in Visual Studio Code. It allows you to build and test iOS Xcode workspaces/projects directly from your editor through extensions like Cline or Roo Code.

Installation Options

Using uv (Recommended)

When using uv, no specific installation is needed. You'll use uvx to directly run mcpxcodebuild:

# No installation required when using uvx

Using pip

Alternatively, install mcpxcodebuild via pip:

pip install mcpxcodebuild

After installation, you can run it as a script using:

python -m mcpxcodebuild

Configuration

Setting Up in Claude.app

Add the appropriate configuration to your Claude settings:

When using uvx:

"mcpServers": {
  "mcpxcodebuild": {
    "command": "uvx",
    "args": ["mcpxcodebuild"]
  }
}

When using pip installation:

"mcpServers": {
  "mcpxcodebuild": {
    "command": "python",
    "args": ["-m", "mcpxcodebuild"]
  }
}

Available Tools

Build Tool

The build tool allows you to build iOS Xcode workspaces/projects:

  • Required parameter: folder (string) - The full path of the folder containing the iOS Xcode workspace/project

Test Tool

The test tool runs tests for iOS Xcode workspaces/projects:

  • Required parameter: folder (string) - The full path of the folder containing the iOS Xcode workspace/project

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later