iOS Simulator MCP Server

iOS Simulator MCP Server

A Model Context Protocol server for controlling and automating iOS simulators.

1,231
Stars
57
Forks
1,231
Watchers
11
Issues
Provides a Model Context Protocol (MCP) server that enables interactions with iOS simulators. Allows users to obtain simulator information, automate UI interactions such as tapping, typing, swiping, and retrieve accessibility data. Designed for robust integration with automation, testing, and developer workflows via standardized MCP commands.

Key Features

Get the ID of the currently booted iOS simulator
Open the iOS Simulator application via command
Retrieve screen-wide accessibility information
Automate UI taps with configurable coordinates and duration
Input text into the simulator programmatically
Perform swipe gestures with custom coordinates and duration
Inspect accessibility elements at specific screen points
Standardized MCP-based command interface
Supports parameterization with simulator UDID
Secure implementation with fixed security vulnerabilities

Use Cases

Automated UI testing of iOS applications
Accessibility validation and inspection in simulated environments
Continuous integration workflows utilizing iOS simulators
Remote control and scripting of simulator actions
Rapid iteration for mobile app development and prototyping
Integration with AI agents for operational model context
Batch execution of simulator commands in developer tooling
Automated input and event generation for demo scenarios
Gathering structured simulator state and accessibility data
Simulating complex user interactions for debugging and QA

README

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:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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_view

Description: Get the image content of a compressed screenshot of the current simulator view

Parameters:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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:

