iOS Simulator MCP
MCP-сервер для симулятора iOS
Сервер протокола контекста модели (MCP) для взаимодействия с симуляторами iOS. Этот сервер позволяет вам взаимодействовать с симуляторами iOS, получая информацию о них, управляя взаимодействиями с UI и проверяя элементы интерфейса.
Уведомление о безопасности: Уязвимости внедрения команд, присутствовавшие в версиях < 1.3.3, были исправлены. Пожалуйста, обновитесь до версии 1.3.3 или более поздней. Подробности см. в SECURITY.md.
https://github.com/user-attachments/assets/453ebe7b-cc93-4ac2-b08d-0f8ac8339ad3
🌟 Где упоминался
Этот проект был представлен и упомянут в различных публикациях и ресурсах:
Статья о лучших практиках Claude Code — инженерный блог Anthropic, демонстрирующий лучшие практики
React Native Newsletter, выпуск 187 — представлен в самом популярном новостном бюллетене сообщества React Native
Mobile Automation Newsletter — #56 — долгоживущий новостной бюллетень о ресурсах для мобильного тестирования и автоматизации
Список punkeye/awesome-mcp-server — включен в одну из самых популярных коллекций курируемых MCP-серверов
Related MCP server: iOS Device Control MCP Server
Инструменты
get_booted_sim_id
Описание: Получение ID запущенного в данный момент симулятора iOS
Параметры: Нет параметров
open_simulator
Описание: Открывает приложение iOS Simulator
Параметры: Нет параметров
ui_describe_all
Описание: Описывает информацию о доступности (accessibility) для всего экрана в симуляторе iOS
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
}ui_tap
Описание: Нажатие на экран в симуляторе iOS
Параметры:
{
/**
* Press duration in seconds (decimal numbers allowed)
*/
duration?: string;
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** The x-coordinate */
x: number;
/** The y-coordinate */
y: number;
}ui_type
Описание: Ввод текста в симулятор iOS
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/**
* Text to input
* Format: ASCII printable characters only
*/
text: string;
}ui_swipe
Описание: Свайп по экрану в симуляторе iOS
Параметры:
{
/**
* Swipe duration in seconds (decimal numbers allowed)
*/
duration?: string;
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** The starting x-coordinate */
x_start: number;
/** The starting y-coordinate */
y_start: number;
/** The ending x-coordinate */
x_end: number;
/** The ending y-coordinate */
y_end: number;
/** The size of each step in the swipe (default is 1) */
delta?: number;
}ui_describe_point
Описание: Возвращает элемент доступности по заданным координатам на экране симулятора iOS
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** The x-coordinate */
x: number;
/** The y-coordinate */
y: number;
}ui_find_element
Описание: Выполняет поиск по дереву доступности и возвращает элементы, соответствующие заданным критериям
Параметры:
{
/** Array of search strings. An element matches if ANY string matches against its AXLabel or AXUniqueId */
search: string[];
/** Filter by element type (e.g. 'Button', 'StaticText', 'Group'). Case-insensitive exact match */
type?: string;
/** Match mode: 'substring' (default) or 'exact' */
matchMode?: "substring" | "exact";
/** Whether search matching is case-sensitive (default: false) */
caseSensitive?: boolean;
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
}ui_view
Описание: Получение содержимого изображения сжатого скриншота текущего вида симулятора
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
}screenshot
Описание: Делает скриншот симулятора iOS
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** File path where the screenshot will be saved. If relative, it uses the directory specified by the `IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR` env var, or `~/Downloads` if not set. */
output_path: string;
/** Image format (png, tiff, bmp, gif, or jpeg). Default is png. */
type?: "png" | "tiff" | "bmp" | "gif" | "jpeg";
/** Display to capture (internal or external). Default depends on device type. */
display?: "internal" | "external";
/** For non-rectangular displays, handle the mask by policy (ignored, alpha, or black) */
mask?: "ignored" | "alpha" | "black";
}record_video
Описание: Записывает видео симулятора iOS, используя напрямую simctl
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** Optional output path. If not provided, a default name will be used. The file will be saved in the directory specified by `IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR` or in `~/Downloads` if the environment variable is not set. */
output_path?: string;
/** Specifies the codec type: "h264" or "hevc". Default is "hevc". */
codec?: "h264" | "hevc";
/** Display to capture: "internal" or "external". Default depends on device type. */
display?: "internal" | "external";
/** For non-rectangular displays, handle the mask by policy: "ignored", "alpha", or "black". */
mask?: "ignored" | "alpha" | "black";
/** Force the output file to be written to, even if the file already exists. */
force?: boolean;
}stop_recording
Описание: Останавливает запись видео симулятора с помощью killall
Параметры: Нет параметров
install_app
Описание: Устанавливает пакет приложения (.app или .ipa) на симулятор iOS
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** Path to the app bundle (.app directory or .ipa file) to install */
app_path: string;
}launch_app
Описание: Запускает приложение на симуляторе iOS по идентификатору пакета (bundle identifier)
Параметры:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** Bundle identifier of the app to launch (e.g., com.apple.mobilesafari) */
bundle_id: string;
/** Terminate the app if it is already running before launching */
terminate_running?: boolean;
/** Optional environment variables passed via SIMCTL_CHILD_ to simctl launch */
env?: Record<string, string>;
}Примечания: Переменные окружения передаются с использованием SIMCTL_CHILD_, так как simctl launch не поддерживает --env/--envs во всех версиях Xcode.
Пример:
{
"bundle_id": "com.example.app",
"terminate_running": true,
"env": {
"FOO": "bar",
"BAZ": "qux"
}
}💡 Вариант использования: Этап QA через вызовы инструментов MCP
Этот MCP-сервер позволяет ИИ-ассистентам, интегрированным с клиентом протокола контекста модели (MCP), выполнять задачи по обеспечению качества (QA) путем вызова инструментов. Это полезно сразу после реализации функций, чтобы помочь обеспечить согласованность пользовательского интерфейса и правильность поведения.
Как использовать
После реализации функции дайте указание вашему ИИ-ассистенту в среде клиента MCP использовать доступные инструменты. Например, в режиме агента Cursor вы можете использовать приведенные ниже подсказки для быстрой проверки и документирования взаимодействий с UI.
Примеры подсказок
Проверка элементов UI:
Verify all accessibility elements on the current screenПодтверждение ввода текста:
Enter "QA Test" into the text input field and confirm the input is correctПроверка отклика на нажатие:
Tap on coordinates x=250, y=400 and verify the expected element is triggeredПроверка действия свайпа:
Swipe from x=150, y=600 to x=150, y=100 and confirm correct behaviorДетальная проверка элемента:
Describe the UI element at position x=300, y=350 to ensure proper labeling and functionalityПоказать вашему ИИ-агенту экран симулятора:
View the current simulator screenСделать скриншот:
Take a screenshot of the current simulator screen and save it to my_screenshot.pngЗаписать видео:
Start recording a video of the simulator screen (saves to the default output directory, which is `~/Downloads` unless overridden by `IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR`)Остановить запись:
Stop the current simulator screen recordingУстановить приложение:
Install the app at path/to/MyApp.app on the simulatorЗапустить приложение:
Launch the Safari app (com.apple.mobilesafari) on the simulator
Предварительные требования
Node.js
macOS (поскольку симуляторы iOS доступны только на macOS)
Установленные Xcode и симуляторы iOS
Инструмент Facebook IDB (см. руководство по установке)
Установка
В этом разделе приведены инструкции по интеграции MCP-сервера симулятора iOS с различными клиентами протокола контекста модели (MCP).
Установка с Cursor
Cursor управляет MCP-серверами через файл конфигурации, расположенный по адресу ~/.cursor/mcp.json.
Вариант 1: Использование NPX (рекомендуется)
Отредактируйте файл конфигурации MCP в Cursor. Часто его можно открыть напрямую из Cursor или использовать команду:
# Open with your default editor (or use 'code', 'vim', etc.) open ~/.cursor/mcp.json # Or use Cursor's command if available # cursor ~/.cursor/mcp.jsonДобавьте или обновите раздел
mcpServersконфигурацией сервера симулятора iOS:{ "mcpServers": { // ... other servers might be listed here ... "ios-simulator": { "command": "npx", "args": ["-y", "ios-simulator-mcp"] } } }Убедитесь, что структура JSON корректна, особенно если раздел
mcpServersуже существует.Перезапустите Cursor, чтобы изменения вступили в силу.
Вариант 2: Локальная разработка
Клонируйте этот репозиторий:
git clone https://github.com/joshuayoes/ios-simulator-mcp cd ios-simulator-mcpУстановите зависимости:
npm installСоберите проект:
npm run buildОтредактируйте файл конфигурации MCP в Cursor (как показано в Варианте 1).
Добавьте или обновите раздел
mcpServers, указав путь к вашей локальной сборке:{ "mcpServers": { // ... other servers might be listed here ... "ios-simulator": { "command": "node", "args": ["/full/path/to/your/ios-simulator-mcp/build/index.js"] } } }Важно: Замените
/full/path/to/your/на абсолютный путь к месту, куда вы клонировали репозиторийios-simulator-mcp.Перезапустите Cursor, чтобы изменения вступили в силу.
Установка с Claude Code
CLI Claude Code может управлять MCP-серверами с помощью команд claude mcp или путем прямого редактирования файлов конфигурации. Для получения дополнительной информации о настройке MCP в Claude Code обратитесь к официальной документации.
Вариант 1: Использование NPX (рекомендуется)
Добавьте сервер с помощью команды
claude mcp add:claude mcp add ios-simulator npx ios-simulator-mcpПри необходимости перезапустите все запущенные сессии Claude Code.
Вариант 2: Локальная разработка
Клонируйте этот репозиторий, установите зависимости и соберите проект, как описано в шагах 1-3 раздела "Локальная разработка" для Cursor.
Добавьте сервер с помощью команды
claude mcp add, указав путь к вашей локальной сборке:claude mcp add ios-simulator -- node "/full/path/to/your/ios-simulator-mcp/build/index.js"Важно: Замените
/full/path/to/your/на абсолютный путь к месту, куда вы клонировали репозиторийios-simulator-mcp.При необходимости перезапустите все запущенные сессии Claude Code.
Конфигурация
Переменные окружения
Переменная | Описание | Пример |
| Список имен инструментов через запятую, которые нужно исключить из регистрации. |
|
| Указывает директорию по умолчанию для выходных файлов, таких как скриншоты и видеозаписи. Если не задано, будет использоваться |
|
| Указывает пользовательский путь к исполняемому файлу IDB. Если не задано, будет использоваться |
|
Пример конфигурации
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": ["-y", "ios-simulator-mcp"],
"env": {
"IOS_SIMULATOR_MCP_FILTERED_TOOLS": "screenshot,record_video,stop_recording",
"IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR": "~/Code/awesome-project/tmp",
"IOS_SIMULATOR_MCP_IDB_PATH": "~/bin/idb"
}
}
}
}Списки серверов в реестре MCP
Лицензия
MIT
Available Tools
17 toolsget_booted_sim_idARead-only
Get the ID of the currently booted iOS simulator
Inputs: no named parameters.
install_appA
Installs an app bundle (.app or .ipa) on the iOS Simulator
Inputs: app_path (required), udid.
launch_appA
Launches an app on the iOS Simulator by bundle identifier
Inputs: bundle_id (required), env, udid, terminate_running.
list_appsARead-only
Lists all installed apps on the iOS Simulator with their bundle identifiers and display names
Inputs: udid.
open_simulatorA
Opens the iOS Simulator application
Inputs: no named parameters.
open_urlA
Opens a URL in the iOS Simulator, useful for testing deep links and universal links
Inputs: url (required), udid.
record_videoB
Records a video of the iOS Simulator using simctl directly
Inputs: mask, udid, codec, force, +2 more.
screenshotB
Takes a screenshot of the iOS Simulator
Inputs: output_path (required), mask, type, udid, +1 more.
stop_recordingA
Stops the simulator video recording using killall
Inputs: no named parameters.
terminate_appA
Terminates a running app on the iOS Simulator by bundle identifier
Inputs: bundle_id (required), udid.
ui_describe_allARead-only
Describes accessibility information for the entire screen in the iOS Simulator
Inputs: udid.
ui_describe_pointARead-only
Returns the accessibility element at given co-ordinates on the iOS Simulator's screen
Inputs: x (required), y (required), udid.
ui_find_elementARead-only
Searches the accessibility tree and returns elements matching the given criteria
Inputs: search (required), type, udid, matchMode, +1 more.
ui_swipeB
Swipe on the screen in the iOS Simulator
Inputs: x_end (required), y_end (required), x_start (required), y_start (required), +3 more.
ui_tapB
Tap on the screen in the iOS Simulator
Inputs: x (required), y (required), udid, duration.
ui_typeB
Input text into the iOS Simulator
Inputs: text (required), udid, method, replace.
ui_viewARead-only
Get the image content of a compressed screenshot of the current simulator view
Inputs: udid.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target clearly distinct actions (tap, swipe, type, describe, install, launch, terminate). The main ambiguity is between ui_view and screenshot, which both return a screenshot of the simulator with no explicit guidance on when to prefer one over the other, and the recording pair (record_video vs stop_recording) is only distinguishable by name symmetry.
Interaction tools consistently use a ui_ namespace, and lifecycle/app tools follow a clear verb_noun pattern (install_app, launch_app, terminate_app, list_apps, open_url). Minor deviations: record_video/stop_recording breaks the verb_noun symmetry, and the bare noun screenshot sits awkwardly next to ui_view.
17 tools is slightly heavy but each maps to a recognizable simulator task across UI inspection, interaction, app management, and recording. The only near-duplicate pair is ui_view/screenshot, so the count is reasonable rather than bloated.
Core workflows are covered (view, interact, describe accessibility, install/launch/terminate apps, record video), but there are notable gaps: install_app has no uninstall_app counterpart, and there is no support for hardware buttons (home, lock), rotation, or simulator boot/shutdown besides open_simulator.
Maintenance
Related MCP Connectors
Build, run, and inspect iOS apps in disposable hosted Simulators from cloud coding agents.
Cloud iPhone Simulators for AI agents: build the Xcode project, read the screen, tap by label, test.
Let your AI use a real iPhone: see the screen, tap, type, open apps, run saved workflows.
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to automate iOS Simulator interactions including device management, UI element interaction (tap, swipe, type), screenshot capture, and execution of YAML-defined navigation workflows.ISC
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive control of iOS simulators and real devices through AI assistants, supporting app management, UI automation, screenshots, media operations, and location simulation for iOS development and testing workflows.8MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI to control iOS simulators through the MCP protocol. Supports device management, UI automation, and network interception including screenshot capture, text input, and HTTP request mocking.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control iOS Simulators for UI/UX debugging, app management, and accessibility auditing via simctl, IDB, and ClaudeDebugKit.MIT