trackmcp
Back to directory
atom2ueki

mcp-server-ios-simulator

View on GitHub

Model Context Protocol (MCP) implementation for iOS simulators

34 stars TypeScriptAI & Machine Learning Updated Oct 8, 2025

Documentation

๐Ÿ“ฑ MCP Server for iOS Simulator

smithery badge

A server that implements the Model Context Protocol (MCP) for iOS simulators, built on top of appium-ios-simulator and utilizing the MCP TypeScript SDK.

๐Ÿ“‹ Overview

This project provides a bridge between iOS simulators and the Model Context Protocol, allowing for standardized communication with iOS simulator instances. It enables programmatic control of iOS simulators while leveraging the MCP protocol for consistent interfaces across different environments. The server utilizes stdio as its transport mechanism, making it ideal for integration with Claude Desktop and other MCP-compatible clients.

๐ŸŽฌ Demo

iOS Simulator Demo

*Demo showing how to boot an iOS simulator using Claude AI Desktop*

๐Ÿ—๏ธ Architecture

The server consists of three main components:

1. ๐Ÿ”„ Simulator Management Layer - Handles iOS simulator lifecycle and interactions

2. ๐Ÿ”Œ MCP Protocol Implementation - Implements the Model Context Protocol using the TypeScript SDK with stdio transport

3. ๐Ÿ“Š Logger Component - Provides file-based logging without interfering with the stdio transport

code
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MCP Protocol   โ”‚     โ”‚     Stdio       โ”‚     โ”‚    Simulator    โ”‚
โ”‚  Implementation โ”‚โ—„โ”€โ”€โ”€โ”€โ”ค    Transport    โ”‚โ—„โ”€โ”€โ”€โ”€โ”ค   Management    โ”‚
โ”‚                 โ”‚     โ”‚                 โ”‚     โ”‚      Layer      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ–ฒ                                                โ–ฒ
        โ”‚                                                โ”‚
        โ–ผ                                                โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   MCP Client    โ”‚                             โ”‚  iOS Simulator  โ”‚
โ”‚  (e.g. Claude)  โ”‚                             โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Features

  • ๐Ÿš€ Start, stop, and manage iOS simulator instances
  • ๐Ÿ”Œ Boot and shutdown simulators
  • ๐Ÿ“ฒ Install and launch applications on simulators
  • ๐Ÿ“ธ Take screenshots of simulator screens
  • ๐Ÿ‘† Perform taps on coordinates
  • ๐Ÿ”„ Support for multiple concurrent simulator sessions
  • ๐Ÿ“ Comprehensive file-based logging without console output
  • ๐Ÿ›ก๏ธ Error-resilient operation

๐Ÿ“‹ Prerequisites

  • ๐ŸŸข Node.js (v16 or later)
  • ๐ŸŽ macOS (required for iOS simulators)
  • ๐Ÿ› ๏ธ Xcode with iOS simulators installed
  • ๐Ÿ“œ TypeScript 4.5+

๐Ÿ”ง Installation

Installing via Smithery

To install iOS Simulator Control Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @atom2ueki/mcp-server-ios-simulator --client claude

Manual Installation

bash
# Clone the repository
git clone https://github.com/atom2ueki/mcp-server-ios-simulator.git
cd mcp-server-ios-simulator

# Install dependencies
npm install

๐Ÿณ Docker

A Dockerfile is provided so the server can be packaged for the Glama MCP directory and other container hosts.

bash
docker build -t mcp-server-ios-simulator .
docker run --rm -i mcp-server-ios-simulator

> Note: iOS simulators only run on macOS, so a Linux container can host the MCP process and respond on stdio but cannot drive a real simulator. The container is intended for portability checks and remote MCP environments that bridge to a macOS host.

โš™๏ธ Configuration

Configuration is handled through the `src/config.ts` file:

typescript
const config = {
  simulator: {
    defaultDevice: process.env.SIMULATOR_DEFAULT_DEVICE || 'iPhone 16',
    defaultOS: process.env.SIMULATOR_DEFAULT_OS || '18.2',
    timeout: parseInt(process.env.SIMULATOR_TIMEOUT || '30000', 10),
  }
};

You can customize these settings by setting environment variables:

code
SIMULATOR_DEFAULT_DEVICE=iPhone 16
SIMULATOR_DEFAULT_OS=18.2
SIMULATOR_TIMEOUT=30000

๐Ÿš€ Usage

๐Ÿ”จ Building and Starting the Server

