XcodeBuild logo

XcodeBuild

CommunityPopular
cameroncooke

A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

Publishercameroncooke
Repositoryxcodebuildmcp
LanguageTypeScript
Forks
272
Stars
5.5K
Available tools
63
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    XcodeBuild exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 63 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    5.5K stars and 272 forks from the linked repository.

A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

CI npm version License: MIT Node.js Xcode 16 macOS MCP Ask DeepWiki AgentAudit Security

Installation

XcodeBuildMCP ships as a single package with two modes: a CLI for direct terminal use and an MCP server for AI coding agents. Either install method gives you both.

Option A — Homebrew

bash
brew tap getsentry/xcodebuildmcp
brew install xcodebuildmcp

Option B — npm (Node.js 18+)

bash
npm install -g xcodebuildmcp@latest

Verify either install:

bash
xcodebuildmcp --help

Connect your MCP client

Drop-in config snippets for Cursor, Claude Code, Codex, can be found in the official docs page MCP Clients. Most clients can also run the MCP server on demand via npx -y xcodebuildmcp@latest mcp without a global install.

Requirements

  • macOS 14.5 or later
  • Xcode 16.x or later
  • Node.js 18.x or later (not required for Homebrew installation)

Skills

XcodeBuildMCP now includes two optional agent skills:

  • MCP Skill: Primes the agent with instructions on how to use the MCP server's tools (optional when using the MCP server).

  • CLI Skill: Primes the agent with instructions on how to navigate the CLI (recommended when using the CLI).

To install with a global binary:

bash
xcodebuildmcp init

Or install directly via npx without a global install:

bash
npx -y xcodebuildmcp@latest init

For further information on installing skills, see Agent Skills.

Notes

  • XcodeBuildMCP requests xcodebuild to skip macro validation to avoid errors when building projects that use Swift Macros.
  • Device tools require code signing to be configured in Xcode. See Device Code Signing.

Privacy

XcodeBuildMCP uses Sentry for internal runtime error telemetry only. For details and opt-out instructions, see Privacy & Telemetry.

CLI

XcodeBuildMCP provides a unified command-line interface. The mcp subcommand starts the MCP server, while all other commands provide direct terminal access to tools:

bash
# Install globally
npm install -g xcodebuildmcp@latest

# Start the MCP server (for MCP clients)
xcodebuildmcp mcp

# List available tools
xcodebuildmcp tools

# Build for simulator
xcodebuildmcp simulator build --scheme MyApp --project-path ./MyApp.xcodeproj

Check for updates and upgrade in place:

bash
xcodebuildmcp upgrade --check
xcodebuildmcp upgrade --yes

The CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See the CLI guide for full documentation.

Documentation

Licence

