Prerequisites
Xcode and iOS Simulator
Preflight controls iOS Simulators throughxcrun simctl, which ships with Xcode. You need:
- Xcode installed from the Mac App Store or developer.apple.com
- iOS Simulator runtime — included with Xcode by default
- Xcode Command Line Tools — run
xcode-select --installifxcrunis not found
Node.js 18+
Preflight requires Node.js 18 or later. Check your version:Installing idb
idb (IndigoHID) is Facebook’s iOS Debug Bridge. Preflight uses it for cursor-free touch injection — taps and swipes happen through the real iOS HID layer without moving your Mac cursor.Install the Python idb client
The
idb CLI tool is a Python package that communicates with idb-companion:Build from Source
Preflight is distributed as source and must be compiled before use. The build produces two artifacts:dist/index.js— The MCP server (compiled from TypeScript)dist/mouse-events— A native Swift binary used as the CGEvent fallback for touch injection
Install Node.js dependencies
postinstall script checks whether idb is on your PATH. If it’s not found, you’ll see:What Gets Built
After a successful build, thedist/ directory contains:
Environment PATH Setup
The MCP server process inherits itsPATH from your MCP client’s configuration — not from your shell. This means idb may not be found even if which idb works in your terminal.
Always set PATH explicitly in your MCP client config:
~/Library/Python/3.x/bin, append that to the PATH value:
PREFLIGHT_IDB_PATH to the absolute path of the idb binary:
Verifying the Installation
Check the server starts
Ctrl+C to stop.
Check idb is detected
Once connected through your MCP client, ask your agent:Run simulator_diagnose and check the output.
simulator_diagnose returns Xcode version, disk usage, and booted device info. If idb is detected, touch tools will show [cursor-free] in their descriptions. If you see [CGEvent fallback], idb is not on the PATH that the server process sees — revisit the PATH configuration above.
Check simctl works
Troubleshooting
idb not detected — tools show [CGEvent fallback]
idb not detected — tools show [CGEvent fallback]
- Run
which idbin your terminal to find the actual binary path. - Add that directory to the
PATHenv var in your MCP config. - Or set
PREFLIGHT_IDB_PATHto the full path of theidbbinary. - Restart your MCP client after making config changes.
Simulator not found
Simulator not found
- Open Simulator.app:
open -a Simulator - Boot a device via the UI, or run:
xcrun simctl boot "iPhone 16 Pro" - Use
simulator_bootthrough your MCP client to boot by name or UDID.
Accessibility permission errors
Accessibility permission errors
The process running Preflight (your terminal, Claude Code, Cursor, etc.) needs Accessibility permission:
- Open System Settings → Privacy & Security → Accessibility
- Add your terminal app or IDE to the list
- Restart the app after granting permission
swiftc not found during build
swiftc not found during build
The Swift compiler ships with Xcode. If Or set the active Xcode path:
swiftc is not found: