Skip to main content
Glama

iOS Simulator MCP サーバー

Install MCP Server NPM Version

iOSシミュレーターと対話するためのModel Context Protocol (MCP) サーバーです。このサーバーを使用すると、iOSシミュレーターに関する情報の取得、UI操作の制御、UI要素の検査を行うことができます。

セキュリティ通知: 1.3.3未満のバージョンに存在したコマンドインジェクションの脆弱性は修正されました。v1.3.3以降にアップデートしてください。詳細は SECURITY.md を参照してください。

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

🌟 掲載実績

当プロジェクトは、以下の出版物やリソースで紹介・言及されています:

Related MCP server: iOS Device Control MCP Server

ツール

get_booted_sim_id

説明: 現在起動中のiOSシミュレーターのIDを取得します

パラメータ: パラメータなし

open_simulator

説明: iOSシミュレーターアプリケーションを開きます

パラメータ: パラメータなし

ui_describe_all

説明: 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

説明: simctlを使用して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;
  /** 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

説明: iOSシミュレーターにアプリバンドル (.app または .ipa) をインストールします

パラメータ:

{
  /**
   * 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シミュレーターでアプリを起動します

パラメータ:

{
  /**
   * 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 launch はすべてのXcodeバージョンで --env/--envs をサポートしていないため、環境変数は SIMCTL_CHILD_ を使用して渡されます。

例:

{
  "bundle_id": "com.example.app",
  "terminate_running": true,
  "env": {
    "FOO": "bar",
    "BAZ": "qux"
  }
}

💡 ユースケース: MCPツール呼び出しによるQAステップ

このMCPサーバーを使用すると、Model Context Protocol (MCP) クライアントと統合されたAIアシスタントが、ツール呼び出しを行うことで品質保証 (QA) タスクを実行できます。これは、機能実装直後にUIの一貫性と正しい動作を確認するのに役立ちます。

使用方法

機能実装後、MCPクライアント環境内のAIアシスタントに、利用可能なツールを使用するよう指示してください。例えば、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
  • AIエージェントにシミュレーター画面を表示:

    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

前提条件

インストール

このセクションでは、iOS Simulator MCPサーバーをさまざまなModel Context Protocol (MCP) クライアントと統合するための手順を説明します。

Cursorへのインストール

Cursorは、~/.cursor/mcp.json にある設定ファイルを通じてMCPサーバーを管理します。

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

  1. Cursor MCP設定ファイルを編集します。通常、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
  2. mcpServers セクションにiOSシミュレーターサーバーの設定を追加または更新します:

    {
      "mcpServers": {
        // ... other servers might be listed here ...
        "ios-simulator": {
          "command": "npx",
          "args": ["-y", "ios-simulator-mcp"]
        }
      }
    }

    mcpServers が既に存在する場合は、JSON構造が有効であることを確認してください。

  3. 変更を反映させるためにCursorを再起動します。

オプション2: ローカル開発

  1. このリポジトリをクローンします:

    git clone https://github.com/joshuayoes/ios-simulator-mcp
    cd ios-simulator-mcp
  2. 依存関係をインストールします:

    npm install
  3. プロジェクトをビルドします:

    npm run build
  4. Cursor MCP設定ファイルを編集します (オプション1を参照)。

  5. ローカルビルドを指すように 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 リポジトリをクローンした絶対パスに置き換えてください。

  6. 変更を反映させるためにCursorを再起動します。

Claude Codeへのインストール

Claude Code CLIは、claude mcp コマンドを使用するか、設定ファイルを直接編集することでMCPサーバーを管理できます。Claude Code MCP設定の詳細については、公式ドキュメント を参照してください。

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

  1. claude mcp add コマンドを使用してサーバーを追加します:

    claude mcp add ios-simulator npx ios-simulator-mcp
  2. 必要に応じて、実行中のClaude Codeセッションを再起動します。

オプション2: ローカル開発

  1. このリポジトリをクローンし、依存関係をインストールし、Cursorの「ローカル開発」手順1〜3に従ってプロジェクトをビルドします。

  2. ローカルビルドを指すように 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 リポジトリをクローンした絶対パスに置き換えてください。

  3. 必要に応じて、実行中のClaude Codeセッションを再起動します。

設定

環境変数

変数

説明

例

IOS_SIMULATOR_MCP_FILTERED_TOOLS

登録から除外するツール名のカンマ区切りリスト。

screenshot,record_video,stop_recording

IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR

スクリーンショットやビデオ録画などの出力ファイルのデフォルトディレクトリを指定します。設定されていない場合は ~/Downloads が使用されます。エージェントのファイルシステムへのアクセスが制限されている場合に便利です。

~/Code/awesome-project/tmp

IOS_SIMULATOR_MCP_IDB_PATH

IDB実行ファイルへのカスタムパスを指定します。設定されていない場合は idb が使用されます (PATHにあると想定)。IDBが標準以外の場所にインストールされている場合に便利です。

~/bin/idb または /usr/local/bin/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 tools
get_booted_sim_idA
Read-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_appsA
Read-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_allA
Read-only

Describes accessibility information for the entire screen in the iOS Simulator

Inputs: udid.

ui_describe_pointA
Read-only

Returns the accessibility element at given co-ordinates on the iOS Simulator's screen

Inputs: x (required), y (required), udid.

ui_find_elementA
Read-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_viewA
Read-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

    A3.5/5.0

    Scored across 17 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers