iOS Simulator MCP server

Enables Claude to control iOS simulators for testing and debugging applications by providing tools for UI interaction, element inspection, and device information retrieval through Facebook's IDB tool.
Back to servers
Setup instructions
Provider
Joshua Yoes
Release date
Mar 20, 2025
Language
TypeScript
Package
Stats
13.5K downloads
984 stars

The iOS Simulator MCP Server provides a way to interact with iOS simulators through the Model Context Protocol. It enables you to gather simulator information, control UI interactions, take screenshots, record videos, and inspect UI elements programmatically.

Installation Requirements

Before installing the iOS Simulator MCP server, ensure you have:

  • Node.js
  • macOS (iOS simulators only run on macOS)
  • Xcode with iOS simulators installed
  • Facebook IDB tool (see the installation guide)

Setting Up the MCP Server

Installation with Cursor

Option 1: Using NPX (Recommended)

  1. Edit your Cursor MCP configuration file:

    open ~/.cursor/mcp.json
    
  2. Add or update the mcpServers section:

    {
      "mcpServers": {
        "ios-simulator": {
          "command": "npx",
          "args": ["-y", "ios-simulator-mcp"]
        }
      }
    }
    
  3. Restart Cursor for the changes to take effect.

Option 2: Local Development

  1. Clone the 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 and add:

    {
      "mcpServers": {
        "ios-simulator": {
          "command": "node",
          "args": ["/full/path/to/your/ios-simulator-mcp/build/index.js"]
        }
      }
    }
    
  5. Restart Cursor.

Installation with Claude Code

Option 1: Using NPX (Recommended)

claude mcp add ios-simulator npx ios-simulator-mcp

Option 2: Local Development

  1. Clone and build the repository as described above.
  2. Add the server:
    claude mcp add ios-simulator --command node --args "/full/path/to/your/ios-simulator-mcp/build/index.js"
    

Environment Configuration

You can configure the server using these environment variables:

Variable Description Example
IOS_SIMULATOR_MCP_FILTERED_TOOLS Tools to exclude screenshot,record_video,stop_recording
IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR Default directory for output files ~/Code/awesome-project/tmp

Example configuration in your MCP settings:

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

Available Tools

Getting Simulator Information

Get Booted Simulator ID

// No parameters required

UI Interaction Tools

Describe All UI Elements

{
  // Optional: Simulator UDID (can be set with IDB_UDID env var)
  udid?: string; // Format: UUID (8-4-4-4-12 hexadecimal)
}

Tap on Screen

{
  // Optional: Press duration in seconds
  duration?: string;
  // Optional: Simulator UDID
  udid?: string;
  // Required: Screen coordinates
  x: number;
  y: number;
}

Type Text

{
  // Optional: Simulator UDID
  udid?: string;
  // Required: Text to input (ASCII only)
  text: string;
}

Swipe on Screen

{
  // Optional: Simulator UDID
  udid?: string;
  // Required: Starting coordinates
  x_start: number;
  y_start: number;
  // Required: Ending coordinates
  x_end: number;
  y_end: number;
  // Optional: Step size (default: 1)
  delta?: number;
}

Describe UI Element at Point

{
  // Optional: Simulator UDID
  udid?: string;
  // Required: Screen coordinates
  x: number;
  y: number;
}

Capture Tools

View Current Screen

{
  // Optional: Simulator UDID
  udid?: string;
}

Take Screenshot

{
  // Optional: Simulator UDID
  udid?: string;
  // Required: Output file path
  output_path: string;
  // Optional: Image format (default: png)
  type?: "png" | "tiff" | "bmp" | "gif" | "jpeg";
  // Optional: Display to capture
  display?: "internal" | "external";
  // Optional: Mask handling policy
  mask?: "ignored" | "alpha" | "black";
}

Record Video

{
  // Optional: Output file path
  output_path?: string;
  // Optional: Video codec (default: hevc)
  codec?: "h264" | "hevc";
  // Optional: Display to capture
  display?: "internal" | "external";
  // Optional: Mask handling policy
  mask?: "ignored" | "alpha" | "black";
  // Optional: Force overwrite existing file
  force?: boolean;
}

Stop Recording

// No parameters required

Example Usage

Here are some example prompts you can use with AI assistants that support this MCP server:

Verify UI Elements

Verify all accessibility elements on the current screen

Input Text

Enter "QA Test" into the text input field and confirm the input is correct

Tap Interaction

Tap on coordinates x=250, y=400 and verify the expected element is triggered

Swipe Action

Swipe from x=150, y=600 to x=150, y=100 and confirm correct behavior

Inspect UI Element

Describe the UI element at position x=300, y=350 to ensure proper labeling and functionality

Capture Screen

View the current simulator screen

Take Screenshot

Take a screenshot of the current simulator screen and save it to my_screenshot.png

Record Screen

Start recording a video of the simulator screen

Stop Recording

Stop the current simulator screen recording

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "ios-simulator" '{"command":"npx","args":["-y","ios-simulator-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "ios-simulator": {
            "command": "npx",
            "args": [
                "-y",
                "ios-simulator-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "ios-simulator": {
            "command": "npx",
            "args": [
                "-y",
                "ios-simulator-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later