Skip to main content
Glama
Xcode-Studio-MCP

Xcode-Studio-MCP

by kevinswint

xcode-studio-mcp

Унифицированный MCP-сервер для Xcode + iOS Simulator — выполняйте сборку, развертывание, создание скриншотов и взаимодействие с вашим iOS-приложением из Claude Code, Codex, Cursor или любого другого MCP-клиента.

Написан на Swift. Один исполняемый файл. Не требует среды выполнения Node/Python.

License: MIT Swift 6.0+ MCP

Зачем это нужно

Сегодня вам нужно 2-3 отдельных инструмента для выполнения полного цикла разработки iOS с помощью ИИ-агента. xcode-studio-mcp объединяет их в один:

Write code → Build → Deploy to Simulator → Screenshot → Tap/Type → Verify

Инструменты

Инструмент

Описание

xcode_build

Сборка проекта Xcode со структурированным выводом ошибок (файл, строка, столбец, серьезность, сообщение)

xcode_run

Сборка и запуск приложения в iOS Simulator

simulator_screenshot

Захват экрана симулятора в виде PNG-изображения

simulator_tap

Нажатие по координатам x,y на экране симулятора

simulator_type

Ввод текста в текущее активное поле

simulator_describe

Получение дерева доступности (accessibility tree) текущего экрана (JSON)

Related MCP server: xcforge

Параметры инструментов

xcode_build

Параметр

Обязательный

Описание

project_path

Да

Путь к директории проекта Xcode, .xcodeproj или .xcworkspace

scheme

Нет

Схема сборки (определяется автоматически, если пропущено)

configuration

Нет

Debug (по умолчанию) или Release

destination

Нет

Цель сборки (по умолчанию — запущенный симулятор)

xcode_run

Параметр

Обязательный

Описание

project_path

Да

Путь к проекту Xcode

bundle_identifier

Да

Идентификатор пакета приложения (например, com.example.MyApp)

scheme

Нет

Схема сборки (определяется автоматически)

simulator_udid

Нет

Целевой симулятор (по умолчанию — запущенный)

simulator_screenshot

Параметр

Обязательный

Описание

simulator_udid

Нет

Целевой симулятор (по умолчанию — запущенный)

simulator_tap

Параметр

Обязательный

Описание

x

Да

Координата X

y

Да

Координата Y

duration

Нет

Длительность удержания в секундах (для долгого нажатия)

simulator_udid

Нет

Целевой симулятор

simulator_type

Параметр

Обязательный

Описание

text

Да

Текст для ввода

simulator_udid

Нет

Целевой симулятор

simulator_describe

Параметр

Обязательный

Описание

simulator_udid

Нет

Целевой симулятор

Быстрый старт

Предварительные требования

  • macOS с установленным Xcode

  • Для инструментов взаимодействия с UI (tap, type, describe):

    brew tap facebook/fb && brew install idb-companion
    pip3 install fb-idb

Сборка

git clone https://github.com/kevinswint/xcode-studio-mcp.git
cd xcode-studio-mcp
swift build -c release

Настройка Claude Code

Добавьте в настройки MCP вашего Claude Code:

{
  "mcpServers": {
    "xcode-studio-mcp": {
      "command": "/path/to/xcode-studio-mcp/.build/release/XcodeStudioMCP"
    }
  }
}

Пример рабочего процесса

You: Build and run my app at ~/Projects/MyApp
Claude: [calls xcode_build] Build succeeded with 0 errors
        [calls xcode_run] App launched (PID 12345)
        [calls simulator_screenshot] Here's what the app looks like...
        [calls simulator_describe] I can see a "Sign In" button and email/password fields
        [calls simulator_tap] Tapped the email field
        [calls simulator_type] Typed "test@example.com"
        [calls simulator_screenshot] Here's the current state...

Архитектура

┌─────────────────────────────┐
│     MCP Protocol Layer      │  stdio transport (Swift MCP SDK)
├─────────────────────────────┤
│   Tool Implementations      │  6 tools, structured error output
├──────────┬──────────────────┤
│ xcodebuild│  simctl  │  idb │  native process calls
│  wrapper  │  wrapper │ CLI  │
└──────────┴──────────┴──────┘

Написано на Swift без зависимостей от среды выполнения Node/Python (CLI idb требуется только для инструментов взаимодействия с UI).

Дорожная карта

  • v0.1 (текущая): Базовая сборка + инструменты симулятора

  • v1.0: Семантическая навигация по UI ("нажми кнопку Sign In"), визуальное сравнение, манипуляция файлами проекта Xcode, составные операции, захват превью SwiftUI

Похожие проекты

Проект

Что делает

Отличие

XcodeBuildMCP

Только сборка + тестирование

Нет взаимодействия с UI симулятора

mobile-mcp

Кроссплатформенный UI симулятора

Нет поддержки сборки Xcode

ios-simulator-mcp

Симулятор через IDB

Нет сборки, для всего зависит от IDB

xcode-studio-mcp объединяет сборку и взаимодействие в одном сервере.

Участие в разработке

PR приветствуются. Кодовая база состоит из ~750 строк Swift, организованных в Tools, Services и Models.

Лицензия

MIT

Available Tools

6 tools
simulator_describeA

Get the accessibility tree of the current iOS Simulator screen as JSON. Useful for finding UI elements to interact with. Requires idb (pip3 install fb-idb).

Inputs: simulator_udid.

simulator_screenshotA

Capture a screenshot of the iOS Simulator screen. Returns the image as base64-encoded PNG.

Inputs: simulator_udid.

simulator_tapA

Tap at specific coordinates on the iOS Simulator screen. Requires idb (pip3 install fb-idb).

Inputs: x (required), y (required), duration, simulator_udid.

simulator_typeA

Type text into the currently focused field on the iOS Simulator. Requires idb (pip3 install fb-idb).

Inputs: text (required), simulator_udid.

xcode_buildB

Build an Xcode project or workspace. Returns structured diagnostics with file, line, column, severity, and message for each error/warning.

Inputs: project_path (required), configuration, destination, scheme.

xcode_runA

Build an Xcode project and launch the app in the iOS Simulator. Returns build errors if the build fails, or a success message with the launched process ID.

Inputs: bundle_identifier (required), project_path (required), configuration, scheme, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct action: building, running, and simulator interactions (screenshot, tap, type, describe) are clearly separated. There is no overlap in purpose, making it easy for an agent to select the correct tool.

    Naming Consistency3/5

    Tools are grouped into two clear namespaces: 'xcode_' for build/run and 'simulator_' for simulator interactions. However, the same verb 'run' is used for xcode_run (launch app) while the simulator tools use direct action verbs (tap, type, describe). The pattern is readable but not perfectly uniform.

    Tool Count5/5

    With only 6 tools, the set is well-scoped for core Xcode build/run and simulator interaction workflows. Each tool serves a distinct purpose, and no tool feels redundant or missing at this scale.

    Completeness4/5

    The set covers building, running, and basic UI interaction (via describe/tap/type). A minor gap is the lack of a tool to terminate the running app, and no way to list available simulators, but agents can work around this for common tasks.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      High-performance MCP server for iOS development and test automation. Gives AI coding assistants direct access to iOS simulators with sub-20ms screenshots, UI interaction, building, testing, and an intelligent operator mode.
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for iOS Simulator automation. Enables AI assistants to visually interact with iOS apps running in the simulator.
      36 npm
      1
      MIT