iPhone Mirror

io.github.nickatnight96由 GitHub 帳號 nickatnight96 發布v1.0.1更新於 Oct 24, 2026

Drive a real iPhone via macOS iPhone Mirroring; Xcode build/test automation for sims and devices.

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

概覽

AI 產生的概覽

僅限 macOS 的 MCP 伺服器,讓助理透過 iPhone 鏡像操控已配對的 iPhone,並在模擬器與實機上建置、測試和啟動 Xcode 應用程式。

可以做什麼
檢查工作階段健康狀態,啟動或重新啟動鏡像工作階段,並以診斷指令驗證權限與輸入是否確實送達。透過截圖、標註截圖、OCR 讀取畫面、文字與影像尋找以及螢幕錄影檢視畫面內容。等待文字或畫面變化,並捲動至指定元素。送出點擊、雙擊、長按、滑動、拖曳、輸入文字、貼上文字、按鍵、搖晃與批次操作等輸入。使用主畫面、App 切換器、Spotlight、啟動 App 與開啟網址進行導覽,並處理通知。建置、測試並收集 Xcode 結果,在實機與模擬器上安裝、啟動、檢視資訊及解除安裝 App。
適用情境
當你想讓助理在 Mac 上操作一台真實 iPhone,而不越獄、不在手機上安裝任何東西時使用,例如檢視 App 顯示的內容、執行點擊並斷言的循環,或在模擬器與實機上自動化 Xcode 建置、測試與安裝流程。
執行需求
macOS 15 或更新版本並啟用 iPhone 鏡像,配對的 iPhone 需為 iOS 18 或更新版本、在附近、處於鎖定狀態且登入同一個 Apple 帳號。Xcode 相關、實機與模擬器工具需要 Xcode。需向啟動伺服器的 App 授予輔助使用與螢幕錄製權限。以本機程序透過 stdio 執行,安裝指令碼會建置發行版二進位檔。
安裝前請注意
鏡像啟用期間,它可以檢視並控制 Mac 所配對的 iPhone,等同於把已解鎖的手機交給模型,只應從可信任的用戶端執行。貼上的文字會短暫寫入 Mac 剪貼簿,剪貼簿內容也可被讀取。手機被解鎖或拿起時工作階段會暫停。安裝包為臨時簽署,未經公證。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

iphone-mirror-mcp

[CI] [License: MIT] [Platform: macOS 15+] [Swift 6] [Listed on mcpservers.org] [Clones] [Views]

Let any LLM drive a real iPhone.

An MCP server that controls a physical iPhone through the built-in macOS iPhone Mirroring app, and automates Xcode development testing — build, test, install, and launch on simulators and devices, then operate the app on the mirrored screen with taps, swipes, typing, and OCR.

No jailbreak. Nothing installed on the phone. No XCUITest target.

run_on_iphone (build → install → launch on the paired iPhone)   → screenshot / read_screen / tap / paste_text     drive the app on-device   → wait_for_text / tap with expect / sim_log       assert what the user sees

63 tools. Works with Claude, GPT, Gemini, local models — anything that speaks MCP over stdio.


Quick start

sh
git clone https://github.com/nickatnight96/iphone-mirror-mcp.gitcd iphone-mirror-mcp./install.sh

The installer checks your machine, builds a release binary, verifies permissions end to end, and prints the exact config for your client.

Then, for Claude Code:

sh
claude mcp add --scope user iphone-mirror -- ~/.local/bin/iphone-mirror-mcp

Or for any other MCP client:

json
{  "mcpServers": {    "iphone-mirror": {      "command": "/Users/YOU/.local/bin/iphone-mirror-mcp"    }  }}

Ask your model:

Take a screenshot of my iPhone and tell me what app is open.

Or grab the .mcpb bundle from the latest release if your client installs MCP bundles and you would rather skip the toolchain (see the caveats — it is ad-hoc signed but not notarized).

→ Full getting-started guide · per-client config

Requirements

  • macOS 15+ with iPhone Mirroring, paired to an iOS 18+ iPhone (nearby, locked, same Apple Account)
  • Xcode — for the xcode_*, device_*, and sim_* tools
  • Accessibility and Screen Recording permission, granted to the app that launches the server (your terminal, or the desktop app hosting your client) — details

Check everything at once:

sh
iphone-mirror-mcp doctor

It tests all four permissions, captures a real frame, and confirms macOS is actually delivering synthetic input — rather than just reading permission flags. Run it before you suspect anything else.

What it can do

Session & healthstatus, doctor, mirror_launch, mirror_restart
See the screenscreenshot, annotated_screenshot (every element boxed + numbered), read_screen (OCR with tappable centers), find_text, find_image, record_screen
Wait properlywait_for_text, wait_for_screen_change, scroll_to
Inputtap (with expect verification), double_tap, long_press, swipe, drag, type_text, paste_text (emoji/CJK via clipboard), read_clipboard, press_key, shake, batch
Navigatehome, app_switcher, spotlight, launch_app, open_url
Notificationsnotifications, notification_click
Xcodexcode_list, xcode_build, xcode_test, xcresult_attachments
Real devicesrun_on_iphone, devices, device_install, device_launch, device_info, device_apps, device_uninstall
Simulatorsrun_on_sim plus the full simctl belt — push, GPS, privacy grants, status bar, appearance, logs, media

→ Complete tool reference — all 63, with parameters, generated from the server's own catalog so it cannot drift.

Coordinate contract

Every x/y is a pixel position in the most recent screenshot, origin top-left. At input time the window bounds are re-queried and the pixel maps proportionally into the current bounds — so a window that moved or was resized between screenshot and tap still receives the tap in the right place.

Documentation

Getting startedInstall → permissions → first tap
Connecting a clientClaude Code, Claude Desktop, Cursor, VS Code, Zed, Codex, Windsurf
Tool referenceAll 63 tools and their parameters
RecipesDriving an app, the on-device test loop, notifications, batching
TroubleshootingSymptoms → causes → fixes
ArchitectureHow input actually reaches the phone
LimitationsWhat this genuinely cannot do

Known limitations

Tested, not guessed — the full list explains why.

  • Pinch and rotate cannot be synthesized. Trackpad gestures do not travel the CGEvent pipeline; an event tap sees nothing during a physical pinch, so there is nothing to reproduce.
  • One phone at a time — device switching has no scriptable menu.
  • The session pauses whenever the phone is unlocked or picked up. Apple's design; resuming needs it locked again.
  • No accessibility tree — OCR and template matching are the element model. Face ID, Control Center, and hardware buttons are unreachable, and DRM content captures black.

Security

This server can see and control whatever iPhone the Mac is paired with while mirroring is active. Treat it like handing your unlocked phone to the model. Run it only from clients you trust.

The phone locks the session the moment it is picked up or unlocked physically, which is a real kill switch. paste_text briefly places text on the Mac clipboard and restores what was there; read_clipboard reads it.

See SECURITY.md for the trust model and how to report a vulnerability.

Contributing

Issues and pull requests welcome — see CONTRIBUTING.md.

sh
scripts/run_tests.sh                    # build + unit/protocol tests + CLI smokeMIRROR_MCP_LIVE=1 scripts/run_tests.sh  # + live tests (real window, capture, input)

License

MIT

來源:README.md,提交 5a67652

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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