A Model Context Protocol (MCP) server that enables LLMs to interact with iOS simulators through natural language commands. This MCP server provides a bridge between Large Language Models (LLMs) and iOS simulators, offering comprehensive control through natural language commands. Here's what it can do: For detailed usage, see the Installation guide and Supported Commands sections. You can use this
Add this skill
npx mdskills install InditexTech/mcp-server-simulator-ios-idbComprehensive iOS simulator control via natural language with extensive tooling and clear documentation
1# ๐ฑ MCP Server for iOS Simulator23[](https://glama.ai/mcp/servers/@InditexTech/mcp-server-simulator-ios-idb)45A Model Context Protocol (MCP) server that enables LLMs to interact with iOS simulators through natural language commands.67## โน๏ธ Overview89This MCP server provides a bridge between Large Language Models (LLMs) and iOS simulators, offering comprehensive control through natural language commands. Here's what it can do:1011For detailed usage, see the Installation guide and Supported Commands sections. You can use this server either through direct MCP integration or as a standalone library.1213Check out the Architecture section to understand how the components work together to enable natural language control of iOS simulators.14151617### ๐ฎ Simulator Control18- Create and manage simulator sessions19- Boot, shutdown, and monitor simulator states20- List available and running simulators21- Focus simulator windows2223### ๐ฑ Application Management24- Install and manage iOS applications25- Launch, terminate, and uninstall apps26- Monitor app states and verify installations27- Handle app permissions and configurations2829### ๐ฑ๏ธ UI Interaction & Testing30- Interact with the simulator UI31- Execute tap, swipe, and button press actions32- Input text and key sequences33- Access accessibility elements for UI testing34- Record videos of UI interactions3536### ๐ ๏ธ Development & Debugging37- Capture screenshots and system logs38- Debug applications in real-time39- Monitor and analyze crash logs40- Install dynamic libraries and manage app data4142### โก Advanced Features43- Additional functionality includes:44 - Location simulation45 - Media injection46 - URL scheme handling47 - Contact database management48 - Keychain operations4950For detailed usage, see the Installation guide and Supported Commands sections. You can use this server either through direct MCP integration or as a standalone library.5152Check out the Architecture section to understand how the components work together to enable natural language control of iOS simulators.5354## ๐ Requirements5556- **macOS**: Required for iOS simulator support57- **Node.js**: v14.0.0 or higher58- **Homebrew**: Required for installing dependencies59- **XCode**: With iOS simulators installed6061## ๐ Installation6263The easiest way to install this server is through Cline:64651. Simply ask Cline:66```67Add this mcp to cline https://github.com/InditexTech/mcp-server-simulator-ios-idb68```69702. Cline will handle the installation process automatically, including dependency management and configuration.7172Alternatively, you can install it manually:7374```bash75# Clone the repository76git clone https://github.com/InditexTech/mcp-server-simulator-ios-idb.git77cd mcp-server-simulator-ios-idb7879# Create and activate Python virtual environment80python3 -m venv venv81source venv/bin/activate # On Unix/macOS8283# Install dependencies84npm install8586# Build the project87npm run build8889# Start the project90npm start9192# Run tests93npm test94```9596The installation process will automatically:971. Check if you're running macOS982. Install idb-companion via Homebrew993. Install fb-idb via pip in the virtual environment100101Note: Make sure to keep the virtual environment activated while using the server. If you close your terminal and come back later, you'll need to reactivate the virtual environment with the `source venv/bin/activate` command before running `npm start`.102103## ๐ MCP Integration104105To use this server with Claude or other LLM assistants:1061071. Add the server to your MCP settings in Claude Desktop:108109```json110{111 "mcpServers": {112 "ios-simulator": {113 "command": "node",114 "args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],115 "env": {}116 }117 }118}119```1201212. The LLM can now use natural language commands to control iOS simulators:122123```124create a simulator session with iPhone 14125install app /path/to/my-app.ipa126launch app com.example.myapp127tap at 100, 200128take a screenshot129```130131## ๐ Usage as a Library132133You can also use this package as a library in your own projects:134135### ๐ฐ Basic Usage136137```typescript138import { createMCPServer } from 'mcp-server-simulator-ios-idb';139140async function main() {141 // Create an instance of the MCP server142 const { orchestrator } = createMCPServer();143144 // Process natural language commands145146 // Create a simulator session147 const sessionResult = await orchestrator.processInstruction('create session');148 console.log(`Session created: ${sessionResult.data}`);149150 // Interact with the simulator151 await orchestrator.processInstruction('tap at 100, 200');152153 // Capture a screenshot154 const screenshotResult = await orchestrator.processInstruction('take screenshot');155 console.log(`Screenshot saved at: ${screenshotResult.data}`);156}157158main().catch(console.error);159```160161### ๐ Advanced Usage162163You can also use the individual components directly:164165```typescript166import {167 IDBManager,168 NLParser,169 MCPOrchestrator,170 ParserToOrchestrator,171 OrchestratorToIDB172} from 'mcp-server-simulator-ios-idb';173174// Create instances175const idbManager = new IDBManager();176const parser = new NLParser();177const orchestrator = new MCPOrchestrator(parser, idbManager);178179// Use the components directly180const sessionId = await idbManager.createSimulatorSession({181 deviceName: 'iPhone 12',182 platformVersion: '15.0'183});184185await idbManager.tap(sessionId, 100, 200);186```187188## ๐๏ธ Project Structure189190```191mcp-server-simulator-ios-idb/192โโโ src/ # Source code193โ โโโ adapters/ # Adapter components194โ โโโ idb/ # IDB manager implementation195โ โโโ mcp/ # MCP server implementation196โ โโโ orchestrator/ # Command orchestrator197โ โโโ parser/ # Natural language parser198โ โโโ index.ts # Main entry point199โโโ types/ # TypeScript type definitions200โโโ scripts/ # Installation scripts201โโโ package.json # Project configuration202โโโ tsconfig.json # TypeScript configuration203```204205## ๐ฏ Supported Commands206207The NLParser supports the following natural language commands:208209### ๐ฎ Simulator Management210| Command | Description | Example |211|---------|-------------|---------|212| Create session | Creates a new simulator session | "create session", "create simulator iPhone 12" |213| Terminate session | Terminates the current session | "terminate session", "close simulator" |214| List simulators | Lists available simulators | "list simulators", "show simulators" |215| List booted simulators | Lists running simulators | "list booted simulators", "show running simulators" |216| Boot simulator | Boots a simulator by UDID | "boot simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2" |217| Shutdown simulator | Shuts down a simulator | "shutdown simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2" |218| Focus simulator | Brings simulator window to front | "focus simulator", "bring simulator to front" |219| List simulator sessions | Lists active simulator sessions | "list simulator sessions", "show active sessions" |220221### ๐ฑ App Management222| Command | Description | Example |223|---------|-------------|---------|224| Install app | Installs an app on the simulator | "install app /path/to/app.ipa" |225| Launch app | Launches an app on the simulator | "launch app com.example.app" |226| Terminate app | Terminates a running app | "terminate app com.example.app" |227| Uninstall app | Uninstalls an app | "uninstall app com.example.app" |228| List apps | Lists installed applications | "list apps", "show installed apps" |229| Check if app installed | Checks if an app is installed | "is app com.example.app installed" |230231### ๐ฑ๏ธ UI Interaction232| Command | Description | Example |233|---------|-------------|---------|234| Tap | Taps at specific coordinates | "tap at 100, 200" |235| Swipe | Performs a swipe gesture | "swipe from 100, 200 to 300, 400" |236| Press button | Presses a device button | "press button HOME", "press button SIRI" |237| Input text | Types text | "input text Hello World" |238| Press key | Presses a key by code | "press key 4" |239| Press key sequence | Presses a sequence of keys | "press key sequence 4 5 6" |240241### โฟ Accessibility242| Command | Description | Example |243|---------|-------------|---------|244| Describe elements | Lists all accessibility elements | "describe all elements", "show accessibility elements" |245| Describe point | Describes element at coordinates | "describe point 100, 200", "what's at 150, 300" |246247### ๐ธ Capture and Logs248| Command | Description | Example |249|---------|-------------|---------|250| Take screenshot | Captures a screenshot | "take screenshot", "capture screen" |251| Record video | Records screen activity | "record video /path/output.mp4" |252| Stop recording | Stops video recording | "stop recording", "stop video recording" |253| Get logs | Retrieves system or app logs | "get logs", "get logs for com.example.app" |254255### ๐ Debug256| Command | Description | Example |257|---------|-------------|---------|258| Start debug | Starts a debug session | "debug app com.example.app", "start debug com.example.app" |259| Stop debug | Stops a debug session | "stop debug", "terminate debug session" |260| Debug status | Gets debug session status | "debug status", "show debug info" |261262### ๐ฅ Crash Logs263| Command | Description | Example |264|---------|-------------|---------|265| List crash logs | Lists available crash logs | "list crash logs", "show crash logs" |266| Show crash log | Shows content of a crash log | "show crash log crash_2023-01-01" |267| Delete crash logs | Deletes crash logs | "delete crash logs", "clear crash logs" |268269### ๐ง Additional Commands270| Command | Description | Example |271|---------|-------------|---------|272| Install dylib | Installs a dynamic library | "install dylib /path/to/library.dylib" |273| Open URL | Opens a URL in the simulator | "open url https://example.com" |274| Clear keychain | Clears the simulator's keychain | "clear keychain" |275| Set location | Sets the simulator's location | "set location 37.7749, -122.4194" |276| Add media | Adds media to the camera roll | "add media /path/to/image.jpg" |277| Approve permissions | Approves app permissions | "approve permissions com.example.app photos camera" |278| Update contacts | Updates contacts database | "update contacts /path/to/contacts.sqlite" |279280The interface supports all commands available in the idb CLI tool, providing a comprehensive set of operations for iOS simulator automation.281282## ๐ Architecture283284The server consists of three main components:2852861. **IDBManager**: Low-level component that interacts directly with iOS simulators through idb.2872. **NLParser**: Component that interprets natural language instructions and converts them into structured commands.2883. **MCPOrchestrator**: Central component that coordinates interactions between the parser and the IDBManager.289290These components are connected through adapters:291- **ParserToOrchestrator**: Converts parser results into orchestrator commands.292- **OrchestratorToIDB**: Translates orchestrator commands into IDBManager calls.293294## ๐ MCP Integration295296To use this server with the Model Context Protocol:2972981. Add the server to your MCP settings:299300```json301{302 "mcpServers": {303 "ios-simulator": {304 "command": "node",305 "args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],306 "env": {}307 }308 }309}310```3113122. Connect to the server in your LLM application:313314```typescript315const result = await useMcpTool({316 serverName: "ios-simulator",317 toolName: "process-instruction",318 arguments: {319 instruction: "create simulator session"320 }321});322```323324## ๐ Acknowledgments325326This project would not be possible without [facebook/idb](https://github.com/facebook/idb), which provides the underlying iOS simulator control capabilities. We extend our sincere gratitude to the Facebook/Meta team and all contributors to the idb project for creating and maintaining such a powerful and reliable tool.327328## ๐ License329330This tool is available as open source under the terms of the Apache-2.0.331
Full transparency โ inspect the skill content before installing.