bash
# Build the project
npm run build

# Start the server
npm start

๐Ÿงฐ MCP Tools

The server provides two distinct approaches for controlling iOS simulators:

These tools work directly with simulator UDIDs and don't require maintaining sessions:

  • ๐Ÿ“‹ `list-available-simulators` - List all available simulators with their UDIDs
  • โ–ถ๏ธ `boot-simulator-by-udid` - Boot a simulator directly using its UDID
  • โน๏ธ `shutdown-simulator-by-udid` - Shutdown a simulator directly using its UDID
  • ๐Ÿ“Š `list-booted-simulators` - List all currently booted simulators

Use this approach when: You just want to boot, use, and shut down simulators directly.

๐Ÿ“ฑ Session-Based Management (Advanced)

These tools use a session layer that tracks simulators with custom session IDs:

  • ๐Ÿ“‹ `list-simulator-sessions` - List all active simulator sessions
  • โž• `create-simulator-session` - Create a new simulator session
  • โŒ `terminate-simulator-session` - Terminate a session (shuts down simulator and cleans up)
  • ๐Ÿ”„ `create-and-boot-simulator` - Create a new simulator session and boot it
  • โ–ถ๏ธ `boot-simulator` - Boot a simulator for an existing session
  • โน๏ธ `shutdown-simulator` - Shutdown a simulator for an existing session

Use this approach when: You need to track simulator metadata, reference simulators by custom IDs, or use the more advanced management features.

๐Ÿ“ฒ Application Management

  • ๐Ÿ“ฅ `install-app` - Install an application on a simulator
  • ๐Ÿš€ `launch-app` - Launch an application on a simulator
  • ๐Ÿ›‘ `terminate-app` - Terminate a running application on a simulator

๐Ÿ–ฑ๏ธ Interaction Tools

  • ๐Ÿ“ท `take-screenshot` - Take a screenshot of the simulator screen
  • ๐Ÿ‘† `tap-coordinate` - Perform a tap at the specified coordinates

๐Ÿค– Example Usage with Claude Desktop

1. Configure Claude Desktop to use this server as an MCP tool:

    json
    {
         "mcpServers": {
           "simulator": {
             "command": "node",
             "args": [
               "/path/to/your/mcp-server-ios-simulator/dist/index.js"
             ]
           }
         }
       }

      2. Use the provided tools to control iOS simulators directly from Claude Desktop:

      Direct UDID Approach (Recommended):

      1. First, ask Claude to list available simulators:

      code
      "Show me all available iOS simulators"

      2. Then use the UDID to boot a specific simulator:

      code
      "Boot the iOS simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1"

      3. When finished, shut it down using the same UDID:

      code
      "Shut down the simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1"

      The direct UDID approach is simpler and more reliable for most use cases.

      Session-Based Approach (Advanced):

      Only use this approach if you need the advanced features of session tracking:

      code
      "Create a new simulator session for iPhone 16 Pro with iOS 18.2"
         "Boot the simulator for session abc-123"
         "Take a screenshot of the simulator for session abc-123"
         "Terminate the simulator session abc-123"

      ๐Ÿ‘จโ€๐Ÿ’ป Development

      ๐Ÿ“ Project Structure

      code
      src/
      โ”œโ”€โ”€ simulator/       # Simulator management layer
      โ”œโ”€โ”€ mcp/             # MCP protocol implementation
      โ”œโ”€โ”€ bridge/          # Bridge component
      โ”œโ”€โ”€ utils/           # Utility functions including logger
      โ”œโ”€โ”€ config.ts        # Configuration handling
      โ””โ”€โ”€ index.ts         # Entry point

      ๐Ÿ”จ Building the Project

      bash
      # Install development dependencies
      npm install
      
      # Run TypeScript compiler
      npm run build

      ๐Ÿ“œ License

      This project is licensed under the MIT License - see the LICENSE file for details.

      ๐Ÿ™ Acknowledgments

      Frequently asked questions

      What is mcp-server-ios-simulator?

      mcp-server-ios-simulator is Model Context Protocol (MCP) implementation for iOS simulators

      How do I install mcp-server-ios-simulator?

      Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

      Is mcp-server-ios-simulator open source?

      Yes โ€” it is hosted on GitHub at https://github.com/atom2ueki/mcp-server-ios-simulator and has 34 stars.

      Related MCP tools

      Run your own MCP server? See who uses it and what to fix.

      Measure it with TrackMCP