iOS Simulator MCP
iOS Simulator MCP サーバー
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
🌟 掲載実績
当プロジェクトは、以下の出版物やリソースで紹介・言及されています:
Claude Code Best Practices article - Anthropicのエンジニアリングブログでベストプラクティスとして紹介
React Native Newsletter Issue 187 - 最も人気のあるReact Nativeコミュニティニュースレターで特集
Mobile Automation Newsletter - #56 - モバイルテストと自動化リソースに関する長期連載ニュースレターで特集
punkeye/awesome-mcp-server listing - 最も人気のある厳選されたMCPサーバーコレクションに掲載
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 functionalityAIエージェントにシミュレーター画面を表示:
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 ツール (インストールガイドを参照)
インストール
このセクションでは、iOS Simulator MCPサーバーをさまざまなModel Context Protocol (MCP) クライアントと統合するための手順を説明します。
Cursorへのインストール
Cursorは、~/.cursor/mcp.json にある設定ファイルを通じてMCPサーバーを管理します。
オプション1: NPXを使用する (推奨)
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.jsonmcpServersセクションにiOSシミュレーターサーバーの設定を追加または更新します:{ "mcpServers": { // ... other servers might be listed here ... "ios-simulator": { "command": "npx", "args": ["-y", "ios-simulator-mcp"] } } }mcpServersが既に存在する場合は、JSON構造が有効であることを確認してください。変更を反映させるためにCursorを再起動します。
オプション2: ローカル開発
このリポジトリをクローンします:
git clone https://github.com/joshuayoes/ios-simulator-mcp cd ios-simulator-mcp依存関係をインストールします:
npm installプロジェクトをビルドします:
npm run buildCursor MCP設定ファイルを編集します (オプション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へのインストール
Claude Code CLIは、claude mcp コマンドを使用するか、設定ファイルを直接編集することでMCPサーバーを管理できます。Claude Code MCP設定の詳細については、公式ドキュメント を参照してください。
オプション1: NPXを使用する (推奨)
claude mcp addコマンドを使用してサーバーを追加します:claude mcp add ios-simulator npx ios-simulator-mcp必要に応じて、実行中のClaude Codeセッションを再起動します。
オプション2: ローカル開発
このリポジトリをクローンし、依存関係をインストールし、Cursorの「ローカル開発」手順1〜3に従ってプロジェクトをビルドします。
ローカルビルドを指すように
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