SuperAPIAI Directory

mcp-server-simulator-ios-idb

github.com · AI coding

Interact with iOS simulators (iPhone, iPad and more) through natural language commands.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsiOS · macOS · Linux

About this tool

Purpose

mcp-server-simulator-ios-idb is a Model Context Protocol (MCP) server designed to let large language models (LLMs) directly control iOS simulators (iPhone, iPad, etc.) through natural language commands. It acts as a bridge between the LLM and the iOS simulator, parsing natural language instructions into structured operations and executing them.

Main Capabilities

The server provides the following capability groups:

  • Simulator control: Create and manage simulator sessions, start and shut down simulators, monitor simulator status, list available and running simulators, focus the simulator window.
  • App management: Install and manage iOS apps, launch, terminate, and uninstall apps, monitor app status and verify installation, handle app permissions and configuration.
  • UI interaction and testing: Interact with the simulator UI, perform tap, swipe, and button press operations, input text and key sequences, access accessibility elements for UI testing, record videos of UI interactions.
  • Development and debugging: Capture screenshots and system logs, debug apps in real time, monitor and analyze crash logs, install dynamic libraries and manage app data.
  • Advanced features: Location simulation, media injection, URL scheme handling, contacts database management, Keychain operations.

Its natural language parser (NLParser) supports multiple categories of instructions covering simulator management, app management, UI interaction, accessibility, screenshots and logs, and other additional commands. The interface supports all commands in the idb CLI tool, providing a comprehensive set of operations for iOS simulator automation.

Usage

The server can be used through direct MCP integration or as a standalone library.

Installation prerequisites:

  • macOS: Required to support iOS simulators
  • Node.js: v20.0.0 or higher
  • Homebrew: Required to install dependencies
  • XCode: iOS simulator must be installed

Installation method: The simplest way is to install via Cline, which automatically handles dependency management and configuration. Manual installation is also possible. The installation process automatically: checks whether it is running on macOS, installs idb-companion via Homebrew, installs fb-idb via pip in a virtual environment.

Note: The virtual environment must remain activated while using the server. If you close the terminal and come back later, you need to run source venv/bin/activate first to reactivate the virtual environment, and only then can you run npm start.

MCP integration: Add the server to Claude Desktop's MCP settings, after which the LLM can control the iOS simulator using natural language commands.

Using as a library: This package can also be used as a library in your own projects. However, be aware of import side effects: importing the package's entry point (mcp-server-simulator-ios-idb / dist/index.js) will run server startup code at module load time—it overrides console output, creates a logs/ directory, registers SIGINT/SIGTERM/exception handlers, and unconditionally starts the MCP stdio server, with currently no option to exit. This applies to any import of the package root, and named imports cannot exit the bootstrap process either. To use the parser/orchestrator/manager without the transport and signal side effects, import the compiled component modules via deep paths (dist/...); note that importing dist/mcp/mcp-server.js will also bootstrap the MCP server singleton, so avoid that path when using as a library. The package only declares main (no exports map), so deep paths resolve normally.

Architecture

The server consists of three main components:

  • IDBManager: the low-level component that interacts directly with the iOS simulator via idb.
  • NLParser: the component that interprets natural language instructions and converts them into structured commands.
  • MCPOrchestrator: the central component that coordinates the interaction between the parser and IDBManager.

These components are connected through adapters: ParserToOrchestrator converts parser results into orchestrator commands; OrchestratorToIDB converts orchestrator commands into IDBManager calls. The complete execution flow (MCP stdio → orchestrator → parser/registry → adapters → IDBManager → idb / xcrun simctl), component contracts, session model (activeSessionId and sessionId → UDID), and the checklist for adding new commands are documented in ARCHITECTURE.md. Guidelines for agents and contributors to this repository are in AGENTS.md.

Use cases

Suitable fordevelopers who need to drive iOS simulator automation through natural language or an LLM, for example: UI automation testing, app debugging, screenshot and log collection, simulating location or injecting media, managing app and simulator state, etc. Suitable for iOS development and testing workflows in a macOS environment.

Limitations

  • Platform limitation: only macOS is supported, and Xcode and the iOS simulator must be installed.
  • Environment dependencies: requires Node.js v20.0.0 or higher, and Homebrew.
  • Library imports have side effects: importing the package entry point unconditionally starts the MCP stdio server and registers signal handlers, and this bootstrap behavior currently cannot be exited.
  • To use as a library, component modules must be imported via deep paths to avoid side effects, but some paths (such as dist/mcp/mcp-server.js) will still bootstrap the singleton.

This project is based on facebook/idb to provide low-level iOS simulator control capabilities, and is open-sourced under the Apache-2.0 license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools