Логотип 用于iOS模拟器的MCP服务器

用于iOS模拟器的MCP服务器

Организация
InditexTech

A Model Context Protocol (MCP) server that enables LLMs to interact with iOS simulators through natural language commands.

ИздательInditexTech
Репозиторийmcp-server-simulator-ios-idb
ЯзыкTypeScript
Форки
24
Звёзды
309
Доступные инструменты
0
Тип транспортаstdio
Категории
ЛицензияApache-2.0
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    用于iOS模拟器的MCP服务器 предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 309, форки: 24 — в связанном репозитории.

📱 MCP Server for iOS Simulator

MCP Server

A Model Context Protocol (MCP) server that enables LLMs to interact with iOS simulators through natural language commands.

ℹ️ Overview

This MCP server provides a bridge between Large Language Models (LLMs) and iOS simulators, offering comprehensive control through natural language commands. Here's what it can do:

For detailed usage, see the Installation guide and Supported Commands sections. You can use this server either through direct MCP integration or as a standalone library.

Check out the Architecture section to understand how the components work together to enable natural language control of iOS simulators.

demo

🎮 Simulator Control

  • Create and manage simulator sessions
  • Boot, shutdown, and monitor simulator states
  • List available and running simulators
  • Focus simulator windows

📱 Application Management

  • Install and manage iOS applications
  • Launch, terminate, and uninstall apps
  • Monitor app states and verify installations
  • Handle app permissions and configurations

🖱️ UI Interaction & Testing

  • Interact with the simulator UI
  • Execute tap, swipe, and button press actions
  • Input text and key sequences
  • Access accessibility elements for UI testing
  • Record videos of UI interactions

🛠️ Development & Debugging

  • Capture screenshots and system logs
  • Debug applications in real-time
  • Monitor and analyze crash logs
  • Install dynamic libraries and manage app data

⚡ Advanced Features

  • Additional functionality includes:
    • Location simulation
    • Media injection
    • URL scheme handling
    • Contact database management
    • Keychain operations

For detailed usage, see the Installation guide and Supported Commands sections. You can use this server either through direct MCP integration or as a standalone library.

Check out the Architecture section to understand how the components work together to enable natural language control of iOS simulators.

📋 Requirements

  • macOS: Required for iOS simulator support
  • Node.js: v20.0.0 or higher
  • Homebrew: Required for installing dependencies
  • XCode: With iOS simulators installed

🚀 Installation

The easiest way to install this server is through Cline:

  1. Simply ask Cline:
Add this mcp to cline https://github.com/InditexTech/mcp-server-simulator-ios-idb
  1. Cline will handle the installation process automatically, including dependency management and configuration.

Alternatively, you can install it manually:

bash
# Clone the repository
git clone https://github.com/InditexTech/mcp-server-simulator-ios-idb.git
cd mcp-server-simulator-ios-idb

# Create and activate Python virtual environment
python3 -m venv venv
source venv/bin/activate  # On Unix/macOS

# Install dependencies
npm install

# Build the project
npm run build

# Start the project
npm start

# Run tests
npm test

The installation process will automatically:

  1. Check if you're running macOS
  2. Install idb-companion via Homebrew
  3. Install fb-idb via pip in the virtual environment

Note: Make sure to keep the virtual environment activated while using the server. If you close your terminal and come back later, you'll need to reactivate the virtual environment with the source venv/bin/activate command before running npm start.

🔌 MCP Integration

To use this server with Claude or other LLM assistants:

  1. Add the server to your MCP settings in Claude Desktop:
json
{
  "mcpServers": {
    "ios-simulator": {
      "command": "node",
      "args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],
      "env": {}
    }
  }
}
  1. The LLM can now use natural language commands to control iOS simulators:
create a simulator session with iPhone 14
install app /path/to/my-app.ipa
launch app com.example.myapp
tap at 100, 200
take a screenshot

📚 Usage as a Library

You can also use this package as a library in your own projects:

🔰 Basic Usage

