iOS Simulator MCP
An MCP server that lets AI agents control, inspect, and test iOS simulators on macOS.
Simulator management: get the booted simulator's ID, open the Simulator app, list installed apps.
UI inspection: describe the full accessibility tree, find elements by label/ID with filters, describe the element at a point, and grab a compressed screen view.
UI interaction: tap, type text (US keyboard or paste for other layouts/non-ASCII), and swipe at coordinates.
Screenshots & recording: save screenshots in multiple formats, record video, and stop recording.
App lifecycle: install
.app/.ipabundles, launch apps (with env vars and optional termination), terminate running apps.Deep links: open URLs and custom schemes to jump straight to a screen for testing.
Integrates with Facebook's IDB tool to communicate with and control iOS simulators, enabling the MCP server to perform UI automation tasks.
Provides tools for interacting with iOS simulators, including getting simulator information, controlling UI interactions (tapping, swiping, text input), and inspecting UI elements for accessibility testing and automation.
Enables operation on macOS systems where iOS simulators run, providing simulator access and control capabilities specific to the macOS environment.
Utilizes Xcode's iOS simulator infrastructure to enable UI automation, testing, and interaction with simulated iOS devices.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iOS Simulator MCP tap the login button at coordinates 200, 400"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
iOS Simulator MCP Server
A Model Context Protocol (MCP) server for interacting with iOS simulators. This server allows you to interact with iOS simulators by getting information about them, controlling UI interactions, and inspecting UI elements.
Security Notice: Command injection vulnerabilities present in versions < 1.3.3 have been fixed. Please update to v1.3.3 or later. See SECURITY.md for details.
https://github.com/user-attachments/assets/a88e449c-8f1d-46a5-9816-0f97e071c460
🌟 Featured In
This project has been featured and mentioned in various publications and resources:
Claude Code Best Practices article - Anthropic's engineering blog showcasing best practices
React Native Newsletter Issue 187 - Featured in the most popular React Native community newsletter
Mobile Automation Newsletter - #56 - Featured a long running newsletter about mobile testing and automation resources
punkeye/awesome-mcp-server listing - Listed in one of the most popular curated awesome MCP servers collection
Related MCP server: iOS Device Control MCP Server
Tools
get_booted_sim_id
Description: Get the ID of the currently booted iOS simulator
Parameters: No Parameters
open_simulator
Description: Opens the iOS Simulator application
Parameters: No Parameters
ui_describe_all
Description: Describes accessibility information for the entire screen in the iOS Simulator
Parameters:
{
/**
* 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
Description: Tap on the screen in the iOS Simulator
Parameters:
{
/**
* 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
Description: Input text into the iOS Simulator
Parameters:
{
/**
* 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: up to 500 characters; ASCII printable characters only (method "type")
*/
text: string;
/**
* "type" (default) or "paste"
*/
method?: "type" | "paste";
/**
* Method "paste" only: clear the focused field first (default false)
*/
replace?: boolean;
}method: "type" (the default) presses keys as on a US keyboard, so on other layouts such as French AZERTY it types the wrong characters (mobiletest@example.com becomes ,obiletest2exq,ple:co,). Use method: "paste" for non-US keyboard layouts or non-ASCII text; it takes a few seconds per call instead of about 230 ms: about 2 s (about 5 s with replace: true) when iOS doesn't ask to allow pasting, and up to about 11 s when it does (seen on iOS 26.5 and 27). Tap the text field first: the text is pasted into the focused field through the simulator pasteboard, iOS's "Allow Paste" prompt is tapped for you, and the field is read back to confirm (for secure fields, only the length). Some simulator runtimes (seen on iOS 27.2) cannot show that prompt, so Cmd+V pastes nothing; the text is then pasted with the Paste item of the field's edit menu, which takes about 8 to 13 s per call (longer when it fails) and, where the Menu key opens no edit menu (web fields), taps the end of the field's first line, with a warning when the text then did not land at the end. The previous pasteboard text is restored afterwards (non-text content such as an image is not), unless the prompt is still on screen when the call gives up; then the text stays on the pasteboard and the error tells you to tap the allow button instead of retrying. replace: true clears the field first (e.g. after "type" produced wrong characters). Paste mode rejects empty text and newlines. It needs fb-idb 1.5.1+ and a recent idb_companion (1.1.8 lacks --api axbridge, so every paste fails with "No focused text field found"; brew upgrade idb-companion, then idb kill).
ui_swipe
Description: Swipe on the screen in the iOS Simulator
Parameters:
{
/**
* 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
Description: Returns the accessibility element at given co-ordinates on the iOS Simulator's screen
Parameters:
{
/**
* 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
Description: Searches the accessibility tree and returns elements matching the given criteria
Parameters:
{
/** 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
Description: Get the image content of a compressed screenshot of the current simulator view
Parameters:
{
/**
* 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
Description: Takes a screenshot of the iOS Simulator
Parameters:
{
/**
* 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
Description: Records a video of the iOS Simulator using simctl directly
Parameters:
{
/**
* 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
Description: Stops the simulator video recording using killall
Parameters: No Parameters
install_app
Description: Installs an app bundle (.app or .ipa) on the iOS Simulator
Parameters:
{
/**
* 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
Description: Launches an app on the iOS Simulator by bundle identifier
Parameters:
{
/**
* 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>;
}Notes: Environment variables are passed using SIMCTL_CHILD_ because simctl launch does not support --env/--envs on all Xcode versions.
Example:
{
"bundle_id": "com.example.app",
"terminate_running": true,
"env": {
"FOO": "bar",
"BAZ": "qux"
}
}terminate_app
Description: Terminates a running app on the iOS Simulator by bundle identifier. Useful for testing cold-start flows and verifying crash recovery without reinstalling the app.
Parameters:
{
/**
* 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 terminate (e.g., com.apple.mobilesafari) */
bundle_id: string;
}open_url
Description: Opens 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.
Parameters:
{
/**
* 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 URL or deep link to open (e.g., https://example.com or myapp://screen/detail) */
url: string;
}list_apps
Description: Lists all installed apps on the iOS Simulator with their bundle identifiers and display names, sorted alphabetically. Removes the need to look up bundle IDs manually before calling launch_app or terminate_app.
Parameters:
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
}💡 Use Case: QA Step via MCP Tool Calls
This MCP server allows AI assistants integrated with a Model Context Protocol (MCP) client to perform Quality Assurance tasks by making tool calls. This is useful immediately after implementing features to help ensure UI consistency and correct behavior.
How to Use
After a feature implementation, instruct your AI assistant within its MCP client environment to use the available tools. For example, in Cursor's agent mode, you could use the prompts below to quickly validate and document UI interactions.
Example Prompts
Verify UI Elements:
Verify all accessibility elements on the current screenConfirm Text Input:
Enter "QA Test" into the text input field and confirm the input is correctCheck Tap Response:
Tap on coordinates x=250, y=400 and verify the expected element is triggeredValidate Swipe Action:
Swipe from x=150, y=600 to x=150, y=100 and confirm correct behaviorDetailed Element Check:
Describe the UI element at position x=300, y=350 to ensure proper labeling and functionalityShow Your AI Agent the Simulator Screen:
View the current simulator screenTake Screenshot:
Take a screenshot of the current simulator screen and save it to my_screenshot.pngRecord Video:
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 Recording:
Stop the current simulator screen recordingInstall App:
Install the app at path/to/MyApp.app on the simulatorLaunch App:
Launch the Safari app (com.apple.mobilesafari) on the simulator
🧠Tip: Deep Link Straight to a Screen
Agents can waste a lot of iterations tapping and swiping their way to a deeply nested route. When your app registers a URL scheme (or Universal Link), it's usually faster to jump directly to the target screen instead of navigating there step by step.
You can open a deep link with uri-scheme:
npx uri-scheme open "myapp://products/42" --iosThis targets the currently booted simulator. Under the hood it's equivalent to:
xcrun simctl openurl booted "myapp://products/42"Both work for custom schemes (myapp://...) and web URLs (https://..., which
trigger Universal Links if your app is configured for them).
Example prompt:
Open the deep link myapp://products/42 in the simulator, then verify the product
details screen is shownUse this to shorten agent loops: deep link to the screen under test, then use the
UI tools (ui_describe_all, ui_tap, ui_view, …) to validate it.
Prerequisites
Node.js 20 or later
macOS (as iOS simulators are only available on macOS)
Xcode and iOS simulators installed
Facebook IDB tool: the
idb_companionbinary plus thefb-idbPython client. See TROUBLESHOOTING.md for install steps, andui_typefor the versionsmethod: "paste"needs
Installation
This section provides instructions for integrating the iOS Simulator MCP server with different Model Context Protocol (MCP) clients.
Installation with Cursor
Cursor manages MCP servers through its configuration file located at ~/.cursor/mcp.json.
Option 1: Using NPX (Recommended)
Edit your Cursor MCP configuration file. You can often open it directly from Cursor or use a command like:
# Open with your default editor (or use 'code', 'vim', etc.) open ~/.cursor/mcp.json # Or use Cursor's command if available # cursor ~/.cursor/mcp.jsonAdd or update the
mcpServerssection with the iOS simulator server configuration:{ "mcpServers": { // ... other servers might be listed here ... "ios-simulator": { "command": "npx", "args": ["-y", "ios-simulator-mcp"] } } }Ensure the JSON structure is valid, especially if
mcpServersalready exists.If you prefer pnpm, use its
dlxrunner instead:{ "mcpServers": { "ios-simulator": { "command": "pnpm", "args": ["dlx", "ios-simulator-mcp"] } } }Restart Cursor for the changes to take effect.
Option 2: Local Development
Clone this repository:
git clone https://github.com/joshuayoes/ios-simulator-mcp cd ios-simulator-mcpInstall dependencies (npm is the default; pnpm is also supported):
npm install # or, using pnpm (installs from the committed pnpm-lock.yaml): pnpm installBuild the project:
npm run build # or: pnpm run buildEdit your Cursor MCP configuration file (as shown in Option 1).
Add or update the
mcpServerssection, pointing to your local build:{ "mcpServers": { // ... other servers might be listed here ... "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 where you cloned theios-simulator-mcprepository.Restart Cursor for the changes to take effect.
Installation with Claude Code
Claude Code CLI can manage MCP servers using the claude mcp commands or by editing its configuration files directly. For more details on Claude Code MCP configuration, refer to the official documentation.
Option 1: Using NPX (Recommended)
Add the server using the
claude mcp addcommand:claude mcp add ios-simulator npx ios-simulator-mcp # or, with pnpm: claude mcp add ios-simulator -- pnpm dlx ios-simulator-mcpRestart any running Claude Code sessions if necessary.
Option 2: Local Development
Clone this repository, install dependencies, and build the project as described in the Cursor "Local Development" steps 1-3.
Add the server using the
claude mcp addcommand, pointing to your 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 where you cloned theios-simulator-mcprepository.Restart any running Claude Code sessions if necessary.
Configuration
Environment Variables
Variable | Description | Example |
| A comma-separated list of tool names to filter out from being registered. |
|
| Specifies a default directory for output files like screenshots and video recordings. If not set, |
|
| Specifies a custom path to the IDB executable. If not set, |
|
Configuration Example
{
"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 Registry Server Listings
License
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 agent control real iPhones: screenshots, tap, swipe, type and open apps.
Launch and verify high-fidelity mobile simulations from an AI agent.
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