Labsco
joshuayoes logo

iOS Simulator MCP Server

โ˜… 2,100

from joshuayoes

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.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

iOS Simulator MCP Server

Install MCP Server NPM Version

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/453ebe7b-cc93-4ac2-b08d-0f8ac8339ad3

๐ŸŒŸ Featured In

This project has been featured and mentioned in various publications and resources:

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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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: ASCII printable characters only
   */
  text: string;
}

ui_swipe

Description: Swipe on the screen in the iOS Simulator

Parameters:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /** 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  /**
   * 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:

Copy & paste โ€” that's it
{
  "bundle_id": "com.example.app",
  "terminate_running": true,
  "env": {
    "FOO": "bar",
    "BAZ": "qux"
  }
}

๐Ÿ’ก 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:

    Copy & paste โ€” that's it
    Verify all accessibility elements on the current screen
  • Confirm Text Input:

    Copy & paste โ€” that's it
    Enter "QA Test" into the text input field and confirm the input is correct
  • Check Tap Response:

    Copy & paste โ€” that's it
    Tap on coordinates x=250, y=400 and verify the expected element is triggered
  • Validate Swipe Action:

    Copy & paste โ€” that's it
    Swipe from x=150, y=600 to x=150, y=100 and confirm correct behavior
  • Detailed Element Check:

    Copy & paste โ€” that's it
    Describe the UI element at position x=300, y=350 to ensure proper labeling and functionality
  • Show Your AI Agent the Simulator Screen:

    Copy & paste โ€” that's it
    View the current simulator screen
  • Take Screenshot:

    Copy & paste โ€” that's it
    Take a screenshot of the current simulator screen and save it to my_screenshot.png
  • Record Video:

    Copy & paste โ€” that's it
    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:

    Copy & paste โ€” that's it
    Stop the current simulator screen recording
  • Install App:

    Copy & paste โ€” that's it
    Install the app at path/to/MyApp.app on the simulator
  • Launch App:

    Copy & paste โ€” that's it
    Launch the Safari app (com.apple.mobilesafari) on the simulator

MCP Registry Server Listings

<a href="https://glama.ai/mcp/servers/@joshuayoes/ios-simulator-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@joshuayoes/ios-simulator-mcp/badge" alt="iOS Simulator MCP server" /> </a>

MseeP.ai Security Assessment Badge

License

MIT