typescript
import { createMCPServer } from 'mcp-server-simulator-ios-idb';

async function main() {
  // Create an instance of the MCP server
  const { orchestrator } = createMCPServer();
  
  // Process natural language commands
  
  // Create a simulator session
  const sessionResult = await orchestrator.processInstruction('create session');
  console.log(`Session created: ${sessionResult.data}`);
  
  // Interact with the simulator
  await orchestrator.processInstruction('tap at 100, 200');
  
  // Capture a screenshot
  const screenshotResult = await orchestrator.processInstruction('take screenshot');
  console.log(`Screenshot saved at: ${screenshotResult.data}`);
}

main().catch(console.error);

🚀 Advanced Usage

You can also use the individual components directly:

typescript
import { 
  IDBManager, 
  NLParser, 
  MCPOrchestrator,
  ParserToOrchestrator,
  OrchestratorToIDB
} from 'mcp-server-simulator-ios-idb';

// Create instances
const idbManager = new IDBManager();
const parser = new NLParser();
const orchestrator = new MCPOrchestrator(parser, idbManager);

// Use the components directly
const sessionId = await idbManager.createSimulatorSession({
  deviceName: 'iPhone 12',
  platformVersion: '15.0'
});

await idbManager.tap(sessionId, 100, 200);

🏗️ Project Structure

mcp-server-simulator-ios-idb/
├── src/                      # Source code
│   ├── adapters/             # Adapter components
│   ├── idb/                  # IDB manager implementation
│   ├── mcp/                  # MCP server implementation
│   ├── orchestrator/         # Command orchestrator
│   ├── parser/              # Natural language parser
│   └── index.ts             # Main entry point
├── types/                   # TypeScript type definitions
├── scripts/                 # Installation scripts
├── package.json            # Project configuration
└── tsconfig.json          # TypeScript configuration

🎯 Supported Commands

The NLParser supports the following natural language commands:

🎮 Simulator Management

CommandDescriptionExample
Create sessionCreates a new simulator session"create session", "create simulator iPhone 12"
Terminate sessionTerminates the current session"terminate session", "close simulator"
List simulatorsLists available simulators"list simulators", "show simulators"
List booted simulatorsLists running simulators"list booted simulators", "show running simulators"
Boot simulatorBoots a simulator by UDID"boot simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2"
Shutdown simulatorShuts down a simulator"shutdown simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2"
Focus simulatorBrings simulator window to front"focus simulator", "bring simulator to front"
List simulator sessionsLists active simulator sessions"list simulator sessions", "show active sessions"

📱 App Management

CommandDescriptionExample
Install appInstalls an app on the simulator"install app /path/to/app.ipa"
Launch appLaunches an app on the simulator"launch app com.example.app"
Terminate appTerminates a running app"terminate app com.example.app"
Uninstall appUninstalls an app"uninstall app com.example.app"
List appsLists installed applications"list apps", "show installed apps"
Check if app installedChecks if an app is installed"is app com.example.app installed"

🖱️ UI Interaction

CommandDescriptionExample
TapTaps at specific coordinates"tap at 100, 200"
SwipePerforms a swipe gesture"swipe from 100, 200 to 300, 400"
Press buttonPresses a device button"press button HOME", "press button SIRI"
Input textTypes text"input text Hello World"
Press keyPresses a key by code"press key 4"
Press key sequencePresses a sequence of keys"press key sequence 4 5 6"

♿ Accessibility

CommandDescriptionExample
Describe elementsLists all accessibility elements"describe all elements", "show accessibility elements"
Describe pointDescribes element at coordinates"describe point 100, 200", "what's at 150, 300"

📸 Capture and Logs

CommandDescriptionExample
Take screenshotCaptures a screenshot"take screenshot", "capture screen"
Record videoRecords screen activity"record video /path/output.mp4"
Stop recordingStops video recording"stop recording", "stop video recording"
Get logsRetrieves system or app logs"get logs", "get logs for com.example.app"

🐛 Debug

