An MCP (Model Context Protocol) server that provides tools to interact with the iOS Simulator. Take screenshots, inspect UI hierarchy, tap, swipe, type, set GPS location, and more.
Works with any MCP-compatible client, including Claude Code, Claude Desktop, and others.
# 1. Install prerequisites xcode-select --install brew tap facebook/fb brew install idb-companion uv pipx pipx ensurepath pipx install fb-idb --python python3.11 # 2. Clone and install the MCP git clone https://github.com/whitesmith/ios-simulator-mcp.git ~/ios-simulator-mcp cd ~/ios-simulator-mcp uv sync # 3. Add to Claude Code settings (see Configuration section below) claude mcp add ios-simulator \ -- uv run --directory ~/ios-simulator-mcp ios-simulator-mcp # 4. Restart Claude CodeThis MCP uses two underlying tools:
| Tool | Source | Used For |
|---|---|---|
xcrun simctl | Built into Xcode | Simulator management, screenshots, location, URLs |
idb | Facebook IDB | UI interactions (tap, swipe, type), UI hierarchy, app management |
xcode-select --installIDB is required for UI interactions (tap, swipe, type, UI hierarchy). It has two components that must both be installed:
brew tap facebook/fb brew install idb-companionThe idb command comes from the fb-idb Python package. Install it globally with pipx:
# Install pipx if you don't have it brew install pipx pipx ensurepath # Install fb-idb globally (use Python 3.11 for compatibility) pipx install fb-idb --python python3.11Note: The
fb-idbpackage has compatibility issues with Python 3.14. Use Python 3.11 or 3.12.
# Check idb-companion which idb_companion # Should output: /opt/homebrew/bin/idb_companion # Check idb CLI which idb # Should output: ~/.local/bin/idb # Test connectivity idb list-targets # Should list all available simulatorsbrew install uvClone the repository and install dependencies:
git clone https://github.com/whitesmith/ios-simulator-mcp.git ~/ios-simulator-mcp cd ~/ios-simulator-mcp uv syncThe quickest way is using the CLI:
claude mcp add ios-simulator -- uv run --directory /Users/yourname/ios-simulator-mcp ios-simulator-mcpOr manually add to ~/.claude/settings.json (global) or .mcp.json in your project root (project-specific):
{ "mcpServers": { "ios-simulator": { "command": "uv", "args": ["run", "--directory", "/Users/yourname/ios-simulator-mcp", "ios-simulator-mcp"] } } }Replace /Users/yourname/ios-simulator-mcp with the absolute path where you cloned the repository.
Note: Use an absolute path (e.g.,
/Users/yourname/ios-simulator-mcp), not~, since JSON values are not processed by a shell.
Then restart Claude Code or run /mcp to reload MCP servers.
Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json):
{ "mcpServers": { "ios-simulator": { "command": "uv", "args": ["run", "--directory", "/Users/yourname/ios-simulator-mcp", "ios-simulator-mcp"] } } }Then restart Claude Desktop.
| Tool | Description |
|---|---|
list_simulators | List all available simulators with state and UDID |
boot_simulator | Boot a simulator (auto-selects if none specified) |
get_device_info | Get info about connected simulator |
| Tool | Description |
|---|---|
screenshot | Capture screenshot (returns image for visual inspection) |
get_ui_hierarchy | Get UI element tree with positions and labels |
| Tool | Description |
|---|---|
tap | Tap at x,y coordinates |
long_press | Long press at coordinates |
swipe | Swipe from one point to another |
type_text | Type text into focused field |
tap_and_type | Tap on field then type |
press_button | Press hardware button (home, lock, siri, volume) |
shake | Trigger shake gesture |
| Tool | Description |
|---|---|
launch_app | Launch app by bundle ID |
terminate_app | Kill running app |
install_app | Install .app bundle |
uninstall_app | Uninstall app by bundle ID |
open_url | Open URL (great for deep links) |
| Tool | Description |
|---|---|
set_location | Set GPS coordinates |
clear_location | Clear simulated location |
| Tool | Description |
|---|---|
wait | Wait for specified seconds |
Once configured, your MCP client can use these tools automatically. Here are some examples with Claude Code:
Claude: Let me check how the new balance screen looks. [Uses screenshot tool] Claude: I can see the balance card is displaying correctly with the $50.00 amount. However, the "Add Funds" button appears to be cut off on the right edge. Let me fix the padding... Claude: I'll test the login flow. [Uses launch_app with bundle_id "com.example.myapp"] [Uses screenshot to see current state] [Uses get_ui_hierarchy to find the email field coordinates] [Uses tap_and_type to enter email] [Uses tap to press login button] [Uses wait for 2 seconds] [Uses screenshot to verify login succeeded] Claude: Let me test the pickup location feature in San Francisco. [Uses set_location with lat=37.7749, lng=-122.4194] [Uses screenshot to verify map updated] - Check that the MCP is configured in
~/.claude/settings.jsonor.mcp.json - Restart Claude Code or run
/mcpto reload servers - Check for errors in the MCP server startup
This is the most common issue. The fb-idb Python package must be installed globally, not just in the MCP's virtual environment:
# Install pipx if needed brew install pipx pipx ensurepath # Install fb-idb globally with Python 3.11 (3.14 has compatibility issues) pipx install fb-idb --python python3.11 # Verify which idb # Should show ~/.local/bin/idbThe MCP will auto-connect to a booted simulator. If none is booted, use:
boot_simulator with device_name="iPhone 15 Pro" Or boot one manually:
xcrun simctl boot "iPhone 16"Restart the idb companion:
idb kill idb_companion --udid <simulator-udid>Or connect manually:
idb connect <simulator-udid>Make sure the simulator has an app open. The accessibility tree may be empty on the home screen or system dialogs.
Ensure the simulator is fully booted and visible. Test with:
xcrun simctl io booted screenshot /tmp/test.pngIf you see errors like RuntimeError: There is no current event loop, you're likely using Python 3.14 which has asyncio changes incompatible with fb-idb. Reinstall with an older Python:
pipx uninstall fb-idb pipx install fb-idb --python python3.11cd ~/ios-simulator-mcp uv sync uv run ios-simulator-mcp # runs the server directly (for testing)When the MCP client calls a tool:
- Simulator management (
list_simulators,boot_simulator) usesxcrun simctl - Screenshots use
xcrun simctl io <udid> screenshot - UI interactions (
tap,swipe,type_text) useidb uicommands - UI hierarchy uses
idb ui describe-allto get the accessibility tree - App management (
launch_app,terminate_app) usesidbcommands - Location uses
xcrun simctl location
The MCP automatically connects to an already-booted simulator, or boots the latest iPhone if none is running.
- macOS only - iOS Simulator only runs on macOS
- Simulator only - Does not support physical iOS devices (idb does, but this MCP is configured for simulators)
- UI hierarchy on app screens - The accessibility tree may be empty or limited on the home screen, system dialogs, or apps without accessibility labels
- Coordinate-based interactions - Taps and swipes use absolute coordinates; you'll need to use
get_ui_hierarchyto find element positions - No gesture recording - Complex multi-touch gestures are not supported
- Screenshot size - Screenshots are compressed to JPEG and capped at ~2MB for efficient transmission