This server captures and manages screenshots from iOS Simulator with several capabilities:
Capture Screenshots: Takes screenshots from the iOS Simulator's current screen
Device Selection: Targets a specific simulator device or defaults to the currently booted device
Customize Output: Specifies output filename and directory for saved screenshots
Resize Images: Optionally resizes screenshots to approximately VGA size (640x480 pixels)
Image Customization: Allows setting maximum width for resized images
Error Handling: Provides detailed error messages for troubleshooting
JSON Response: Returns metadata about captured screenshots including dimensions, format, size, and timestamp
Captures screenshots from iOS Simulator devices and saves them to a specified directory with options for output filename, directory, image resizing, and selecting specific simulator devices.
Runs on macOS to capture iOS Simulator screenshots, requiring macOS as the underlying operating system to access the iOS Simulator environment.
Leverages Xcode Command Line Tools to interact with iOS Simulator devices and capture screenshots through the xcrun simctl command.
MCP iOS Simulator Screenshot
A server that captures screenshots from iOS Simulator using the Model Context Protocol (MCP).
Overview
This project implements an MCP protocol server that captures the current screen of the iOS Simulator and saves it to a specified directory.
Related MCP server: MCP-URL2SNAP
Setup
Cline and Roo Code
For Cline and Roo Code, the basic format is:
If you clone the repository, you can use the following configuration:
Cursor, Claude Desktop
For Cursor and Claude Desktop, you need to specify the --output-dir and the output directory:
MCP Tool Parameters
get_screenshot
Captures a screenshot from iOS Simulator and saves it to the specified directory.
Parameter | Type | Description | Default Value |
output_filename | string | Output filename | timestamp.png |
output_directory_name | string | Subdirectory name for screenshots | .screenshots |
resize | boolean | Whether to resize the image to approximately VGA size | true |
max_width | integer | Maximum width for resizing (pixels) | 640 |
device_id | string | Specify a simulator device | booted device |
Output Format
On success:
Note: The serverConfig.commandLineArgs.outputDir field is only included in the response when the --output-dir parameter is specified when starting the server.
Troubleshooting
If you cannot capture screenshots:
Check if iOS Simulator is running
Check if Xcode Command Line Tools are installed
Check if the
xcrun simctl io booted screenshotcommand can be executed directly
If permission errors occur:
Check if you have write permissions for the output directory
Requirements
Node.js 16.0.0 or higher
macOS (iOS Simulator required)
Xcode Command Line Tools
Technology Stack
TypeScript
Node.js
MCP SDK (@modelcontextprotocol/sdk)
License
MIT