Preflight Ios Mcp

io.github.EthanAckerman-git由 GitHub 帳號 EthanAckerman-git 發布v1.0.1更新於 Oct 27, 2026

57 tools for AI-powered iOS Simulator automation — tap, swipe, type, screenshots, and more.

發布方自己的服務:Preflight

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理在 Mac 上操作 iOS 模擬器:點擊、滑動、輸入、讀取無障礙樹、檢視 App 資料並偵錯 App。

可以做什麼
  • 觀察與檢查模擬器:截圖、裝置與 App 清單、App 資訊、剪貼簿、螢幕幾何、無障礙快照與元素等待
  • 操作介面:點擊、滑動、長按、輸入文字、按鍵、返回導覽
  • 管理裝置與 App:開機、關機、清除、建立、複製、刪除、重新命名裝置,開啟連結,安裝、啟動、終止與解除安裝 App
  • 偵錯與診斷:裝置日誌與即時日誌串流、當機報告、App 容器檔案、plist 與 SQLite、無障礙稽核、記憶體與 CPU 效能分析
  • 模擬系統條件:GPS 定位與路線、推播通知、剪貼簿、媒體、權限、外觀、狀態列、螢幕錄影、生物辨識、語言地區、網路限速
  • 測試 StoreKit:開啟測試模式、列出與清除交易、管理訂閱與詢問購買、重設優惠資格
適用情境
適合想讓助理在模擬器中端到端驗證 App 的 iOS 開發者與測試人員:執行腳本化介面流程、核對畫面、重現當機、讀取日誌,或測試無障礙、在地化、網路與 StoreKit 情境,而不必手動點擊。
執行需求
需要安裝 Xcode 與 iOS 模擬器的 macOS,以及 Node.js 18 以上版本;透過 npx 以 stdio 在本機執行。建議安裝 Facebook idb 以實現不移動游標的觸控注入,需將其路徑加入 PATH 或設定 PREFLIGHT_IDB_PATH。可選變數 LOG_LEVEL 與 PREFLIGHT_FILTERED_TOOLS。終端機 App 可能需要輔助使用權限。
安裝前請注意
助理可以變更甚至銷毀狀態:清除、刪除、複製模擬器,解除安裝 App,寫入 UserDefaults,重設鑰匙圈,清除 StoreKit 測試交易。未安裝 idb 時會退回移動 Mac 游標的方式。它會讀取模擬器中的 App 資料、日誌與環境變數,請勿對含敏感資料的建置版本使用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Preflight Ios Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Preflight MCP

The most comprehensive MCP (Model Context Protocol) server for iOS Simulator automation. Gives AI agents like Claude, ChatGPT, Cursor, Windsurf, and any MCP-compatible tool full control over iOS Simulators — tap, swipe, type, read accessibility trees, inspect app data, capture screenshots, record video, manage devices, and debug apps in real time.

82 tools across 14 categories. Zero cursor interference — works silently in the background while you use your Mac.

Inspired by Playwright MCP for web automation — Preflight brings the same structured accessibility-first approach to iOS.

[npm version] [License: MIT]

