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
💡 ユースケース: MCP ツール呼び出しによる QA ステップ
このMCPサーバーは、モデルコンテキストプロトコル(MCP)クライアントに統合されたAIアシスタントがツール呼び出しを行うことで品質保証タスクを実行できるようにします。これは、機能実装直後に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スクリーンショットを撮る:
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
前提条件
Node.js
macOS(iOS シミュレーターは macOS でのみ利用可能)
XcodeとiOSシミュレータがインストールされている
Facebook IDBツール(インストールガイドを参照)
インストール
このセクションでは、iOS シミュレータ MCP サーバーをさまざまなモデル コンテキスト プロトコル (MCP) クライアントと統合する手順について説明します。
カーソルを使ったインストール
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.jsoniOS シミュレータ サーバーの構成を使用して、
mcpServersセクションを追加または更新します。{ "mcpServers": { // ... other servers might be listed here ... "ios-simulator": { "command": "npx", "args": ["-y", "ios-simulator-mcp"] } } }特に
mcpServersがすでに存在する場合は、JSON 構造が有効であることを確認してください。変更を有効にするには、カーソルを再起動します。
オプション2:地域開発
このリポジトリをクローンします:
git clone https://github.com/joshuayoes/ios-simulator-mcp cd ios-simulator-mcp依存関係をインストールします:
npm installプロジェクトをビルドします。
npm run buildカーソル 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リポジトリのクローンを作成した場所への絶対パスに置き換えます。変更を有効にするには、カーソルを再起動します。
Claude Codeによるインストール
Claude Code CLIは、 claude mcpコマンドを使用するか、設定ファイルを直接編集することでMCPサーバーを管理できます。Claude Code MCPの設定の詳細については、 公式ドキュメントを参照してください。
オプション 1: NPX を使用する (推奨)
claude mcp addコマンドを使用してサーバーを追加します。claude mcp add ios-simulator --command npx --args "-y,ios-simulator-mcp"注:
必要に応じて、実行中の Claude Code セッションを再起動します。
オプション2:地域開発
このリポジトリを複製し、依存関係をインストールし、カーソルの「ローカル開発」手順 1 ~ 3 の説明に従ってプロジェクトをビルドします。
claude mcp addコマンドを使用して、ローカル ビルドを指定してサーバーを追加します。claude mcp add ios-simulator --command node --args "/full/path/to/your/ios-simulator-mcp/build/index.js"重要:
/full/path/to/your/``ios-simulator-mcpリポジトリのクローンを作成した場所への絶対パスに置き換えます。必要に応じて、実行中の Claude Code セッションを再起動します。
ライセンス
マサチューセッツ工科大学
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
UI 要素を検査し、UI の相互作用を制御し、自然言語コマンドを通じてシミュレーターを管理するためのツールを提供することで、iOS シミュレーターとの相互作用を可能にします。
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityA bridge between iOS simulators and the Model Context Protocol, enabling programmatic control of iOS simulators through standardized communication interfaces.Last updated -1232TypeScriptMIT License
- Asecurity-licenseAqualityA MCP server that enables LLMs to interact with iOS simulators through natural language commands.Last updated -251Apache 2.0
- Asecurity-licenseAqualityProvides programmatic access to Xcode functionality, enabling AI assistants to create, build, test, and manage iOS/macOS projects directly.Last updated -27173MIT License