typescript
{
  /** 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:

typescript
{
  /**
   * 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:

typescript
{
  /**
   * 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;
}

💡 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 screen
    
  • Confirm Text Input:

    Enter "QA Test" into the text input field and confirm the input is correct
    
  • Check Tap Response:

    Tap on coordinates x=250, y=400 and verify the expected element is triggered
    
  • Validate Swipe Action:

    Swipe from x=150, y=600 to x=150, y=100 and confirm correct behavior
    
  • Detailed Element Check:

    Describe the UI element at position x=300, y=350 to ensure proper labeling and functionality
    
  • Show Your AI Agent the Simulator Screen:

    View the current simulator screen
    
  • Take Screenshot:

    Take a screenshot of the current simulator screen and save it to my_screenshot.png
    
  • Record 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 recording
    
  • Install App:

    Install the app at path/to/MyApp.app on the simulator
    
  • Launch App:

    Launch the Safari app (com.apple.mobilesafari) on the simulator
    

Prerequisites

  • Node.js
  • macOS (as iOS simulators are only available on macOS)
  • Xcode and iOS simulators installed
  • Facebook IDB tool (see install guide)

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)

  1. Edit your Cursor MCP configuration file. You can often open it directly from Cursor or use a command like:
    bash
    # Open with your default editor (or use 'code', 'vim', etc.)
    open ~/.cursor/mcp.json
    # Or use Cursor's command if available
    # cursor ~/.cursor/mcp.json
    
  2. Add or update the mcpServers section with the iOS simulator server configuration:
    json
    {
      "mcpServers": {
        // ... other servers might be listed here ...
        "ios-simulator": {
          "command": "npx",
          "args": ["-y", "ios-simulator-mcp"]
        }
      }
    }
    
    Ensure the JSON structure is valid, especially if mcpServers already exists.
  3. Restart Cursor for the changes to take effect.

Option 2: Local Development

  1. Clone this repository:
    bash
    git clone https://github.com/joshuayoes/ios-simulator-mcp
    cd ios-simulator-mcp
    
  2. Install dependencies:
    bash
    npm install
    
  3. Build the project:
    bash
    npm run build
    
  4. Edit your Cursor MCP configuration file (as shown in Option 1).
  5. Add or update the mcpServers section, pointing to your local build:
    json
    {
      "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 the ios-simulator-mcp repository.
  6. 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)

  1. Add the server using the claude mcp add command:
    bash
    claude mcp add ios-simulator npx ios-simulator-mcp
    
  2. Restart any running Claude Code sessions if necessary.

Option 2: Local Development

  1. Clone this repository, install dependencies, and build the project as described in the Cursor "Local Development" steps 1-3.
  2. Add the server using the claude mcp add command, pointing to your local build:
    bash
    claude mcp add 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 the ios-simulator-mcp repository.
  3. Restart any running Claude Code sessions if necessary.

Configuration

Environment Variables

Variable Description Example
IOS_SIMULATOR_MCP_FILTERED_TOOLS A comma-separated list of tool names to filter out from being registered. screenshot,record_video,stop_recording
IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR Specifies a default directory for output files like screenshots and video recordings. If not set, ~/Downloads will be used. This can be handy if your agent has limited access to the file system. ~/Code/awesome-project/tmp
IOS_SIMULATOR_MCP_IDB_PATH Specifies a custom path to the IDB executable. If not set, idb will be used (assuming it's in your PATH). Useful if IDB is installed in a non-standard location. ~/bin/idb or /usr/local/bin/idb

Configuration Example

json
{
  "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

MseeP.ai Security Assessment Badge

License

MIT

Star History

Star History Chart

Repository Owner

joshuayoes
joshuayoes

User

Repository Details

Language JavaScript
Default Branch main
Size 113 KB
Contributors 8
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

JavaScript
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • iOS Simulator MCP Server

    iOS Simulator MCP Server

    Programmatic control of iOS simulators via the Model Context Protocol

    iOS Simulator MCP Server implements the Model Context Protocol (MCP) to provide a standardized interface for managing iOS simulators. It enables users to list simulators, boot or shut them down, install application bundles, and launch apps by bundle ID. By conforming to the MCP specification, it allows seamless integration with tools that require structured simulator management.

    • 46
    • MCP
    • JoshuaRileyDev/simulator-mcp-server
  • Mobile MCP

    Mobile MCP

    Platform-agnostic server for scalable mobile automation and development.

    Mobile MCP is a Model Context Protocol (MCP) server that enables scalable automation and interaction with native iOS and Android devices through a unified, platform-independent API. Designed to power agents and LLMs, it supports both simulator/emulator and real device environments, allowing access via structured accessibility snapshots or coordinate-based actions. The server facilitates multi-step user journeys, data extraction, and agent-based frameworks without requiring device-specific expertise.

    • 2,436
    • MCP
    • mobile-next/mobile-mcp
  • Xcode MCP Server

    Xcode MCP Server

    Comprehensive Xcode integration server for AI assistants using the Model Context Protocol.

    Xcode MCP Server provides an MCP-compliant interface for AI agents to interact with Xcode projects on macOS. It supports project management, simulator control, CocoaPods and Swift Package Manager integration, and advanced file and build operations. Enhanced error handling and multi-project support enable seamless automation and context management for complex Xcode workflows.

    • 330
    • MCP
    • r-huijts/xcode-mcp-server
  • AutoMobile

    AutoMobile

    Powerful tools for mobile automation, test authoring, and device management via MCP.

    AutoMobile provides a comprehensive set of tools for mobile automation, focusing on UI testing and development workflow automation. It operates as an MCP Server, enabling a robust interaction loop for model-driven actions and observations. The solution supports Android platforms with features like automated test authoring, multi-device management, and seamless CI test execution. AutoMobile also offers source mapping and deep view hierarchy analysis to enhance code rendering accuracy.

    • 63
    • MCP
    • zillow/auto-mobile
  • mcpxcodebuild

    mcpxcodebuild

    Build and test iOS Xcode projects via the Model Context Protocol server.

    mcpxcodebuild is a Model Context Protocol server that enables building and testing iOS Xcode workspace and project files. It facilitates seamless integration with Visual Studio Code extensions such as Cline or Roo Code, allowing remote build and test operations via standardized MCP tools. The tool can be installed using pip or uv and is easily configurable for use with platforms like Claude.app.

    • 76
    • MCP
    • ShenghaiWang/xcodebuild
  • Mac Apps Launcher MCP Server

    Mac Apps Launcher MCP Server

    Launch and manage macOS applications via an MCP server.

    Mac Apps Launcher MCP Server enables the listing, launching, and management of macOS applications through the Model Context Protocol. Designed to integrate with systems supporting MCP, it provides standardized methods to enumerate app folders, launch apps by name, and open files with specified applications. Configuration details are provided for integration with Claude Config JSON.

    • 16
    • MCP
    • JoshuaRileyDev/mac-apps-launcher
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results