iPhone Use
io.github.leeguooooo由 GitHub 帳號 leeguooooo 發布v0.28.1更新於 Nov 7, 2026
Drive a real iPhone from a Mac: read the screen as text, tap, type, scroll, replay saved flows.
概覽
讓 AI 助理從 Mac 操控真實 iPhone:以文字讀取螢幕、點擊、輸入、滑動,並在任何 App 中重播已儲存的流程。
- 可以做什麼
- 以無障礙樹讀取螢幕並檢視元素,包括主畫面版面
- 點擊、輸入長文字、滑動、捲動,並依名稱啟動 App,每個動作都會回報是否真正生效
- 擷取螢幕截圖並存到照片,讀取裝置日誌與當機報告
- 錄製、列出並重播已儲存的流程,執行測試套件與排程工作
- 安裝建置檔、設定模擬位置,並為各 App 保存供助理讀取的備註
- 沒有實機時,可用相同方式驅動 iOS 模擬器
- 適用情境
- 適合需要助理操作沒有 API 的 App(例如健康、銀行、聊天類或自家待測 App)的情境,也適合想以可重複的流程與測試套件取代手動點擊的場合。
- 執行需求
- 需要 macOS 15 或更新版本的 Mac、已登入 Apple ID 的 Xcode,以及 iOS 15 或更新版本、已開啟開發者模式的 iPhone,首次設定需 USB 線。透過 shell 腳本安裝,守護程序在本機執行,MCP 用戶端指向已安裝的執行檔。選用變數包括 IPHONE_USE_MCP_TOOLS、IPHONE_USE_BLOCKED_APPS、IPHONE_USE_MAX_ACTIONS 與 IPHONE_USE_MCP_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 iPhone Use,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
iphone-use
Let AI agents use your real iPhone.
Claude Code, Codex or any MCP client reads the screen as text, taps, types and swipes in any app, including the ones with no API.
[Latest release] [PR checks] [License: PolyForm Shield 1.0.0] [Platform: macOS 15+] [iPhone: iOS 15+] [Glama MCP server ratings] [Built with Rust] [MCP server]
English · 简体中文
Website and docs: iphone-use.leeguoo.com
https://github.com/user-attachments/assets/ee298774-bf3e-4fd0-9a08-481b20904f61
1-minute demo, real iPhone recordings · 中文版
Paid setup and project sponsorship
Need help setting up a real iPhone, connecting your agent or creating an iOS app test flow? Email us with your environment, the workflow and expected result, and where you are stuck. We review feasibility and agree on scope, acceptance criteria and a quote before work starts.
Ask about paid setup · Discuss sponsorship · [email protected]
Want to support ongoing maintenance? Email us to discuss a one-time or recurring contribution.
Community bug reports and feature requests remain welcome on GitHub. Please keep credentials and private account data out of inquiries.
MCP calls can choose an installed local instance with instance:"i13" (including
phone_status and input tools); phone_instances lists them without reconnecting.
Omit it to keep the configured daemon. Missing instances fail without selecting a
different phone. See per-call instance routing.
Why iphone-use
- Any app, no API needed. It works on Health, banking and payment apps (even the ones that black out screen capture), chat apps and your own app under test.
- USB or Wi-Fi. Set the phone up once with a cable; after that it can be driven over Wi-Fi through an encrypted tunnel.
- Old iPhones too. iOS 15 and later, without updating the phone.
- Fast. Its own XCTest device runner reads the screen in about 0.1 s. A tap that returns the settled screen takes about 1.9 s (numbers).
- Honest results. Every action reports whether it was applied, not sent, or unknown, and whether a retry is safe. Taps on covered elements are refused, not passed off as done.
- Replayable flows. A task done once becomes a flow that replays in one call, with no model and no tokens.
- Remote control for people, too. Drive the phone yourself from a browser or another iPhone, on the LAN or from anywhere: a live H.264 screen, mouse and keyboard, and pairing by QR code. Agents and people share one phone without stepping on each other (details).
- Watch the agent live. The phone's screen shows in the agent host's side panel (where MCP Apps is supported), in a browser, or in the iOS app.
- Nothing on the Mac moves. It never touches the Mac's screen, cursor or focus.
What you can ask
The agent finds an app by its name (launch_app {"app": "Health"}) and types long text (up to 20,000 characters) in one step. It can read a list across pages and say whether it reached the end.
How it works
One daemon per phone runs on the Mac. It reads the screen as an accessibility tree (text, not pixels), sends taps and typing through a small XCTest runner it installs on the phone, and checks that the screen has settled before it answers. Agents and people go through the same daemon, and one of them holds the phone at a time.
Install
You need
- A Mac with macOS 15 or later, and Xcode signed in to an Apple ID (a free one works).
- An iPhone with iOS 15 or later and Developer Mode on (Settings → Privacy & Security → Developer Mode).
- A USB cable for the first setup. Plug the iPhone in and unlock it before you install.
The installer then sets the phone up and shows an agent opening Settings and reading it. It registers the MCP server with Claude Code and Codex, and with Cursor and Claude Desktop when they are installed (IPHONE_USE_NO_CLIENT_SETUP=1 skips those two), and opens the control page in your browser with a one-time sign-in, so there is no password to copy. If anything is missing, it says what and how to fix it.
Or ask your agent to install it
Paste this into Codex or Claude Code on the Mac the iPhone is plugged into:
Codex and Claude Code plugins
Each adds the skill and the MCP server; they still need the install above:
In Claude Code:
Remote control for people
The same daemon that serves agents lets you drive the phone yourself:
- From a browser. The live screen arrives as H.264 encoded on the phone: native resolution at about 50 fps on the LAN, and a lighter mode for slow links. Click to tap, drag to swipe, hold to long-press, scroll with the wheel or trackpad. Type straight into the phone with your input method, and ⌘V pastes. The Controls panel lists the screen's elements so you can tap by label, and the Flow panel records what you do as a replayable flow. The page follows your browser's language (English or Chinese), with a switch in the sidebar.
- From another iPhone. The native iOS app (minimum deployment target iOS 15) pairs by scanning a QR code on the Mac's page, with no address or password to type. It plays the screen with the hardware decoder and switches between your phones. Install it with
iphone-use setup-app, which signs it with your own team; with a paid team the app also controls its own phone with no Mac (details). - Screens hidden from capture. Banking and payment apps black out screen capture; there you see a live wireframe of the screen's elements instead of a blank picture, and you can still tap through it.
- From anywhere. Reach the Mac through an authenticated HTTPS reverse proxy or a VPN such as Tailscale, and control the phone from outside your network (security notes).
- No collisions. A phone has one owner at a time. While you are in control, an agent waits or is told who holds the phone, and the reverse is true too.
Nothing on the Mac moves while you do it: no window takes focus and the cursor stays put.
Use it from an agent
To save a screenshot on the phone for use in another app, call
phone_shortcut {"name":"save_screenshot"}. It requests an iOS system capture
in Photos; check the new image before claiming it saved. phone_screenshot
returns an image to the caller. Saving requires an updated native Runner.
A daemon on your Mac drives the phone and offers the same control in three forms:
- an MCP server for Claude Code, Codex, Claude Desktop, Cursor and other MCP clients;
- an HTTP API for agents and scripts (
/agent/*); - a web page and a native iOS app for people (remote control).
The installer registers the MCP server with Claude Code, Codex, Cursor and Claude Desktop when they are present (IPHONE_USE_NO_CLIENT_SETUP=1 leaves Cursor and Claude Desktop alone). Any other MCP client needs only the command; on this Mac the server finds the daemon and its token by itself:
Config for Cursor, VS Code, Claude Desktop, Gemini CLI, opencode, Windsurf
Use the absolute path (replace YOU) and merge the entry into the file; keep the servers already there.
-
Cursor:
~/.cursor/mcp.json(or.cursor/mcp.jsonin a project), themcpServersblock above. -
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json, themcpServersblock above; quit and reopen the app. -
Gemini CLI:
~/.gemini/settings.json(or.gemini/settings.jsonin a project), themcpServersblock above. -
Windsurf / Devin Desktop:
~/.codeium/windsurf/mcp_config.json(newer builds:~/.config/devin/mcp_config.json), themcpServersblock above. -
VS Code / Copilot:
.vscode/mcp.jsonin a workspace, or MCP: Open User Configuration for every workspace. The key isservers: -
opencode:
~/.config/opencode/opencode.json(oropencode.jsonin a project). The key ismcpand the command is an array:
Or call the HTTP API directly:
For app developers and testers the same tools also read the phone's logs and crash reports, record the screen to MP4, install a build (.ipa, .app or an https link), set a simulated location, and keep per-app notes that agents read when they enter the app. IPHONE_USE_MCP_TOOLS=readonly exposes only the tools that read, and iphone-use-mcp --listen 127.0.0.1:PORT serves MCP over HTTP. A loopback listener is reachable only from the same Mac; for a client on another machine, put it behind an authenticated tunnel, or listen on another address with IPHONE_USE_MCP_TOKEN set (it is required off loopback).
No phone at hand? While you develop, drive an iOS Simulator the same way (preview, needs Xcode): iphone-use simulator start "iPhone 16 Pro" builds and starts everything, then point the agent at it with claude mcp add iphone-sim -e IPHONE_USE_INSTANCE=sim -- iphone-use-mcp. See Simulators.
See the MCP tools and the Agent API reference.
Safety and privacy
- Secrets stay with you. For logins, passcodes and Face ID the agent stops and asks you to finish on the phone. It never asks for the password or the code.
- Limits the agent cannot talk its way past. The daemon refuses apps you block (
IPHONE_USE_BLOCKED_APPS, for exampleWallet, Passwords) and caps the actions per task (IPHONE_USE_MAX_ACTIONS), whatever the agent's prompt says (details). - You see what it does. The web page shows each action over the live screen in plain words, for example
Tapped “Wi-Fi”. Typed text is never kept, only its length. - Local by default. The daemon listens on
127.0.0.1:44321behind a password, and the runner on the phone accepts only requests signed with a per-launch token. The iOS 15/16 LAN path is unencrypted (security). - No telemetry. This build sends no usage data (telemetry · privacy policy).
phone_home_layout reads the paired phone's persisted home pages, Dock,
folders and widget stacks without opening folders or taking screenshots.
Use page to limit the response. Its page indexes include hidden/Focus-filtered
pages; use fresh UI elements before dragging, rather than treating grid slots
as screen coordinates.
Flows: do a task once, replay it with no model
Tasks you repeat are kept as flows: reviewed per-app scripts that replay without a model, so they cost no tokens. The official registry is leeguooooo/iphone-use-flows. Record a flow in the browser's Flow panel and publish it there with a PR.
Agents find flows on their own: when one enters an app, the response lists that app's flows. After an agent does a multi-step task in an app that has none, it asks whether to save the task as a flow; the daemon has already recorded the steps as a draft. The daemon keeps the registry fresh by itself (IPHONE_USE_FLOWS_NO_AUTO_UPDATE=1 turns that off, IPHONE_USE_FLOWS_NO_SUGGEST=1 silences the save suggestions).
Flows also make rerunnable test suites ($MCP test suite.yaml, with an exit code ready for CI) and scheduled runs the daemon starts on a cron line ($MCP schedule add): see Testing and scheduled runs.
Speed
iphone-use drives the phone through its own XCTest runner (runner/). It speaks the WebDriverAgent HTTP API, and it is built for speed:
- It reads the screen with one accessibility snapshot of a fixed attribute set, instead of walking the element tree attribute by attribute.
- It synthesizes touches directly and does not wait for the app to go idle before acting; the daemon checks afterwards that the screen has settled.
- It is one small app with a built-in HTTP server and MJPEG stream; there are no extra dependencies on the phone.
Measured on the same iPhone 13 over USB, against agent-device (October 2026):
Through the full agent API, a tap by label that returns the settled change takes about 1.9 s on an iPhone 17 Pro Max; the WebDriverAgent-based release took 4.2 s. The live view streams at 27–28 fps. Each phone gets its own daemon and runner, so two phones driven at the same time run as fast as either one alone.
More
- Full guide: browser and iOS app, flows and the flow registry, Wi-Fi and iOS 15/16, lifecycle, configuration, security, development.
- Agent API reference · MCP tools · Architecture · Device setup pitfalls · Device runner · Privacy
- Product guide: installation, MCP setup, flows and how it compares.
- Issues and ideas: GitHub issues.
Related MCP servers
- iPhone MCP: another macOS MCP server for real iPhones and simulators.
- ios-mcp: iPhone and iOS Simulator automation through an observe/act/verify loop.
iphone-use focuses on a real device runner, explicit action outcomes and deterministic flow replay. These are independent alternatives, not dependencies or endorsements.
License
PolyForm Shield 1.0.0. This project is source-available. Non-competing use, modification and distribution are permitted subject to the license; using the software to provide a competing product or service, including a free one, is prohibited. See licensing scope and third-party notices.
The *-use family
Small, composable CLIs that give an AI agent hands on one real thing. Same shape
everywhere: curl … install.sh | sh to install, JSON on stdout, and a companion
skill that teaches your agent to drive it — each repo's own README says how to
install its skill, since the right way differs per project and per release.
Author
Built by 郭立 (Guo Li / leeguoo) — leeguoo.com · GitHub · X · more tools in the *-use family.
Focused reads and action receipts
phone_subtree reads one native element’s descendants with explicit coverage;
its local positions are read-only. Action responses separate delivery from UI
verification and include structured recovery strategies. phone_run_start with
trace=true enables a bounded, redacted timeline, available through
phone_run_trace; it contains no typed values or screenshots. These native
checks and subtree reads require an updated runner. See the
agent reference.
Activity history never stores click geometry, input identifiers or keypad keys. Green feedback uses only the latest nonsensitive named target, bound to the live owner/privacy scope, erased after 1.5 seconds and excluded from history.
來源:README.md,提交 544c348
工具
0版本歷史
29- v0.28.1最新Nov 7, 2026
- v0.27.40Nov 5, 2026
- v0.27.39Nov 4, 2026
- v0.27.38Nov 4, 2026
- v0.27.36Nov 4, 2026
- v0.27.35Nov 3, 2026
- v0.27.34Nov 3, 2026
- v0.27.31Nov 1, 2026
- v0.27.28Nov 1, 2026
- v0.27.24Nov 1, 2026
- v0.27.21Oct 31, 2026
- v0.27.18Oct 31, 2026
- v0.27.16Oct 30, 2026
- v0.27.15Oct 30, 2026
- v0.27.11Oct 30, 2026
- v0.27.8Oct 30, 2026
- v0.27.7Oct 29, 2026
- v0.25.3Oct 26, 2026
- v0.24.1Oct 26, 2026
- v0.23.0Oct 24, 2026
- v0.22.3Oct 23, 2026
- v0.22.2Oct 23, 2026
- v0.22.1Oct 22, 2026
- v0.22.0Oct 22, 2026
- v0.20.2Oct 19, 2026
- v0.20.1Oct 19, 2026
- v0.19.2Oct 17, 2026
- v0.19.1Oct 15, 2026
- v0.18.0Oct 15, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。