đą A Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to interact with iOS simulators through natural language commands.
This MCP server bridges the gap between LLMs and iOS simulators, allowing comprehensive control through natural language commands. It supports a wide range of operations, from simulator management to application testing and debugging.

Add this mcp to cline https://github.com/InditexTech/mcp-server-simulator-ios-idb# Clone the repository
git clone https://github.com/InditexTech/mcp-server-simulator-ios-idb.git
cd mcp-server-simulator-ios-idb
# Create and activate Python virtual environment
python3 -m venv venv
source venv/bin/activate # On Unix/macOS
# Install dependencies
npm install
# Build the project
npm run build
# Start the project
npm start
# Run tests
npm test
To use this server with Claude or other LLM assistants:
{
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],
"env": {}
}
}
}
create a simulator session with iPhone 14
install app /path/to/my-app.ipa
launch app com.example.myapp
tap at 100, 200
take a screenshot
import { createMCPServer } from 'mcp-server-simulator-ios-idb';
async function main() {
const { orchestrator } = createMCPServer();
const sessionResult = await orchestrator.processInstruction('create session');
console.log(`Session created: ${sessionResult.data}`);
await orchestrator.processInstruction('tap at 100, 200');
const screenshotResult = await orchestrator.processInstruction('take screenshot');
console.log(`Screenshot saved at: ${screenshotResult.data}`);
}
main().catch(console.error);
import {
IDBManager,
NLParser,
MCPOrchestrator,
ParserToOrchestrator,
OrchestratorToIDB
} from 'mcp-server-simulator-ios-idb';
const idbManager = new IDBManager();
const parser = new NLParser();
const orchestrator = new MCPOrchestrator(parser, idbManager);
const sessionId = await idbManager.createSimulatorSession({
deviceName: 'iPhone 12',
platformVersion: '15.0'
});
await idbManager.tap(sessionId, 100, 200);
mcp-server-simulator-ios-idb/
âââ src/ # Source code
â âââ adapters/ # Adapter components
â âââ idb/ # IDB manager implementation
â âââ mcp/ # MCP server implementation
â âââ orchestrator/ # Command orchestrator
â âââ parser/ # Natural language parser
â âââ index.ts # Main entry point
âââ types/ # TypeScript type definitions
âââ scripts/ # Installation scripts
âââ package.json # Project configuration
âââ tsconfig.json # TypeScript configuration
| Command | Description | Example |
|---|---|---|
| Create session | Creates a new simulator session | "create session", "create simulator iPhone 12" |
| Terminate session | Terminates the current session | "terminate session", "close simulator" |
| List simulators | Lists available simulators | "list simulators", "show simulators" |
| List booted simulators | Lists running simulators | "list booted simulators", "show running simulators" |
| Boot simulator | Boots a simulator by UDID | "boot simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2" |
| Shutdown simulator | Shuts down a simulator | "shutdown simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2" |
| Focus simulator | Brings simulator window to front | "focus simulator", "bring simulator to front" |
| List simulator sessions | Lists active simulator sessions | "list simulator sessions", "show active sessions" |
| Command | Description | Example |
|---|---|---|
| Install app | Installs an app on the simulator | "install app /path/to/app.ipa" |
| Launch app | Launches an app on the simulator | "launch app com.example.app" |
| Terminate app | Terminates a running app | "terminate app com.example.app" |
| Uninstall app | Uninstalls an app | "uninstall app com.example.app" |
| List apps | Lists installed applications | "list apps", "show installed apps" |
| Check if app installed | Checks if an app is installed | "is app com.example.app installed" |
| Command | Description | Example |
|---|---|---|
| Tap | Taps at specific coordinates | "tap at 100, 200" |
| Swipe | Performs a swipe gesture | "swipe from 100, 200 to 300, 400" |
| Press button | Presses a device button | "press button HOME", "press button SIRI" |
| Input text | Types text | "input text Hello World" |
| Press key | Presses a key by code | "press key 4" |
| Press key sequence | Presses a sequence of keys | "press key sequence 4 5 6" |
| Command | Description | Example |
|---|---|---|
| Describe elements | Lists all accessibility elements | "describe all elements", "show accessibility elements" |
| Describe point | Describes element at coordinates | "describe point 100, 200", "what's at 150, 300" |
| Command | Description | Example |
|---|---|---|
| Take screenshot | Captures a screenshot | "take screenshot", "capture screen" |
| Record video | Records screen activity | "record video /path/output.mp4" |
| Stop recording | Stops video recording | "stop recording", "stop video recording" |
| Get logs | Retrieves system or app logs | "get logs", "get logs for com.example.app" |
| Command | Description | Example |
|---|---|---|
| Start debug | Starts a debug session | "debug app com.example.app", "start debug com.example.app" |
| Stop debug | Stops a debug session | "stop debug", "terminate debug session" |
| Debug status | Gets debug session status | "debug status", "show debug info" |
| Command | Description | Example |
|---|---|---|
| List crash logs | Lists available crash logs | "list crash logs", "show crash logs" |
| Show crash log | Shows content of a crash log | "show crash log crash_2023-01-01" |
| Delete crash logs | Deletes crash logs | "delete crash logs", "clear crash logs" |
| Command | Description | Example |
|---|---|---|
| Install dylib | Installs a dynamic library | "install dylib /path/to/library.dylib" |
| Open URL | Opens a URL in the simulator | "open url https://example.com" |
| Clear keychain | Clears the simulator's keychain | "clear keychain" |
| Set location | Sets the simulator's location | "set location 37.7749, -122.4194" |
| Add media | Adds media to the camera roll | "add media /path/to/image.jpg" |
| Approve permissions | Approves app permissions | "approve permissions com.example.app photos camera" |
| Update contacts | Updates contacts database | "update contacts /path/to/contacts.sqlite" |
The server consists of three main components:
1. IDBManager: Low-level component that interacts directly with iOS simulators through idb.
2. NLParser: Interprets natural language instructions and converts them into structured commands.
3. MCPOrchestrator: Coordinates interactions between the parser and the IDBManager.
These components are connected through adapters:
- ParserToOrchestrator: Converts parser results into orchestrator commands.
- OrchestratorToIDB: Translates orchestrator commands into IDBManager calls.
This project relies on facebook/idb for iOS simulator control capabilities. Special thanks to the Facebook/Meta team and all contributors to the idb project.
This tool is available as open source under the terms of the Apache-2.0.