CommandDescriptionExample
Start debugStarts a debug session"debug app com.example.app", "start debug com.example.app"
Stop debugStops a debug session"stop debug", "terminate debug session"
Debug statusGets debug session status"debug status", "show debug info"

💥 Crash Logs

CommandDescriptionExample
List crash logsLists available crash logs"list crash logs", "show crash logs"
Show crash logShows content of a crash log"show crash log crash_2023-01-01"
Delete crash logsDeletes crash logs"delete crash logs", "clear crash logs"

🔧 Additional Commands

CommandDescriptionExample
Install dylibInstalls a dynamic library"install dylib /path/to/library.dylib"
Open URLOpens a URL in the simulator"open url https://example.com"
Clear keychainClears the simulator's keychain"clear keychain"
Set locationSets the simulator's location"set location 37.7749, -122.4194"
Add mediaAdds media to the camera roll"add media /path/to/image.jpg"
Approve permissionsApproves app permissions"approve permissions com.example.app photos camera"
Update contactsUpdates contacts database"update contacts /path/to/contacts.sqlite"

The interface supports all commands available in the idb CLI tool, providing a comprehensive set of operations for iOS simulator automation.

🔍 Architecture

The server consists of three main components:

  1. IDBManager: Low-level component that interacts directly with iOS simulators through idb.
  2. NLParser: Component that interprets natural language instructions and converts them into structured commands.
  3. MCPOrchestrator: Central component that coordinates interactions between the parser and the IDBManager.

These components are connected through adapters:

  • ParserToOrchestrator: Converts parser results into orchestrator commands.
  • OrchestratorToIDB: Translates orchestrator commands into IDBManager calls.

🔌 MCP Integration

To use this server with the Model Context Protocol:

  1. Add the server to your MCP settings:
json
{
  "mcpServers": {
    "ios-simulator": {
      "command": "node",
      "args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],
      "env": {}
    }
  }
}
  1. Connect to the server in your LLM application:
typescript
const result = await useMcpTool({
  serverName: "ios-simulator",
  toolName: "process-instruction",
  arguments: {
    instruction: "create simulator session"
  }
});

🙏 Acknowledgments

This project would not be possible without facebook/idb, which provides the underlying iOS simulator control capabilities. We extend our sincere gratitude to the Facebook/Meta team and all contributors to the idb project for creating and maintaining such a powerful and reliable tool.

📄 License

This tool is available as open source under the terms of the Apache-2.0.

Установка

TypingMind
{
  "mcpServers": {
    "mcp-server-simulator-ios-idb": {
      "command": "cline",
      "args": [
        "Add this mcp to cline https://github.com/InditexTech/mcp-server-simulator-ios-idb"
      ]
    }
  }
}

Используйте MCP 用于iOS模拟器的MCP服务器 с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения 用于iOS模拟器的MCP服务器 вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте 用于iOS模拟器的MCP服务器 как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для 用于iOS模拟器的MCP服务器.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "mcp-server-simulator-ios-idb": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-simulator-ios-idb"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для 用于iOS模拟器的MCP服务器, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для 用于iOS模拟器的MCP服务器.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью 用于iOS模拟器的MCP服务器?
用于iOS模拟器的MCP服务器
Конечно. Я всё прочитал.
Вот что я нашёл с помощью 用于iOS模拟器的MCP服务器.

Часто задаваемые вопросы

Для чего используется сервер MCP 用于iOS模拟器的MCP服务器?

用于iOS模拟器的MCP服务器 — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP 用于iOS模拟器的MCP服务器 с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать 用于iOS模拟器的MCP服务器 с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP 用于iOS模拟器的MCP服务器 с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив 用于iOS模拟器的MCP服务器, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP 用于iOS模拟器的MCP服务器 к TypingMind?

用于iOS模拟器的MCP服务器 работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP 用于iOS模拟器的MCP服务器 в TypingMind?

用于iOS模拟器的MCP服务器 предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP 用于iOS模拟器的MCP服务器?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если 用于iOS模拟器的MCP服务器 требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