← MCP server and skill grades

ios-simulator-mcp

joshuayoes/ios-simulator-mcp

B
Type
MCP server
Scanned
Nov 12, 2026
Version
4c1d8db0f0c9
Files read
17

This MCP server lets an AI coding agent inspect and control iOS Simulators on macOS, including reading screen elements, tapping, typing, capturing screenshots and videos, opening links, and installing or launching apps. Because iOS Simulator processes share the Mac's file system and run unsandboxed as the logged-in user, a prompt-injected agent could abuse unrestricted app launch environment variables, file:// URLs, or arbitrary screenshot paths to load native code, view local files, or clobber files on the Mac.

What it can reach

System
Controls booted iOS Simulators on the Mac: reads on-screen text and screenshots, taps, swipes, types or pastes via the simulator clipboard, opens Simulator.app, installs and launches simulator apps (which run directly as the Mac user), and stops video recordings.
Files
Reads .app or .ipa bundles passed to install_app, creates temporary screenshot files in the system temp folder, and writes screenshots and video recordings to ~/Downloads, IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR, or any file path given to screenshot or record_video.
Network
Opens web URLs and deep links inside the simulator via open_url and MobileSafari, using the Mac's network connection including localhost.
Shell commands
Runs Xcode, IDB, and macOS command-line utilities (xcrun, idb, open, sips, pkill, plutil) directly with shell execution disabled.

Findings

2 medium1 low
  1. Mediumopen_url accepts file:// URLs that expose local Mac files inside the simulator

    src/index.ts:331

    The open_url tool is intended for web links and app deep links, but it only checks the length of url and does not block the file: scheme. Because the iOS Simulator shares the host Mac's file system rather than running in an isolated virtual machine, a prompt-injected agent could open a local file (such as a .txt, .json, or .html file on the Mac) via a file:// URL, read its rendered contents with ui_describe_all or ui_view, and send the data out through another open_url call.

    Fix: Inspect the URL scheme before invoking simctl openurl and reject file:, javascript:, and data: URLs.

  2. Mediumscreenshot and record_video can overwrite arbitrary files on the Mac

    src/index.ts:1487

    Both screenshot and record_video resolve output_path through ensureAbsolutePath, which accepts any absolute path, home-relative ~/ path, or ../ directory traversal, without checking the file extension. In addition, xcrun simctl io screenshot silently truncates and overwrites existing files (and record_video does the same when force is true), so a prompt-injected agent could corrupt or destroy user files such as ~/.zshrc or project files outside the default output folder.

    Fix: Restrict output paths so resolved paths stay within the configured output directory, enforce valid image or video file extensions, and check that the target file does not already exist in screenshot.

  3. LowUnrestricted launch_app environment variables allow dylib injection and container redirection

    src/index.ts:47

    The launch_app tool forwards every key in its env parameter as SIMCTL_CHILD_<key> without filtering dangerous runtime or dynamic-linker variables. Because iOS Simulator apps run unsandboxed as the current macOS user, a prompt-injected agent could pass DYLD_INSERT_LIBRARIES (to load a local .dylib into a built-in system app and execute native code on the Mac, even when install_app is disabled via IOS_SIMULATOR_MCP_FILTERED_TOOLS) or CFFIXED_USER_HOME (to redirect a simulator app's home directory to real folders on the Mac).

    Fix: Validate environment variable keys against an identifier pattern and block dangerous runtime variables such as DYLD_*, CFFIXED_USER_HOME, CFNETWORK_DIAGNOSTICS, and SSLKEYLOGFILE.