[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-113955":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":38,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":42,"discoverSource":43},113955,"phonedriver","hridaya423\u002Fphonedriver","hridaya423","MCP server and CLI that lets AI agents (Claude Code, Codex, Cursor) see and control Android phones and iPhones. Reads the screen as text. Asks before it pays.","https:\u002F\u002Fphonedriver.dev",null,"Rust",363,36,1,2,0,11,213,277,84,94.67,"GNU Affero General Public License v3.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37],"adb","ai-agents","android","claude-code","cli","ios","mcp","mcp-server","mobile-automation","model-context-protocol","rust","2026-11-23 20:21:15","2026-11-23 20:11:15","\u003Cp align=\"center\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\".github\u002Fassets\u002Fbanner-dark.svg\">\u003Cimg alt=\"phonedriver\" src=\".github\u002Fassets\u002Fbanner-light.svg\" width=\"100%\">\u003C\u002Fpicture>\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">Give your AI agent a phone.\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\u003Cb>6.9x fewer tokens than mobile-mcp.\u003C\u002Fb>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"LICENSE\">\u003Cimg alt=\"License: AGPL-3.0\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-AGPL--3.0-6b675e?style=flat-square&labelColor=161512\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fphonedriver\">\u003Cimg alt=\"npm\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fphonedriver?style=flat-square&labelColor=161512&color=6b675e\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhridaya423\u002Fphonedriver\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg alt=\"CI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fhridaya423\u002Fphonedriver\u002Fci.yml?branch=main&style=flat-square&labelColor=161512&label=ci\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fphonedriver.dev\">phonedriver.dev\u003C\u002Fa> · \u003Ca href=\"docs\u002Freference.md\">Reference\u003C\u002Fa> · \u003Ca href=\"docs\u002Fbench\u002Fjobs.md\">Benchmarks\u003C\u002Fa> · \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhridaya423\u002Fphonedriver\u002Freleases\">Releases\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Ca href=\"README.md\">English\u003C\u002Fa> · \u003Ca href=\"README.zh-CN.md\">简体中文\u003C\u002Fa> · \u003Ca href=\"README.ja.md\">日本語\u003C\u002Fa> · \u003Ca href=\"README.ko.md\">한국어\u003C\u002Fa>\u003C\u002Fp>\n\nphonedriver lets Claude Code, Codex, Cursor or any MCP client use an Android phone or an iPhone. It reads the screen as text, and it asks you before it taps Pay. The 6.9x is the token total on [nine phone jobs](#fewer-tokens).\n\n\u003Cp align=\"center\">\n  \u003Cimg alt=\"The clip opens on phonedriver holding a tap on Buy with GPay and asking the human, then shows the run from the start. Claude Code drives an Android phone through phonedriver on the real dominos.co.uk website. Asked for a large pepperoni pizza from the Domino's nearest Leicester Square, it finds the store, fills the basket and the guest checkout, and taps Buy with GPay. phonedriver holds the tap and asks the human in Claude Code. The human declines and nothing is ordered.\" src=\".github\u002Fassets\u002Fdemo.gif\" width=\"100%\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Csub>One real Claude Code (Opus 5.5) session on an Android emulator, ordering on dominos.co.uk. The clip opens on the approval prompt, then shows the run from the start. The run took 6.5 minutes and is shown at 15x; the approval prompt plays at real speed. Nothing was ordered. \u003Ca href=\".github\u002Fassets\u002Fdemo.mp4\">Full video (MP4)\u003C\u002Fa>.\u003C\u002Fsub>\u003C\u002Fp>\n\n## Start\n\n```sh\nclaude mcp add phonedriver -- npx -y phonedriver mcp\n```\n\nOr install the binary with Homebrew and register that:\n\n```sh\nbrew install hridaya423\u002Ftap\u002Fphonedriver\nclaude mcp add phonedriver -- phonedriver mcp\n```\n\nOr install it as a plugin, which adds the server and its [skill](SKILL.md) together. Use the plugin or `mcp add`, not both, or the tools are listed twice.\n\n```sh\nclaude plugin marketplace add hridaya423\u002Fphonedriver && claude plugin install phonedriver@phonedriver   # Claude Code\ncodex plugin marketplace add hridaya423\u002Fphonedriver && codex plugin add phonedriver@phonedriver         # Codex\n```\n\n\u003Ca href=\"https:\u002F\u002Fcursor.com\u002Fen\u002Finstall-mcp?name=phonedriver&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBob25lZHJpdmVyIiwibWNwIl19\">\u003Cimg alt=\"Add phonedriver to Cursor\" src=\"https:\u002F\u002Fcursor.com\u002Fdeeplink\u002Fmcp-install-dark.svg\" height=\"32\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Finsiders.vscode.dev\u002Fredirect\u002Fmcp\u002Finstall?name=phonedriver&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22phonedriver%22%2C%22mcp%22%5D%7D\">\u003Cimg alt=\"Add phonedriver to VS Code\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVS_Code-Install_server-0098FF?style=for-the-badge\" height=\"32\">\u003C\u002Fa>\n\n\u003Cp>\u003Cimg alt=\"Claude Code\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FClaude%20Code-161512?style=flat-square&logo=claude&logoColor=white\"> \u003Cimg alt=\"Codex\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCodex-161512?style=flat-square\"> \u003Cimg alt=\"Cursor\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCursor-161512?style=flat-square&logo=cursor&logoColor=white\"> \u003Cimg alt=\"VS Code\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVS%20Code-161512?style=flat-square\"> \u003Cimg alt=\"GitHub Copilot\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub%20Copilot-161512?style=flat-square&logo=githubcopilot&logoColor=white\"> \u003Cimg alt=\"Gemini CLI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGemini%20CLI-161512?style=flat-square&logo=googlegemini&logoColor=white\"> \u003Cimg alt=\"Windsurf\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWindsurf-161512?style=flat-square&logo=windsurf&logoColor=white\"> \u003Cimg alt=\"Zed\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FZed-161512?style=flat-square&logo=zedindustries&logoColor=white\"> \u003Cimg alt=\"Cline\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCline-161512?style=flat-square&logo=cline&logoColor=white\"> \u003Cimg alt=\"opencode\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fopencode-161512?style=flat-square&logo=opencode&logoColor=white\">\u003C\u002Fp>\n\nphonedriver is a standard MCP server over stdio, so any MCP client can run it. I test it with Claude Code. Setup for the others: [Other clients](#other-clients).\n\nStart an Android emulator, plug in an Android phone with USB debugging on, or boot the iOS Simulator. Then give Claude a job that only a phone can do:\n\n> Order me a large pepperoni pizza from the Domino's nearest Leicester Square, for collection.\n\n> Open my app, sign up with a new account, and tell me every bug you find on the way. Give me steps to reproduce each one.\n\n> Go through my app's onboarding in dark mode and in light mode, and show me every screen where the text is hard to read.\n\nThe first one is the demo above. phonedriver stops at Buy with GPay and asks you.\n\nThe first run downloads one binary for your machine (macOS, Linux or Windows) and caches it. `phonedriver doctor` checks adb, Xcode and each device and tells you what to fix. The shell and PowerShell installers and real iPhones: [docs\u002Freference.md](docs\u002Freference.md#install).\n\n## Fewer tokens\n\nTokens are what an agent's usage limit is spent on. I ran nine jobs that only a phone can do, twice each, with Claude Sonnet 5.5 and three MCP servers. The jobs included setting Chrome's search engine, cropping a photo, pinning and archiving Messages threads, finding the app that keeps the phone awake, and testing a sign-up flow for planted bugs. A script checked the phone's own data afterwards, not the model's report.\n\n\u003Cp align=\"center\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\".github\u002Fassets\u002Fjobs-dark.svg\">\u003Cimg alt=\"On nine real phone jobs on one Android emulator, 10 November 2026, with Claude Sonnet 5.5: phonedriver passed 27 of 27 runs with 658 thousand tokens in 5.1 minutes; mobile-mcp passed 17 of 18 with 4.6 million tokens in 8.7 minutes; phone-harness passed 14 of 18 with 1.1 million tokens in 22.7 minutes.\" src=\".github\u002Fassets\u002Fjobs-light.svg\" width=\"100%\">\u003C\u002Fpicture>\u003C\u002Fp>\n\nThis is my own test set. All three tools ran on the same Android emulator on 10 November 2026. Every run, the versions, the checks and what was thrown away are published in [docs\u002Fbench\u002Fjobs.md](docs\u002Fbench\u002Fjobs.md). If you maintain one of these tools and think I set it up wrong, open an issue and I will rerun it.\n\n## What the model sees\n\nEach screen arrives as a short numbered list. This is the Settings app on an Android emulator:\n\n```console\n$ phonedriver snapshot\napp com.android.settings (Settings) · keyboard hidden · settled in 0ms\n@e1 button \"Search Settings\"\n@e2 group scrollable↓\n  @e3 button \"Google\" \"Services & preferences\"\n  @e4 button \"Network & internet\" \"Mobile, Wi‑Fi, hotspot\"\n  @e5 button \"Connected devices\" \"Bluetooth, pairing\"\n  ...\n  @e10 button \"Display & touch\" \"Dark theme, font size, touch\"\n```\n\nThe model taps by number. phonedriver waits until the screen stops changing, then replies. After `tap @e10` the Display screen opens and the reply lists it, including `@e24 switch \"Dark theme\" off`. The next tap returns only what changed:\n\n```console\n$ phonedriver tap @e24\nok tapped @e24 \"Dark theme\" at 353,532 · settled in 2034ms\n~ @e23 button \"Dark theme\" \"Will turn on when Bedtime starts\" → \"Will never turn off automatically\"\n~ @e24 switch \"Dark theme\" off → on\n```\n\n`+` marks a line that appeared, `-` one that left, `~` one that changed. The model doesn't need to poll or guess how long a screen takes to load. It takes a screenshot only when it needs to see a picture.\n\n## Speed\n\n\u003Cp align=\"center\">\n  \u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\".github\u002Fassets\u002Fhero-dark.svg\">\u003Cimg alt=\"phonedriver against adb on an Android emulator, median of 50 runs. Reading the screen: 13 ms against 2,164 ms, 170 times faster. Screenshot: 9 ms against 291 ms, 32 times faster. Typing 100 characters: 158 ms against 3,638 ms, 23 times faster. Tapping and seeing what changed: 514 ms against 2,477 ms, 4.8 times faster.\" src=\".github\u002Fassets\u002Fhero-light.svg\" width=\"100%\">\u003C\u002Fpicture>\n\u003C\u002Fp>\n\nMeasured on 11 November 2026 with phonedriver 0.1.1 on an Android 17 emulator, median of 50 runs, against `adb shell uiautomator dump`, `screencap` and `input`. The difference comes from a small helper process that phonedriver starts on the phone. It keeps the accessibility connection open, where adb starts a new process and writes XML each time. On a HONOR X8 phone (Android 13), reading the screen took 78.5 ms against 2,507 ms, and a screenshot took 16 ms against 1,006 ms. [Method and raw data.](docs\u002Fbench\u002Fspeed.md)\n\n## Asking before it pays\n\nWhen a tap lands on a button labeled Pay, Buy now, Buy with GPay, Place order, Start subscription, Transfer or Delete account, phonedriver holds the tap and asks you in Claude Code's own prompt. The model never sees that question and can't answer it. In a client that can't show such a prompt, the tap waits and the model has to ask you in chat.\n\n\u003Cp align=\"center\">\u003Cimg alt=\"Claude Code after phonedriver asked about tapping Buy with GPay on dominos.co.uk: the human declined, and Claude reports that no order was placed and nothing was charged.\" src=\".github\u002Fassets\u002Fdemo-poster.png\" width=\"100%\">\u003C\u002Fp>\n\nYou choose Allow, Allow for this session, or Decline. If you want an agent to run without asking, you can say so in its instructions, and it passes `autonomous: true`; you can also turn the check off with `PHONEDRIVER_GUARD=off`.\n\nThe check reads button labels in English, Spanish, Portuguese, French, German, Italian, Dutch, Japanese, Chinese (Simplified), Korean and Hindi. It does not catch a payment button that is only an icon, or one labeled in another language. By default it asks about payments and deleting an account. To be asked about more, set `PHONEDRIVER_ASK` to any of `send` (Send, Reply, Post, Share), `delete` (Delete, Remove, Clear all) and `install` (Install, Uninstall), for example `PHONEDRIVER_ASK=send,delete`. The prompt says which kind of tap it is.\n\nThe model can't type plain text into a password field or a one-time code field. It gets an error that tells it to use `secret`, which keeps the text out of logs and traces.\n\n## Works with\n\n| Phone | You need |\n|---|---|\n| Android emulator | adb |\n| Android phone or tablet | adb and USB debugging |\n| iOS Simulator | a Mac with Xcode |\n| iPhone or iPad | a Mac with Xcode and an Apple Development certificate ([setup](docs\u002Freference.md#iphone-or-ipad)) |\n\nOn Android there is no app to install. phonedriver pushes its helper over adb when it connects. On iOS it builds a small XCTest runner on your Mac. For a real iPhone, plug it in and run `phonedriver ios setup`. It reads the signing team from your certificate, checks the phone, and builds, installs and starts the runner, so there is no team ID to look up.\n\nThe cable can come off after setup. For an iPhone, run `phonedriver ios wifi on` and unplug it; it stays in `phonedriver devices` while it shares a Wi-Fi network with the Mac. For an Android phone, `phonedriver pair` or `phonedriver untether` does the same ([Android over Wi-Fi](docs\u002Freference.md#android-over-wi-fi)). When the phone is far away, on a tunnel or a mobile network, phonedriver sends a smaller screen stream and compressed screen trees. On a link shaped to 3G, the median tap on an emulator took 1.4 s, down from 2.8 s.\n\nOn Android 13 and later, the agent can work on a hidden second screen, so your own screen stays yours. Set `PHONEDRIVER_DISPLAY=hidden` in the MCP config, or pass `--display hidden` to the CLI. It has been tested on an emulator and on a HONOR X8 (Android 13). Typing into an app's own fields leaves no trace on your screen. Typing into a web page shows the system's clipboard note, and your clipboard is put back after.\n\nThe MCP server has 14 tools: `devices`, `apps`, `snapshot`, `screenshot`, `tap`, `type`, `swipe`, `scroll`, `press`, `launch`, `wait`, `batch`, `clipboard` and `shell`. `snapshot`, `screenshot` and `wait` are marked read-only, so a client can run them without a permission prompt. The `phonedriver` CLI has the same commands, for scripts and for agents that prefer a shell. A device you used from a terminal goes to your agent after 30 seconds idle.\n\nOne call can tap a whole path: `tap {\"target\":\"More options\",\"then\":[\"Settings\",\"Dark theme\"]}`. Models tap one step at a time unless told otherwise, so give your agent the skill (`phonedriver skill` prints it), which tells it to send paths.\n\n## Limits\n\n- Tested on Android emulators (API 26 and 37), a HONOR X8 (Android 13), the iOS Simulator, an iPhone 13 Pro Max, an iPhone 14 Plus and an iPad Pro. Other Android phones use the same path. Bug reports from them are welcome.\n- A tap alone takes 29 to 39 ms on an Android emulator and 450 to 530 ms on a real iPhone. The 514 ms in the Speed chart is a tap, the wait until the screen stops changing, and the list of what changed.\n- The model can do anything on the phone you could do with your finger. For unattended runs, use an emulator or a spare phone.\n- phonedriver never enters a passcode and can't pass Face ID or a fingerprint check. On a locked phone a command stops and says the device is locked. Since 0.1.4, phonedriver keeps an iPhone awake while an agent is using it. Screens that block screenshots, as some banking apps do, come out black in a screenshot, though their text can still be read.\n\n## Other clients\n\n```sh\nclaude mcp add phonedriver -- npx -y phonedriver mcp     # Claude Code\ncodex mcp add phonedriver -- npx -y phonedriver mcp      # Codex\ncode --add-mcp '{\"name\":\"phonedriver\",\"command\":\"npx\",\"args\":[\"-y\",\"phonedriver\",\"mcp\"]}'   # VS Code\n```\n\nEvery other client takes the same entry in its MCP config file:\n\n```json\n{\n  \"mcpServers\": {\n    \"phonedriver\": { \"command\": \"npx\", \"args\": [\"-y\", \"phonedriver\", \"mcp\"] }\n  }\n}\n```\n\nWith more than one device connected, add `\"env\": { \"PHONEDRIVER_DEVICE\": \"android:emulator-5554\" }`. `phonedriver devices` lists the ids.\n\n## How it works\n\nOn Android, phonedriver starts a small Java helper on the phone over adb. The helper reads the accessibility tree through UiAutomation and streams the screen as H.264 video, which is how phonedriver knows when the screen has stopped changing. On iOS, an XCTest runner does the same job. A daemon on your computer keeps the connection open and remembers which `@e` number is which element, so a tap still lands after a list has moved. The MCP server and the CLI are thin clients of that daemon.\n\nphonedriver sends no telemetry. After the first download from GitHub, it connects only to your device, and a test runs the whole tool in a sandbox that blocks every other connection. Design notes: [architecture](docs\u002Farchitecture.md), [protocol](docs\u002Fprotocol.md), [decisions](docs\u002Fdecisions.md).\n\n## FAQ\n\n**How do I let Claude control my Android phone?** Run `claude mcp add phonedriver -- npx -y phonedriver mcp`, turn on USB debugging, and plug the phone in.\n\n**Does it work with an iPhone?** Yes, from a Mac with Xcode, on the Simulator or on an iPhone or iPad. `phonedriver ios setup` signs the runner with your Apple developer team, and `phonedriver ios wifi on` lets you unplug the cable.\n\n**Can my agent buy things with it?** Not without your answer, unless you have told it to run autonomously. See [Asking before it pays](#asking-before-it-pays).\n\n**Can I use it at work?** Yes. It is AGPL-3.0: you can use it freely. If you change it and offer it to others as a network service, you must publish your changes.\n\n## License\n\nAGPL-3.0-only. See [LICENSE](LICENSE). The Android helper includes files from scrcpy under Apache-2.0; see [NOTICE](NOTICE).\n\nThe binary decodes H.264 with OpenH264 built from source. Cisco's patent license covers only the binaries Cisco distributes, so this build carries no H.264 patent license.\n","phonedriver 是一个基于 Model Context Protocol（MCP）的移动设备控制服务，使 AI 编程代理（如 Claude Code、Codex、Cursor）能安全地查看和操作真实 Android 与 iOS 设备。它通过 ADB 或 iOS 自动化协议截取屏幕并转为结构化文本，所有敏感操作（如支付）均强制人工确认。项目采用 Rust 实现，具备低 Token 开销（相较同类方案降低 6.9 倍）、CLI 与 MCP Server 双模式、跨平台支持等技术特点。适用于 AI 自动化测试、无障碍辅助、移动应用 RPA 及研究型智能体交互等需真实设备闭环控制的场景。","2026-11-24 04:47:31","CREATED_QUERY"]