IO

iOS Simulator MCP Server for Natural Language LLMs

Control iOS simulators with an MCP server that lets LLMs issue natural language commands to iPhone and iPad simulators.

Quick Install
npx -y @InditexTech/mcp-server-simulator-ios-idb

Overview

This MCP (Model Context Protocol) server exposes an interface for controlling iOS simulators (iPhone and iPad) so that LLMs can issue natural language commands to drive simulator actions. It acts as a bridge between an LLM agent that understands and composes high-level intents and the low-level simulator controls (booting devices, launching apps, interacting with the UI, taking screenshots). By implementing the MCP tool interface, the server enables LLMs to treat simulators like controllable tools and translate plain English requests into simulator operations.

The server is intended for macOS development environments where Xcode and simulator tooling are available. It integrates with common simulator control backends (for example, idb or simctl) to perform device lifecycle and UI interactions. This makes it useful for automated testing, interactive demonstrations, reproducing bug reports, and building assistant-like flows that need to manipulate apps or capture simulator state.

Features

  • Exposes simulator control actions over MCP (Model Context Protocol) for LLMs
  • Boot, shutdown and list available iOS simulators
  • Install, launch, terminate, and uninstall apps on simulators
  • Simulate touch gestures: tap, swipe, long press, type text
  • Capture screenshots and video recordings for context and debugging
  • Query device info (OS version, device type) and installed apps
  • Integrates with idb or simctl backends (configurable)
  • Simple JSON/RPC or HTTP endpoints for tool invocation (MCP-compatible)

Installation / Configuration

Prerequisites:

  • macOS with Xcode and Xcode Command Line Tools installed
  • Python 3.8+ (or the language/runtime the server targets)
  • idb or simctl available on PATH (depending on backend choice)

Clone and install:

# clone the repo
git clone https://github.com/InditexTech/mcp-server-simulator-ios-idb.git
cd mcp-server-simulator-ios-idb

# create and activate a virtual environment (optional)
python -m venv .venv
source .venv/bin/activate

# install Python dependencies
pip install -r requirements.txt

Example configuration (environment variables or config file):

# example environment variables
export MCP_HOST=0.0.0.0
export MCP_PORT=8080
export SIM_BACKEND=idb          # or "simctl"
export IDB_PATH=/usr/local/bin/idb  # if using idb
export LOG_LEVEL=info

Start the server:

# start with defaults
python -m mcp_server.run --host $MCP_HOST --port $MCP_PORT

If a config file is supported, create config.json with keys such as host, port, backend, and idb_path:

{
  "host": "0.0.0.0",
  "port": 8080,
  "backend": "idb",
  "idb_path": "/usr/local/bin/idb"
}

Then run:

python -m mcp_server.run --config config.json

Note: Running and controlling simulators requires the macOS user to have Xcode installed and simulator runtimes available. Ensure the chosen backend (idb or simctl) is installed and accessible to the server process.

Available Tools / Resources

The server exposes a set of MCP tools (mapped to JSON actions). Common tools and what they do:

Tool nameDescriptionExample natural language
list_devicesReturns available simulators and states“Show me available iPhone simulators.”
boot_deviceBoot a specific simulator“Start an iPhone 14 simulator.”
shutdown_deviceShutdown a simulator“Stop the running simulator.”
install_appInstall .app or .ipa on simulator“Install the debug build of MyApp.”
launch_appLaunch an app by bundle identifier“Open MyApp and go to the login screen.”
terminate_appTerminate a running app“Close the app.”
tapSimulate a tap at coordinates or element“Tap the login button.”
swipePerform a swipe gesture“Swipe left on the carousel.”
type_textEnter text into focused field“Type ‘[email protected]’ into the email field.”
screenshotCapture a screenshot and return path/bytes“Take a screenshot of the current screen.”
set_locationSet GPS location on simulator“Set the device location to New York City.”
set_permissionsGrant or revoke app permissions“Allow camera access for MyApp.”

These tools are intended to be invoked by an MCP-compliant LLM agent; each tool returns structured JSON describing success/failure and any artifacts (file paths, screenshots, error logs).

Use Cases

  • Automated QA with LLM-driven test generation: Ask an LLM to generate exploratory test steps in plain English; the MCP server executes the steps in a simulator and returns screenshots and logs for verification.
    • Example: “Verify the onboarding flow accepts a valid email, then sign out.” The agent will boot a simulator, install the app, perform taps and text entry, capture a screenshot at each step.
  • Reproducing bug reports: Given a natural-language bug description, an LLM can interpret the steps and run them on a simulator to reproduce an issue and produce artifacts (video, screenshot) to attach to a ticket.
    • Example: “App crashes when opening settings after logging in” → server boots simulator, logs in, opens settings, and provides crash logs/screenshots.
  • Prototyping conversational assistants: Build a prototype assistant that can operate an iOS app in a simulator in response to end-user commands (e.g., “Show me my recent orders in the shopping app”).
  • Accessibility and localization checks: Automate checks across different simulator locales
Tags:ai-ml