by leeguooooo
Let AI agents (Claude Code, Codex, any MCP client) drive a real iPhone · 让 AI agent 操作真实 iPhone:读屏、点击、输入、滑动,USB 或 Wi-Fi,自有 XCTest runner,可回放的 App flow。Open source, self-hosted on macOS.
# Add to your Claude Code skills
git clone https://github.com/leeguooooo/iphone-useSee how iphone-use compares with popular alternatives.
iphone-use is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by leeguooooo. Let AI agents (Claude Code, Codex, any MCP client) drive a real iPhone · 让 AI agent 操作真实 iPhone:读屏、点击、输入、滑动,USB 或 Wi-Fi,自有 XCTest runner,可回放的 App flow。Open source, self-hosted on macOS. It has 139 GitHub stars.
iphone-use's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/leeguooooo/iphone-use" and add it to your Claude Code skills directory (see the Installation section above).
iphone-use is primarily written in Rust. It is open-source under leeguooooo on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh iphone-use against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
curl -fsSL https://raw.githubusercontent.com/leeguooooo/iphone-use/main/install.sh | sh
https://github.com/user-attachments/assets/f1e6574d-3134-4c23-9092-4b51bc79af2c
2-minute demo · 中文版
Open Health and tell me how many steps I walked each day this week.
Find the newest message from Mom in WeChat and read it to me.
Collect every transaction on this bank statement page, all the way to the end.
Write this 2,000-word draft into a new note in Notes.
Run my app's login test on the real phone and tell me which step fails.
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. Logins, passcodes and Face ID go to you: the agent stops and asks, and never asks for the secret.
You need
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 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.
iphone-use status # is the phone ready for agents?
iphone-use doctor # what is missing, and how to fix it
iphone-use setup # set the phone up again (after a new iPhone or Xcode)
iphone-use try # a harmless check: open Settings, read the screen, go Home
iphone-use login # sign a browser in again, with a QR code for the iPhone
iphone-use upgrade # update everything
Paste this into Codex or Claude Code on the Mac the iPhone is plugged into:
Install iphone-use (https://github.com/leeguooooo/iphone-use) on this Mac so you can drive my iPhone.
1. Run: curl -fsSL https://raw.githubusercontent.com/leeguooooo/iphone-use/main/install.sh | sh
2. Run `iphone-use doctor`. Fix what it reports that can be fixed from the terminal, and run
`iphone-use setup` when it tells you to.
3. Some steps only I can do: signing in to an Apple ID in Xcode, tapping Trust on the iPhone,
turning on Developer Mode, unlocking the phone. For those, stop, tell me exactly what to do,
and wait until I say it is done. Never ask me for a password or a code.
4. Run `iphone-use doctor` again until nothing is missing, then `iphone-use try`.
5. If the phone_* tools are not loaded in this chat yet, tell me to start a new chat.
Adds the skill and the MCP server; it still needs the install above:
codex plugin marketplace add leeguooooo/iphone-use && codex plugin add iphone-use@iphone-use
Product guide: installation, MCP setup, flows and comparison
The same daemon that serves agents lets you drive the phone yourself:
Nothing on the Mac moves while you do it: no window takes focus and the cursor stays put.
A daemon on your Mac drives the phone and offers the same control in three forms:
/agent/*);The installer registers the MCP server with Claude Code and Codex when they are present. Any other MCP client needs only the command; on this Mac the server finds the daemon and its token by itself:
{
"mcpServers": {
"iphone-use": {
"command": "/Users/YOU/Applications/iPhoneUse.app/Contents/MacOS/iphone-use-mcp"
}
}
}
Or call the HTTP API directly:
AUTH="Authorization: Bearer $TOKEN"; CTL="X-Phone-Control: 1"
curl -s -H "$AUTH" $HOST/agent/elements # the screen as text + a snapshot token
curl -s -H "$AUTH" -H "$CTL" -X POST "$HOST/agent/input?return=delta" \
-d '{"type":"tap","element":7,"snapshot":"…"}' # tap, then what changed (~2 s)
See the MCP tools and the Agent API reference.
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 流程 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).
MCP=~/Applications/iPhoneUse.app/Contents/MacOS/iphone-use-mcp
$MCP flow update # sync the registry (sha256-checked)
$MCP flow list # what is available
$MCP flow run health/export-all-zh-cn # replay one; failures say which step and why
$MCP flow draft --out my-task.json # what you just did on the phone, as a draft flow
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.
iphone-use drives the phone through its own XCTest runner (runner/). It speaks the WebDriverAgent HTTP API, and it is built for speed:
Measured on th