MCP iOS シミュレータのスクリーンショット
モデル コンテキスト プロトコル (MCP) を使用して iOS シミュレータからスクリーンショットをキャプチャするサーバー。
概要
このプロジェクトは、iOS シミュレータの現在の画面をキャプチャし、指定されたディレクトリに保存する MCP プロトコル サーバーを実装します。
Related MCP server: MCP-URL2SNAP
設定
クラインとルーコード
Cline および Roo Code の場合、基本的な形式は次のとおりです。
{
"mcpServers": {
"mcp-ios-simulator-screenshot": {
"command": "npx",
"args": ["-y", "mcp-ios-simulator-screenshot"]
}
}
}リポジトリをクローンする場合は、次の構成を使用できます。
{
"mcpServers": {
"mcp-ios-simulator-screenshot": {
"command": "node",
"args": ["/path/to/mcp-ios-simulator-screenshot/build/index.js"]
}
}
}カーソル、クロードデスクトップ
Cursor および Claude Desktop の場合、 --output-dirと出力ディレクトリを指定する必要があります。
{
"mcpServers": {
"mcp-ios-simulator-screenshot": {
"command": "npx",
"args": [
"mcp-ios-simulator-screenshot",
"--output-dir",
"/path/to/your/output/directory"
]
}
}
}MCPツールパラメータ
スクリーンショットを取得
iOS シミュレータからスクリーンショットをキャプチャし、指定されたディレクトリに保存します。
パラメータ | タイプ | 説明 | デフォルト値 |
出力ファイル名 | 弦 | 出力ファイル名 | タイムスタンプ.png |
出力ディレクトリ名 | 弦 | スクリーンショットのサブディレクトリ名 | .スクリーンショット |
サイズ変更 | ブール値 | 画像をおよそVGAサイズにリサイズするかどうか | 真実 |
最大幅 | 整数 | サイズ変更の最大幅(ピクセル) | 640 |
デバイスID | 弦 | シミュレータデバイスを指定する | 起動したデバイス |
出力形式
成功した場合:
{
"success": true,
"message": "iOS Simulator screenshot saved successfully",
"filePath": ".screenshots/simulator_2025-04-10T16-51-16-755Z.png",
"metadata": {
"width": 1170,
"height": 2532,
"format": "png",
"size": 382946,
"timestamp": "2025-04-10T16:51:16.755Z"
},
"serverConfig": {
"commandLineArgs": {
"outputDir": "/Users/username/Desktop" // Only included when --output-dir is specified
}
}
}注: serverConfig.commandLineArgs.outputDirフィールドは、サーバーの起動時に--output-dirパラメータが指定された場合にのみ応答に含まれます。
{
"success": false,
"message": "Error capturing iOS Simulator screenshot: [error message]",
"error": {
"code": "ENOENT",
"command": "xcrun simctl io booted screenshot --type=png -",
"stderr": "No matching devices found."
}
}トラブルシューティング
スクリーンショットをキャプチャできない場合:
iOSシミュレータが実行中かどうかを確認する
Xcodeコマンドラインツールがインストールされているかどうかを確認する
xcrun simctl io booted screenshotコマンドを直接実行できるかどうかを確認します
権限エラーが発生した場合:
出力ディレクトリへの書き込み権限があるかどうかを確認してください
要件
Node.js 16.0.0以上
macOS(iOSシミュレータが必要)
Xcode コマンドラインツール
テクノロジースタック
タイプスクリプト
Node.js
MCP SDK(@modelcontextprotocol/sdk)
ライセンス
マサチューセッツ工科大学
その他の言語
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.