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

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
9dResponse time
6wRelease cycle
9Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

  • MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joshuayoes/ios-simulator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server