iOS Simulator Automation (IDB) MCP server

Enables iOS simulator automation via Facebook's IDB tool, allowing control of simulators, app launching, screenshot capture, and UI interactions through natural language commands
Back to servers
Provider
Inditex
Release date
Apr 08, 2025
Language
TypeScript
Stats
153 stars

The MCP server for iOS simulator provides a bridge between Large Language Models (LLMs) and iOS simulators, allowing you to control iOS simulators through natural language commands. It enables simulator control, app management, UI interactions, and advanced debugging features through simple text instructions.

Installation

Using Cline

The easiest installation method is through Cline:

Add this mcp to cline https://github.com/InditexTech/mcp-server-simulator-ios-idb

Cline will handle the installation process automatically, including dependency management.

Manual Installation

You can also install the server manually:

# 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

The installation process will:

  1. Check if you're running macOS
  2. Install idb-companion via Homebrew
  3. Install fb-idb via pip in the virtual environment

Note: Keep the virtual environment activated while using the server. If you close your terminal, reactivate with source venv/bin/activate before running npm start.

System Requirements

  • macOS: Required for iOS simulator support
  • Node.js: v14.0.0 or higher
  • Homebrew: Required for installing dependencies
  • XCode: With iOS simulators installed

MCP Integration

To use this server with Claude or other LLM assistants:

  1. Add the server to your MCP settings in Claude Desktop:
{
  "mcpServers": {
    "ios-simulator": {
      "command": "node",
      "args": ["/path/to/mcp-server-simulator-ios-idb/dist/index.js"],
      "env": {}
    }
  }
}
  1. Use natural language commands to control iOS simulators:
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

Using as a Library

Basic Usage

import { createMCPServer } from 'mcp-server-simulator-ios-idb';

async function main() {
  // Create an instance of the MCP server
  const { orchestrator } = createMCPServer();
  
  // Create a simulator session
  const sessionResult = await orchestrator.processInstruction('create session');
  console.log(`Session created: ${sessionResult.data}`);
  
  // Interact with the simulator
  await orchestrator.processInstruction('tap at 100, 200');
  
  // Capture a screenshot
  const screenshotResult = await orchestrator.processInstruction('take screenshot');
  console.log(`Screenshot saved at: ${screenshotResult.data}`);
}

main().catch(console.error);

Advanced Usage

import { 
  IDBManager, 
  NLParser, 
  MCPOrchestrator,
  ParserToOrchestrator,
  OrchestratorToIDB
} from 'mcp-server-simulator-ios-idb';

// Create instances
const idbManager = new IDBManager();
const parser = new NLParser();
const orchestrator = new MCPOrchestrator(parser, idbManager);

// Use the components directly
const sessionId = await idbManager.createSimulatorSession({
  deviceName: 'iPhone 12',
  platformVersion: '15.0'
});

await idbManager.tap(sessionId, 100, 200);

Supported Commands

Simulator Management

  • Create session: create session, create simulator iPhone 12
  • Terminate session: terminate session, close simulator
  • List simulators: list simulators, show simulators
  • List booted simulators: list booted simulators
  • Boot simulator: boot simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2
  • Shutdown simulator: shutdown simulator 5A321B8F-4D85-4267-9F79-2F5C91D142C2
  • Focus simulator: focus simulator, bring simulator to front
  • List simulator sessions: list simulator sessions

App Management

  • Install app: install app /path/to/app.ipa
  • Launch app: launch app com.example.app
  • Terminate app: terminate app com.example.app
  • Uninstall app: uninstall app com.example.app
  • List apps: list apps, show installed apps
  • Check if app installed: is app com.example.app installed

UI Interaction

  • Tap: tap at 100, 200
  • Swipe: swipe from 100, 200 to 300, 400
  • Press button: press button HOME, press button SIRI
  • Input text: input text Hello World
  • Press key: press key 4
  • Press key sequence: press key sequence 4 5 6

Accessibility

  • Describe elements: describe all elements, show accessibility elements
  • Describe point: describe point 100, 200, what's at 150, 300

Capture and Logs

  • Take screenshot: take screenshot, capture screen
  • Record video: record video /path/output.mp4
  • Stop recording: stop recording, stop video recording
  • Get logs: get logs, get logs for com.example.app

Debug

  • Start debug: debug app com.example.app
  • Stop debug: stop debug, terminate debug session
  • Debug status: debug status, show debug info

Crash Logs

  • List crash logs: list crash logs, show crash logs
  • Show crash log: show crash log crash_2023-01-01
  • Delete crash logs: delete crash logs, clear crash logs

Additional Commands

  • Install dylib: install dylib /path/to/library.dylib
  • Open URL: open url https://example.com
  • Clear keychain: clear keychain
  • Set location: set location 37.7749, -122.4194
  • Add media: add media /path/to/image.jpg
  • Approve permissions: approve permissions com.example.app photos camera
  • Update contacts: update contacts /path/to/contacts.sqlite

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later