iOS Simulator MCP

by joshuayoes
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Integrates with Facebook's IDB tool to communicate with and control iOS simulators, enabling the MCP server to perform UI automation tasks.

  • Provides tools for interacting with iOS simulators, including getting simulator information, controlling UI interactions (tapping, swiping, text input), and inspecting UI elements for accessibility testing and automation.

  • Enables operation on macOS systems where iOS simulators run, providing simulator access and control capabilities specific to the macOS environment.

iOSシミュレータMCPサーバー

iOSシミュレータと連携するためのモデルコンテキストプロトコル(MCP)サーバー。このサーバーを使用すると、iOSシミュレータに関する情報の取得、UIインタラクションの制御、UI要素の検査など、iOSシミュレータと連携できます。

https://github.com/user-attachments/assets/453ebe7b-cc93-4ac2-b08d-0f8ac8339ad3

特徴

  • 現在起動しているiOSシミュレータのIDを取得する
  • シミュレータ UI を操作します。
    • 画面上のすべてのアクセシビリティ要素を説明する
    • 画面座標をタップ
    • 入力テキスト
    • 座標間をスワイプ
    • 特定の座標にあるUI要素に関する情報を取得する
    • シミュレータ画面のスクリーンショットを撮る
  • 環境変数を使用して特定のツールをフィルタリングする

構成

環境変数

  • IOS_SIMULATOR_MCP_FILTERED_TOOLS : 登録から除外するツール名のコンマ区切りリスト。例: screenshot,record_video,stop_recording

💡 ユースケース: エージェントモードでの QA ステップ

この MCP は、機能を実装した直後にエージェント モードで品質保証手順として効果的に使用でき、UI の一貫性と正しい動作を保証します。

使い方

機能実装後:

  1. カーソルでエージェント モードをアクティブにします。
  2. 以下のプロンプトを使用して、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
  • スクリーンショットを撮る:
    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 ~/Downloads/simulator_recording_$DATE.mp4 by default)
  • 録画を停止:
    Stop the current simulator screen recording

前提条件

インストール

オプション 1: NPX を使用する (推奨)

  1. カーソル MCP 構成を編集します。
    cursor ~/.cursor/mcp.json
  2. iOS シミュレータ サーバーを構成に追加します。
    { "mcpServers": { "ios-simulator": { "command": "npx", "args": ["-y", "ios-simulator-mcp"] } } }
  3. カーソルを再起動します。

オプション2:地域開発

  1. このリポジトリをクローンします:
    git clone https://github.com/joshuayoes/ios-simulator-mcp cd ios-simulator-mcp
  2. 依存関係をインストールします:
    npm install
  3. プロジェクトをビルドします。
    npm run build
  4. カーソル MCP 構成を編集します。
    cursor ~/.cursor/mcp.json
  5. iOS シミュレータ サーバーを構成に追加します。
    { "mcpServers": { "ios-simulator": { "command": "node", "args": ["/path/to/your/ios-simulator-mcp/build/index.js"] } } }
    "/path/to/your"プロジェクト ディレクトリへの実際のパスに置き換えます。
  6. カーソルを再起動します。

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

UI 要素を検査し、UI の相互作用を制御し、自然言語コマンドを通じてシミュレーターを管理するためのツールを提供することで、iOS シミュレーターとの相互作用を可能にします。

  1. Features
    1. Configuration
      1. Environment Variables
    2. 💡 Use Case: QA Step in Agent Mode
      1. How to Use
      2. Example Prompts
    3. Prerequisites
      1. Installation
        1. Option 1: Using NPX (Recommended)
        2. Option 2: Local Development
      2. License
        ID: 3478yhfp24