Why Preflight?

  • No disk clutter — Screenshots and video frames return directly in chat. No folders filling up.
  • AI-optimized — Images compressed for minimal token usage. Video → key frames (most AI models can't view video files).
  • Accessibility-first — Like Playwright's browser_snapshot, use simulator_snapshot to understand the screen without vision models.
  • Cursor-free — Touch injection via idb (IndigoHID) — your Mac cursor stays put.
  • 82 tools — From basic tap/swipe to StoreKit testing, network conditioning, memory profiling, and crash log analysis.

Quick Start

Prerequisites

  • macOS with Xcode and iOS Simulator installed
  • Node.js 18+
  • Facebook idb (recommended for cursor-free operation)

Install idb (recommended)

bash
brew tap facebook/fbbrew install idb-companionpip3 install fb-idb

Without idb, the server falls back to CGEvent mouse injection (works but briefly moves your cursor).

Install via npm (recommended)

bash
npm install -g preflight-ios-mcp

Build from Source

bash
git clone https://github.com/EthanAckerman-git/Preflight.gitcd Preflightnpm installnpm run build

Setup by IDE / AI Tool

Add your Python bin directory to PATH if idb was installed via pip (e.g., ~/Library/Python/3.x/bin).

Claude Code

bash
claude mcp add preflight -- npx preflight-ios-mcp

Or add to .mcp.json in your project root:

json
{  "mcpServers": {    "preflight": {      "command": "npx",      "args": ["preflight-ios-mcp"],      "env": {        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"      }    }  }}

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):

json
{  "mcpServers": {    "preflight": {      "command": "npx",      "args": ["preflight-ios-mcp"],      "env": {        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"      }    }  }}

Then in Cursor: Settings → MCP — verify "preflight" shows as connected.

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "preflight": {      "command": "npx",      "args": ["preflight-ios-mcp"],      "env": {        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"      }    }  }}

Then in Windsurf: Settings → Cascade → MCP — verify "preflight" appears.

VS Code (Copilot / Cline / Continue)

Add to .vscode/mcp.json in your project:

json
{  "servers": {    "preflight": {      "command": "npx",      "args": ["preflight-ios-mcp"],      "env": {        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"      }    }  }}

For Cline (VS Code extension), add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:

json
{  "mcpServers": {    "preflight": {      "command": "npx",      "args": ["preflight-ios-mcp"],      "env": {        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"      }    }  }}

Zed

Add to ~/.config/zed/settings.json:

json
{  "context_servers": {    "preflight": {      "command": {        "path": "npx",        "args": ["preflight-ios-mcp"],        "env": {          "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"        }      }    }  }}

Any MCP-Compatible Client

Preflight uses the standard MCP stdio transport. Configure your client to run:

bash
npx preflight-ios-mcp

Set the PATH environment variable to include idb's location for cursor-free touch injection.

Tools Reference

Observation (6 tools)

ToolDescription
simulator_screenshotTake a JPEG screenshot optimized for AI chat (~200-400KB). Returns image inline.
simulator_list_devicesList simulators with name, UDID, state, runtime. Filter: booted, available, all.
simulator_list_appsList installed apps with bundle IDs. Toggle includeSystem for system apps.
simulator_app_infoGet app metadata: name, version, bundle path, data path, type.
simulator_get_clipboardRead the simulator's clipboard text.
simulator_get_screen_infoWindow geometry, coordinate mapping, scale factor. Debug tap accuracy.

User Interaction (6 tools)

ToolDescription
simulator_tapTap at (x, y) in simulator screen points. Cursor-free via idb.
simulator_swipeSwipe between two points. Supports edge-swipe-back from x=1.
simulator_long_pressLong press with configurable duration. Context menus, drag initiation.
simulator_type_textType text into the focused field.
simulator_press_keyPress special keys (return, escape, arrows, F-keys) with modifiers.
simulator_navigate_backNavigate back via Cmd+[. Workaround for edge-swipe limitations.

Playwright-Inspired (3 tools)

ToolDescription
simulator_snapshotPreferred over screenshots. Structured accessibility tree — roles, labels, values, positions. No vision model needed. Like Playwright's browser_snapshot.
simulator_wait_for_elementWait for an element to appear (by label, role, or text). Polls with configurable timeout. Like Playwright's browser_wait_for.
simulator_element_existsQuick boolean check: does an element matching criteria exist on screen right now?

Device Management (6 tools)

ToolDescription
simulator_bootBoot a device by name or UDID. Optional waitForBoot polling.
simulator_shutdownShut down a running simulator.
simulator_eraseFactory reset — erases all content and settings.
simulator_open_urlOpen URLs or deep links (e.g., myapp://screen).
simulator_open_simulatorOpen the Simulator.app application.
simulator_get_booted_sim_idGet the UDID of the currently booted simulator.

App Management (4 tools)

ToolDescription
simulator_launch_appLaunch by bundle ID with optional args and env vars.
simulator_terminate_appForce-terminate a running app.
simulator_install_appInstall a .app bundle or .ipa from a local path.
simulator_uninstall_appUninstall by bundle ID.

Debugging & Diagnostics (9 tools)

ToolDescription
simulator_get_logsQuery device logs. Filter by process, subsystem, level, time range, message content.
simulator_stream_logsLive log streaming with start/read/stop lifecycle. Configurable buffer.
simulator_get_app_containerGet filesystem path to app's bundle, data, or shared group container.
simulator_list_app_filesBrowse an app's Documents/, Library/, Caches/, tmp/ directories.
simulator_read_app_fileRead plists (→JSON), SQLite (→schema), and text files from app data.
simulator_get_crash_logsRetrieve crash reports with stack traces and thread states.
simulator_diagnoseXcode version, disk usage, booted devices, system info.
simulator_accessibility_auditFull iOS accessibility tree — real UIButton/UILabel elements with labels, frames, roles.
simulator_describe_pointReturns the accessibility element at given coordinates.

System Simulation (5 tools)

ToolDescription
simulator_set_locationSet GPS coordinates (lat/lng). Test location-based features.
simulator_send_pushSend push notifications with full APNs payload JSON.
simulator_set_clipboardSet the simulator clipboard text.
simulator_add_mediaAdd photos/videos to the camera roll from local files.
simulator_grant_permissionGrant, revoke, or reset permissions (camera, location, photos, contacts, microphone, etc.).

UI Configuration (4 tools)

ToolDescription
simulator_set_appearanceSwitch between light and dark mode.
simulator_override_status_barSet time, battery, signal, carrier, network type.
simulator_record_videoStart screen recording. On stop, key frames are extracted as images for AI chat.
simulator_stop_recordingStop recording. Returns key frames inline (no disk clutter). Optional savePath to keep the video.

Advanced Debugging & Testing (18 tools)

ToolDescription
simulator_set_content_sizeSet Dynamic Type preferred size (13 categories from extra-small to accessibility-XXXL).
simulator_set_increase_contrastToggle Increase Contrast accessibility setting.
simulator_location_scenarioRun predefined GPS routes: Freeway Drive, City Run, City Bicycle Ride.
simulator_location_routeSimulate movement along custom waypoints with configurable speed.
simulator_memory_warningTrigger simulated memory warning (didReceiveMemoryWarning).
simulator_keychainAdd root certificates, add certificates, or reset the device keychain.
simulator_icloud_syncTrigger iCloud synchronization on the device.
simulator_verbose_loggingEnable/disable verbose device logging for deep debugging.
simulator_install_app_dataInstall .xcappdata packages to restore test data snapshots.
simulator_get_envRead environment variables from the running simulator.
simulator_biometricEnroll, unenroll, match, or fail Face ID / Touch ID for auth testing.
simulator_network_statusGet network configuration — DNS, interfaces, connectivity status.
simulator_defaults_readRead UserDefaults from inside the simulator (inspect app prefs, feature flags).
simulator_defaults_writeWrite UserDefaults inside the simulator (set flags, inject test config).
simulator_rotateRotate the simulator left or right.
simulator_notify_postPost a Darwin notification to trigger system events.
simulator_set_localeSet device locale for internationalization testing.
simulator_trigger_siriInvoke Siri for voice command testing.

Accessibility Settings (4 tools)

ToolDescription
simulator_set_reduce_motionToggle Reduce Motion accessibility setting (via defaults write + notification).
simulator_set_smart_invertToggle Smart Invert Colors (via defaults write + notification).
simulator_set_bold_textToggle Bold Text (via defaults write + notification).
simulator_set_reduce_transparencyToggle Reduce Transparency (via defaults write + notification).

Device Creation & Management (4 tools)

ToolDescription
simulator_create_deviceCreate a new simulator with device type and runtime.
simulator_delete_devicePermanently delete a simulator device.
simulator_rename_deviceRename an existing device.
simulator_clone_deviceClone a device with all its state.

StoreKit Testing (6 tools) — Xcode 14-16

ToolDescription
simulator_storekit_configEnable or disable StoreKit test mode.
simulator_storekit_transactionsList all StoreKit test transactions.
simulator_storekit_delete_transactionsClear all test transactions.
simulator_storekit_manage_subscriptionExpire or force-renew a subscription.
simulator_storekit_manage_transactionRefund, approve, or decline ask-to-buy transactions.
simulator_storekit_reset_eligibilityReset introductory offer eligibility for all products.

Network Testing (2 tools)

ToolDescription
simulator_network_conditionApply network throttling with presets (3G, LTE, Edge, WiFi, 100% loss) or custom bandwidth/latency/loss.
simulator_network_captureCapture network activity summary — active connections, DNS, interfaces.

Debugging & Profiling (5 tools)

ToolDescription
simulator_leak_checkCheck a running app for memory leaks via Apple's leaks tool.
simulator_heap_infoDump heap allocation summary — object counts by class, total memory.
simulator_vmmapShow virtual memory map — regions, sizes, permissions.
simulator_sample_processSample a process for CPU hotspot detection and hang analysis.
simulator_thermal_stateSimulate thermal pressure state changes (nominal, fair, serious, critical).

Architecture

src/├── index.ts                    # MCP server entry, 82 tool registrations├── helpers/│   ├── idb.ts                  # Facebook idb CLI wrapper (cursor-free touch)│   ├── simctl.ts               # xcrun simctl command wrapper│   ├── applescript.ts          # Keyboard input + CGEvent fallback│   ├── coordinate-mapper.ts    # Simulator points → macOS screen coords│   ├── mouse-events.swift      # Native Swift CGEvent binary (fallback)│   └── logger.ts               # Structured stderr logging└── tools/    ├── screenshot.ts           # JPEG capture optimized for AI chat    ├── interaction.ts          # Tap, swipe, long press, type, key    ├── device.ts               # Boot, shutdown, erase, open URL    ├── app.ts                  # Install, launch, terminate, list    ├── system.ts               # Location, push, clipboard, media, permissions    ├── ui.ts                   # Appearance, status bar, video recording, navigate back    ├── debug.ts                # Logs, files, crash reports, accessibility    ├── advanced.ts             # Dynamic Type, keychain, iCloud, biometric, defaults, accessibility, rotation, locale    ├── storekit.ts             # StoreKit testing — transactions, subscriptions, eligibility    ├── network.ts              # Network conditioning (dnctl/pfctl) and capture    ├── profiling.ts            # Memory profiling — leaks, heap, vmmap, sample, thermal    └── playwright.ts           # Snapshot, wait_for_element, element_exists

Design Philosophy

Accessibility-first, like Playwright MCP:

  1. Use simulator_snapshot to understand the screen (structured text, no vision model)
  2. Use coordinates from the snapshot to simulator_tap, simulator_swipe, etc.
  3. Use simulator_screenshot when you need visual verification
  4. Use simulator_wait_for_element before interacting with elements that appear after transitions

No disk clutter:

  • Screenshots return as base64 in chat — no folders filling up your Desktop
  • Video recordings extract key frames as inline images on stop
  • Optional savePath parameter if you actually need files on disk

Touch Injection Pipeline

simulator_tap(x=200, y=400)    │    ├─ idb available? ──YES──► idb ui tap --udid <UDID> 200 400    │                           (IndigoHID → real iOS touch event)    │                           (zero cursor movement)    │    └─ idb unavailable? ──► coordinate mapper → macOS screen coords                             → Swift CGEvent binary → mouse down/up

Demo App

A SwiftUI demo app is included in demo-app/ for testing all MCP features:

bash
cd demo-appxcodebuild -project MCPDemo.xcodeproj -scheme MCPDemo \  -destination 'platform=iOS Simulator,name=iPhone 16 Pro' \  build

The demo app has 7 tabs exercising every tool category:

  • Interactions: Buttons, text fields, long-press zones, navigation stack, scrollable lists
  • Location: Live GPS display for testing simulator_set_location
  • Notifications: Push notification display for testing simulator_send_push
  • Settings: Clipboard, file I/O, accessibility toggles, UserDefaults
  • StoreKit: Mock purchases and subscriptions for testing StoreKit tools
  • Network: Connection monitoring and latency testing for network conditioning
  • Debug: Memory/CPU stress tests, thermal state, accessibility settings observer, biometric auth

Configuration

Environment Variables

VariableDefaultDescription
LOG_LEVELinfoLogging level: debug, info, warn, error
PREFLIGHT_FILTERED_TOOLS(none)Comma-separated list of tool names to disable
PREFLIGHT_IDB_PATH(auto-detect)Custom path to idb binary
PATHSystem PATHMust include idb binary location

Example Prompts

QA Testing

"Boot the iPhone 16 Pro simulator, install my app at ./build/MyApp.app, launch it, and take a screenshot of the home screen. Then tap the login button, type [email protected] in the email field, and verify the form validation works."

Accessibility-First Workflow (Playwright-style)

"Take a snapshot of the current screen to see what elements are available. Then tap the button labeled 'Sign In' and wait for the email text field to appear."

Debugging

"My app is crashing on launch. Check the crash logs for MyApp, then get the last 5 minutes of device logs filtered to the MyApp process."

Dark Mode Testing

"Switch to dark mode, take a screenshot, then switch to light mode and screenshot again."

Troubleshooting

idb not detected

If tools show [CGEvent fallback] instead of [cursor-free]:

  1. Verify idb is installed: which idb or check ~/Library/Python/3.x/bin/idb
  2. Add the idb path to your MCP config's PATH env var
  3. Or set PREFLIGHT_IDB_PATH directly

Simulator not found

  1. Open Simulator.app: open -a Simulator
  2. Boot a device: use simulator_boot or xcrun simctl boot "iPhone 16 Pro"

Accessibility permission errors

  1. Go to System Settings → Privacy & Security → Accessibility
  2. Add your terminal app (Terminal.app, iTerm, Claude Code, Cursor, Windsurf, etc.)

Development

bash
npm run dev    # Watch mode (TypeScript only)npm run build  # Full rebuild (TypeScript + Swift binary)node dist/index.js  # Run directly

License

MIT License — see LICENSE for details.

來源:README.md,提交 cbf72b1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Preflight 整合