ios-simulator-mcp

MCP.Pizza Chef: joshuayoes

The ios-simulator-mcp is an MCP server designed to interact with iOS simulators by providing real-time access to simulator state and UI controls. It enables querying the currently booted simulator, inspecting accessibility elements, performing UI actions like taps, swipes, and text input, and capturing screenshots. This server facilitates automated testing, UI inspection, and simulator control workflows within MCP-enabled environments, making iOS simulator interaction seamless and programmable.

Use This MCP server To

Retrieve the ID of the currently booted iOS simulator Describe all accessibility elements visible on the simulator screen Perform tap actions on specific screen coordinates Input text into simulator UI fields Swipe between coordinates to simulate gestures Get detailed info about UI elements at given coordinates Capture screenshots of the simulator screen for visual validation Filter and query UI elements by accessibility attributes

README

iOS Simulator 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.

iOS Simulator MCP server
ios-simulator-mcp-1.1.0-demo.mov

Features

  • Get the ID of the currently booted iOS simulator
  • Interact with the simulator UI:
    • Describe all accessibility elements on screen
    • Tap on screen coordinates
    • Input text
    • Swipe between coordinates
    • Get information about UI elements at specific coordinates
    • Take screenshots of the simulator screen
  • Filter specific tools using environment variables

Configuration

Environment Variables

  • IOS_SIMULATOR_MCP_FILTERED_TOOLS: A comma-separated list of tool names to filter out from being registered. For example: screenshot,record_video,stop_recording

💡 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
    
  • 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 ~/Downloads/simulator_recording_$DATE.mp4 by default)
    
  • Stop Recording:

    Stop the current simulator screen recording
    

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:
    # 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:
    {
      "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:
    git clone https://github.com/joshuayoes/ios-simulator-mcp
    cd ios-simulator-mcp
  2. Install dependencies:
    npm install
  3. Build the project:
    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:
    {
      "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:
    claude mcp add ios-simulator --command npx --args "-y,ios-simulator-mcp"
    Note: The --args parameter takes a single comma-separated string.
  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:
    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.

License

MIT

ios-simulator-mcp FAQ

How do I connect the ios-simulator-mcp server to my MCP client?
You connect by configuring your MCP client to communicate with the ios-simulator-mcp server endpoint, enabling real-time simulator control and data retrieval.
Can ios-simulator-mcp simulate complex gestures like swipes?
Yes, it supports swipe gestures between specified screen coordinates to simulate user interactions.
Does ios-simulator-mcp provide accessibility information?
Yes, it can describe all accessibility elements currently visible on the simulator screen for inspection and testing.
Can I capture screenshots of the iOS simulator using this server?
Yes, the server supports taking screenshots of the simulator screen for visual verification or documentation.
Is it possible to input text into the simulator UI via ios-simulator-mcp?
Yes, you can programmatically input text into UI fields on the simulator through this server.
What platforms or environments is ios-simulator-mcp compatible with?
It is designed to work with iOS simulators typically running on macOS environments where the simulator is available.
How secure is the communication between the MCP client and ios-simulator-mcp?
Communication security depends on your MCP client-server setup, but MCP protocol supports secure, scoped interactions to protect data and control.
Can ios-simulator-mcp be used for automated UI testing?
Yes, it is well-suited for automated UI testing by enabling scripted interactions and state inspections of the iOS simulator.