
MCP Server for iOS Simulator
โ 41from atom2ueki
Programmatically control iOS simulators via stdio transport. Requires macOS with Xcode and installed iOS simulators.
๐ฑ MCP Server for iOS Simulator
A server that implements the Model Context Protocol (MCP) for iOS simulators, built on top of appium-ios-simulator and utilizing the MCP TypeScript SDK.
๐ Overview
This project provides a bridge between iOS simulators and the Model Context Protocol, allowing for standardized communication with iOS simulator instances. It enables programmatic control of iOS simulators while leveraging the MCP protocol for consistent interfaces across different environments. The server utilizes stdio as its transport mechanism, making it ideal for integration with Claude Desktop and other MCP-compatible clients.
๐ฌ Demo

Demo showing how to boot an iOS simulator using Claude AI Desktop
๐๏ธ Architecture
The server consists of three main components:
- ๐ Simulator Management Layer - Handles iOS simulator lifecycle and interactions
- ๐ MCP Protocol Implementation - Implements the Model Context Protocol using the TypeScript SDK with stdio transport
- ๐ Logger Component - Provides file-based logging without interfering with the stdio transport
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Protocol โ โ Stdio โ โ Simulator โ
โ Implementation โโโโโโโค Transport โโโโโโโค Management โ
โ โ โ โ โ Layer โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โฒ โฒ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ โ iOS Simulator โ
โ (e.g. Claude) โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโจ Features
- ๐ Start, stop, and manage iOS simulator instances
- ๐ Boot and shutdown simulators
- ๐ฒ Install and launch applications on simulators
- ๐ธ Take screenshots of simulator screens
- ๐ Perform taps on coordinates
- ๐ Support for multiple concurrent simulator sessions
- ๐ Comprehensive file-based logging without console output
- ๐ก๏ธ Error-resilient operation
๐จโ๐ป Development
๐ Project Structure
src/
โโโ simulator/ # Simulator management layer
โโโ mcp/ # MCP protocol implementation
โโโ bridge/ # Bridge component
โโโ utils/ # Utility functions including logger
โโโ config.ts # Configuration handling
โโโ index.ts # Entry point๐จ Building the Project
# Install development dependencies
npm install
# Run TypeScript compiler
npm run build๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- ๐ฑ appium-ios-simulator for providing the iOS simulator interaction capabilities
- ๐ Model Context Protocol for the protocol specification and TypeScript SDK
npx -y @smithery/cli install @atom2ueki/mcp-server-ios-simulator --client claude๐ Prerequisites
- ๐ข Node.js (v16 or later)
- ๐ macOS (required for iOS simulators)
- ๐ ๏ธ Xcode with iOS simulators installed
- ๐ TypeScript 4.5+
๐ง Installation
Installing via Smithery
To install iOS Simulator Control Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @atom2ueki/mcp-server-ios-simulator --client claudeManual Installation
# Clone the repository
git clone https://github.com/atom2ueki/mcp-server-ios-simulator.git
cd mcp-server-ios-simulator
# Install dependencies
npm install๐ณ Docker
A Dockerfile is provided so the server can be packaged for the Glama MCP directory and other container hosts.
docker build -t mcp-server-ios-simulator .
docker run --rm -i mcp-server-ios-simulatorNote: iOS simulators only run on macOS, so a Linux container can host the MCP process and respond on stdio but cannot drive a real simulator. The container is intended for portability checks and remote MCP environments that bridge to a macOS host.
โ๏ธ Configuration
Configuration is handled through the src/config.ts file:
const config = {
simulator: {
defaultDevice: process.env.SIMULATOR_DEFAULT_DEVICE || 'iPhone 16',
defaultOS: process.env.SIMULATOR_DEFAULT_OS || '18.2',
timeout: parseInt(process.env.SIMULATOR_TIMEOUT || '30000', 10),
}
};You can customize these settings by setting environment variables:
SIMULATOR_DEFAULT_DEVICE=iPhone 16
SIMULATOR_DEFAULT_OS=18.2
SIMULATOR_TIMEOUT=30000๐ Usage
๐จ Building and Starting the Server
# Build the project
npm run build
# Start the server
npm start๐งฐ MCP Tools
The server provides two distinct approaches for controlling iOS simulators:
๐ฑ Direct Simulator Management (Recommended)
These tools work directly with simulator UDIDs and don't require maintaining sessions:
- ๐
list-available-simulators- List all available simulators with their UDIDs - โถ๏ธ
boot-simulator-by-udid- Boot a simulator directly using its UDID - โน๏ธ
shutdown-simulator-by-udid- Shutdown a simulator directly using its UDID - ๐
list-booted-simulators- List all currently booted simulators
Use this approach when: You just want to boot, use, and shut down simulators directly.
๐ฑ Session-Based Management (Advanced)
These tools use a session layer that tracks simulators with custom session IDs:
- ๐
list-simulator-sessions- List all active simulator sessions - โ
create-simulator-session- Create a new simulator session - โ
terminate-simulator-session- Terminate a session (shuts down simulator and cleans up) - ๐
create-and-boot-simulator- Create a new simulator session and boot it - โถ๏ธ
boot-simulator- Boot a simulator for an existing session - โน๏ธ
shutdown-simulator- Shutdown a simulator for an existing session
Use this approach when: You need to track simulator metadata, reference simulators by custom IDs, or use the more advanced management features.
๐ฒ Application Management
- ๐ฅ
install-app- Install an application on a simulator - ๐
launch-app- Launch an application on a simulator - ๐
terminate-app- Terminate a running application on a simulator
๐ฑ๏ธ Interaction Tools
- ๐ท
take-screenshot- Take a screenshot of the simulator screen - ๐
tap-coordinate- Perform a tap at the specified coordinates
๐ค Example Usage with Claude Desktop
-
Configure Claude Desktop to use this server as an MCP tool:
- Open Claude Desktop
- Go to Settings > Advanced
- Add the following configuration to the "MCP Servers" section:
{ "mcpServers": { "simulator": { "command": "node", "args": [ "/path/to/your/mcp-server-ios-simulator/dist/index.js" ] } } }- Replace
/path/to/yourwith the actual path to where you've installed this repository - Save the settings and restart Claude Desktop
-
Use the provided tools to control iOS simulators directly from Claude Desktop:
Direct UDID Approach (Recommended):
-
First, ask Claude to list available simulators:
"Show me all available iOS simulators" -
Then use the UDID to boot a specific simulator:
"Boot the iOS simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1" -
When finished, shut it down using the same UDID:
"Shut down the simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1"
The direct UDID approach is simpler and more reliable for most use cases.
Session-Based Approach (Advanced): Only use this approach if you need the advanced features of session tracking:
"Create a new simulator session for iPhone 16 Pro with iOS 18.2" "Boot the simulator for session abc-123" "Take a screenshot of the simulator for session abc-123" "Terminate the simulator session abc-123" -
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under MITโ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