This project is licensed under the MIT License - see the LICENSE file for details. For third-party licensing notices see the THIRD_PARTY_LICENSES file for details. For npm package attributions see the THIRD_PARTY_PACKAGE_LICENSES file for details.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • build_device

    Builds an app for a connected device.

  • clean

    Cleans build products with xcodebuild.

  • discover_projs

    Scans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files.

  • get_app_bundle_id

    Extracts the bundle identifier from an app bundle (.app) for any Apple platform (iOS, iPadOS, watchOS, tvOS, visionOS). IMPORTANT: You MUST provide the appPath parameter. Example: get_app_bundle_id({ appPath: '/path/to/your/app.app' })

  • get_device_app_path

    Retrieves the built app path for a connected device.

  • install_app_device

    Installs an app on a connected device.

  • launch_app_device

    Launches an app on a connected device.

  • list_devices

    Lists connected physical Apple devices (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro) with their UUIDs, names, and connection status. Use this to discover physical devices for testing.

  • list_schemes

    Lists schemes for a project or workspace.

  • show_build_settings

    Shows xcodebuild build settings.

  • start_device_log_cap

    Starts log capture on a connected device.

  • stop_app_device

    Stops a running app on a connected device.

  • stop_device_log_cap

    Stops an active Apple device log capture session and returns the captured logs.

  • test_device

    Runs tests on a physical Apple device.

  • doctor

    Provides comprehensive information about the MCP server environment, available dependencies, and configuration status.

  • start_sim_log_cap

    Starts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.

  • stop_sim_log_cap

    Stops an active simulator log capture session and returns the captured logs.

  • build_macos

    Builds a macOS app.

  • build_run_macos

    Builds and runs a macOS app.

  • get_mac_app_path

    Retrieves the built macOS app bundle path.

  • get_mac_bundle_id

    Extracts the bundle identifier from a macOS app bundle (.app). IMPORTANT: You MUST provide the appPath parameter. Example: get_mac_bundle_id({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_get_macos_bundle_id.

  • launch_mac_app

    Launches a macOS application. IMPORTANT: You MUST provide the appPath parameter. Example: launch_mac_app({ appPath: '/path/to/your/app.app' }) Note: In some environments, this tool may be prefixed as mcp0_launch_macos_app.

  • stop_mac_app

    Stops a running macOS application. Can stop by app name or process ID.

  • test_macos

    Runs tests for a macOS target.

  • scaffold_ios_project

    Scaffold a new iOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper iOS configuration.

  • scaffold_macos_project

    Scaffold a new macOS project from templates. Creates a modern Xcode project with workspace structure, SPM package for features, and proper macOS configuration.

  • boot_sim

    Boots an iOS simulator.

  • build_run_sim

    Builds and runs an app on an iOS simulator.

  • build_sim

    Builds an app for an iOS simulator.

  • describe_ui

    Gets entire view hierarchy with precise frame coordinates (x, y, width, height) for all visible elements. Use this before UI interactions or after layout changes - do NOT guess coordinates from screenshots. Returns JSON tree with frame data for accurate automation.

  • get_sim_app_path

    Retrieves the built app path for an iOS simulator.

  • install_app_sim

    Installs an app in an iOS simulator.

  • launch_app_logs_sim

    Launches an app in an iOS simulator and captures its logs.

  • launch_app_sim

    Launches an app in an iOS simulator.

  • list_sims

    Lists available iOS simulators with their UUIDs.

  • open_sim

    Opens the iOS Simulator app.

  • screenshot

    Captures screenshot for visual verification. For UI coordinates, use describe_ui instead (don't determine coordinates from screenshots).

  • stop_app_sim

    Stops an app running in an iOS simulator.

  • test_sim

    Runs tests on an iOS simulator.

  • reset_sim_location

    Resets the simulator's location to default.

  • set_sim_appearance

    Sets the appearance mode (dark/light) of an iOS simulator.

  • set_sim_location

    Sets a custom GPS location for the simulator.

  • sim_statusbar

    Sets the data network indicator in the iOS simulator status bar. Use "clear" to reset all overrides, or specify a network type (hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc).

  • swift_package_build

    Builds a Swift Package with swift build

  • swift_package_clean

    Cleans Swift Package build artifacts and derived data

  • swift_package_list

    Lists currently running Swift Package processes

  • swift_package_run

    Runs an executable target from a Swift Package with swift run

  • swift_package_stop

    Stops a running Swift Package executable started with swift_package_run

  • swift_package_test

    Runs tests for a Swift Package with swift test

  • button

    Press hardware button on iOS simulator. Supported buttons: apple-pay, home, lock, side-button, siri

  • gesture

    Perform gesture on iOS simulator using preset gestures: scroll-up, scroll-down, scroll-left, scroll-right, swipe-from-left-edge, swipe-from-right-edge, swipe-from-top-edge, swipe-from-bottom-edge

  • key_press

    Press a single key by keycode on the simulator. Common keycodes: 40=Return, 42=Backspace, 43=Tab, 44=Space, 58-67=F1-F10.

  • key_sequence

    Press key sequence using HID keycodes on iOS simulator with configurable delay

  • long_press

    Long press at specific coordinates for given duration (ms). Use describe_ui for precise coordinates (don't guess from screenshots).

  • swipe

    Swipe from one point to another. Use describe_ui for precise coordinates (don't guess from screenshots). Supports configurable timing.

  • tap

    Tap at specific coordinates or target elements by accessibility id or label. Use describe_ui to get precise element coordinates prior to using x/y parameters (don't guess from screenshots). Supports optional timing delays.

  • touch

    Perform touch down/up events at specific coordinates. Use describe_ui for precise coordinates (don't guess from screenshots).

  • type_text

    Type text (supports US keyboard characters). Use describe_ui to find text field, tap to focus, then type.

  • session-clear-defaults

    Clear selected or all session defaults.

  • session-set-defaults

    Set the session defaults needed by many tools. Most tools require one or more session defaults to be set before they can be used. Agents should set all relevant defaults up front in a single call (e.g., project/workspace, scheme, simulator or device ID, useLatestOS) to avoid iterative prompts; only set the keys your workflow needs.

  • session-show-defaults

    Show current session defaults.

  • record_sim_video

    Starts or stops video capture for an iOS simulator.

  • erase_sims

    Erases a simulator by UDID.

Use XcodeBuild MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once XcodeBuild is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add XcodeBuild as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the XcodeBuild MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "xcodebuild": {
      "command": "npx",
      "args": [
        "-y",
        "xcodebuildmcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the XcodeBuild MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the XcodeBuild MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use XcodeBuild to help me with this task?
XcodeBuild
Sure. I read it.
Here is what I found using XcodeBuild.

Frequently asked questions

What is the XcodeBuild MCP server used for?

XcodeBuild is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use XcodeBuild MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use XcodeBuild with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use XcodeBuild MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With XcodeBuild connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect XcodeBuild MCP to TypingMind?

XcodeBuild runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does XcodeBuild MCP provide in TypingMind?

XcodeBuild exposes 63 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use XcodeBuild MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If XcodeBuild requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