iOS Simulator MCP Server is a Model Context Protocol (MCP) server used to interact with the iOS Simulator. It allows AI assistants to obtain simulator information, control UI interactions, and inspect UI elements through an MCP client.
Purpose
This server is designed to let AI assistants integrated with an MCP client perform quality assurance (QA) tasks through tool calls. Once the functionality is implemented, it can help ensure UI consistency and correct behavior.
Main Capabilities
The server provides the following tools (based on official materials):
- get_booted_sim_id: Get the ID of the currently booted iOS Simulator. No parameters.
- Open the iOS Simulator app.
- ui_describe_all: Describe the accessibility information of the entire iOS Simulator screen.
- Tap on the iOS Simulator screen.
- Input text into the iOS Simulator.
- Swipe on the iOS Simulator screen.
- ui_describe_point: Return the accessibility element at the given coordinates on the iOS Simulator screen.
- ui_find_element: Search the accessibility tree and return elements matching the given criteria.
- Get the compressed screenshot image content of the current simulator view.
- Take a screenshot of the iOS Simulator screen.
- Record iOS Simulator video directly using simctl.
- Stop simulator video recording using killall.
- Install an app package (.app or .ipa) on the iOS Simulator.
- Launch an app on the iOS Simulator by bundle identifier. Note: Environment variables are passed through SIMCTL_CHILD_ because simctl launch does not support --env/--envs on all Xcode versions.
- Terminate a running app on the iOS Simulator by bundle identifier. Suitable for testing cold start flows and verifying crash recovery without reinstalling the app.
- Open a URL or deep link in the iOS Simulator. Handles https:// URLs (via Safari), custom URL schemes, and universal links—essential for testing deep link routing and OAuth redirect flows.
- List all installed apps on the iOS Simulator andtheir bundle identifiers and display names, sorted alphabetically. No need to manually look up the bundle ID before calling launch_app or terminate_app.
Usage
Environment Requirements
- Node.js 20 or later
- macOS (because the iOS Simulator is only available on macOS)
- Xcode and iOS Simulator installed
- Facebook IDB tool (see installation guide)
Integration with Cursor
Cursor manages MCP servers through the configuration file ~/.cursor/mcp.json.
Option 1: Use npx Edit ~/.cursor/mcp.json and add or update the mcpServers section:
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": ["-y", "ios-simulator-mcp"]
}
}
}
If you prefer pnpm, use its dlx runner:
{
"mcpServers": {
"ios-simulator": {
"command": "pnpm",
"args": ["dlx", "ios-simulator-mcp"]
}
}
}
Make sure the JSON structure is valid, especially when mcpServers already exists. Restart Cursor for the changes to take effect.
Option 2: Local development
- Clone the repository:
git clone https://github.com/joshuayoes/ios-simulator-mcp
cd ios-simulator-mcp
- Install dependencies (npm by default, pnpm is also supported):
npm install
# 或使用 pnpm(从提交的 pnpm-lock.yaml 安装):
pnpm install
- Build the project:
npm run build
# 或:pnpm run build
- Edit the Cursor MCP configuration file to point to the local build:
{
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["/full/path/to/your/ios-simulator-mcp/build/index.js"]
}
}
}
Important: Replace /full/path/to/your/ with the absolute path to the cloned ios-simulator-mcp repository.
Integration with Claude Code
The Claude Code CLI can manage MCP servers through the claude mcp command or by directly editing the configuration file.
Option 1: Use npx
claude mcp add ios-simulator npx ios-simulator-mcp
# 或使用 pnpm:
claude mcp add ios-simulator -- pnpm dlx ios-simulator-mcp
If necessary, restart the running Claude Code session.
Option 2: Local development
- Clone the repository, install dependencies, and build the project (same as Cursor local development steps 1-3).
- Add the server, pointing to the local build:
claude mcp add ios-simulator -- node "/full/path/to/your/ios-simulator-mcp/build/index.js"
Important: Replace /full/path/to/your/ with the absolute path to the cloned ios-simulator-mcp repository.
Environment Variables
The material mentions the environment variable IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR, which can override the default output directory (default ~/Downloads), as well as SIMCTL_CHILD_ for passing environment variables. Other environment variables are not yet provided.
Applicable Scenarios
- QA verification after feature implementation: In MCP client environments such as Cursor's agent mode, instruct the AI assistant to use the available tools to quickly verify and record UI interactions.
- Example prompts:
- Verify UI elements: Verify all accessibility elements on the current screen.
- Confirm text input: Enter "QA Test" in the text input field and confirm the input is correct.
- Check tap response: Tap coordinates x=250, y=400 and verify the expected element is triggered.
- Verify swipe operation: Swipe from x=150, y=600 to x=150, y=100 and confirm the behavior is correct.
- Detailed element inspection: Describe the UI element at position x=300, y=350, ensuring the label and functionality are correct.
- Show the simulator screen to the AI agent: View the current simulator screen.
- Screenshot: Capture the current simulator screen and save it as my_screenshot.png.
- Record video: Start recording a video of the simulator screen (saved to the default output directory unless overridden by IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR).
- Stop recording: Stop the current simulator screen recording.
- Install app: Install the app at path path/to/MyApp.app on the simulator.
- Launch app: Launch the Safari app (com.apple.mobilesafari) on the simulator.
- Deep link directly to a screen: When the app has registered a URL scheme or universal link, using uri-scheme to open a deep link can jump to the target screen more quickly, reducing the agent's tap and swipe iterations. This targets the currently booted simulator and is equivalent at the underlying level to the corresponding command. It applies to custom schemes (myapp://...) and Web URLs (https://...,如果应用配置了通用链接则会触发)。示例提示:深链到被测屏幕,然后使用 UI tools (ui_describe_all, ui_tap, ui_view, etc.) for verification.
Limitations
- Only macOS is supported, because the iOS Simulator is only available on macOS.
- Requires Node.js 20 or later.
- Requires Xcode and the iOS Simulator to be installed.
- Requires the Facebook IDB tool.
- Security note: Versions below 1.3.3 have a command injection vulnerability, which has been fixed. Please update to v1.3.3 or later. See SECURITY.md for details.
- Other limitations are not yet provided.