Tapwright
Real iPhone control for AI agents: QA, research and mobile workflows. From Windows, Linux or macOS.
Tapwright gives an agent (Claude, Codex, anything that speaks MCP) eyes and hands on your
iPhone: it sees the screen as a list of elements plus a screenshot, and taps, types,
scrolls, swipes, answers permission prompts and opens deep links. It works with any app
on the phone: your TestFlight builds, development builds, the App Store version.
Nothing is added to your app, and no Mac or Xcode is needed.
[!NOTE]
Connect a real iPhone over USB or the same Wi-Fi. Hardware measurements so far use
one phone (an iPhone 14 Pro Max on iOS 26) from
one Windows PC; see Status.
How it works
your computer your iPhone
┌───────────────────────────┐ developer tunnel ┌──────────────────────────┐
│ agent ── MCP ── tapwright │ (USB, Wi-Fi, or any address │ WebDriverAgent │
│ │ that reaches the phone) │ (Apple's UI automation) │
│ pymobiledevice3 ────────┼─────────────────────────────▶│ taps, types, reads the │
└───────────────────────────┘ │ screen of any app │
└──────────────────────────┘
Apple's UI-testing framework (XCTest) can drive any app on a phone in Developer Mode, as
long as a computer holds a developer connection to it. Tapwright runs
WebDriverAgent (the XCTest runner behind
Appium) on your phone, signed with your developer identity, and talks to it through
pymobiledevice3's tunnel. That tunnel needs
no admin rights and works on any OS.
Since 2.0, taps, swipes, scrolls and the hardware buttons are sent from the computer to the phone's touchscreen through
CoreDevice HID, which needs no runner; the runner reads the screen and is the fallback for touches. A screen that
doesn't answer reads in time (a video feed, a game) no longer stops a call: see
docs/AGENT-TOOLS.md.
Tapwright drives the whole phone from the outside (any app, system alerts, the home
screen). Its sibling project Tapline drives your own
React Native app from the inside, through a small SDK in the app.
You need
- An iPhone on iOS 17 or later, and a USB cable for the one-time setup. Touches from the computer (the
"hands" of 2.0) need iOS 18 to 26 (iOS 27 comes with a later release); on iOS 17 they go through the runner, as before. Tapwright installs
pymobiledevice3 11.63 or later by itself.
- A computer with Python 3.10+. On Windows, install Apple Devices from the Microsoft
Store (it provides the USB connection); on Linux,
usbmuxd.
- An Apple Developer Program membership, for an App Store Connect API key (setup then
creates the certificate and profile itself). Or bring your own Apple Development
certificate (.p12) and a development profile for a wildcard App ID that includes the
phone.
Quick start
pip install tapwright
One-time setup, phone plugged in and unlocked:
tapwright setup --asc-key-id KEY_ID --asc-issuer-id ISSUER_ID --asc-key-file AuthKey_KEY_ID.p8 \
--bundle-prefix com.yourname.tapwright
It pairs with the phone (tap Trust), checks Developer Mode, creates a development
certificate and profile through the API (the private key stays on your computer), signs
and installs WebDriverAgent, and pairs for network use. Details and the manual option:
docs/setup.md.
Try it on one of your apps:
tapwright smoke --app com.yourcompany.yourapp
It opens the app, prints its first screen as elements, saves a screenshot, and closes it.
Run setup again any time: it skips what is done and ends with the next two commands. To keep
it working, tapwright doctor warns 30 days before the signing runs out, and
tapwright doctor --fix (phone on USB) repairs what it can.
Give it to your agent. One command registers the MCP server and installs its guidance:
tapwright install --client claude # or codex / cursor
For a manual Claude Code registration:
claude mcp add tapwright -- tapwright mcp
Tapwright 1.7.5 provides whole-phone control by default. Apps, Home, Settings, system alerts and cross-app workflows are available. Permission judgment belongs to the agent and the user's instructions. Existing --apps, --dedicated, --policy and --no-policy options are compatibility inputs, not access restrictions. See the 1.7.5 migration contract.
Other MCP clients: register tapwright mcp (stdio). Then ask, for example: "Open MyApp
on my phone, sign up with a test email, and tell me if anything looks broken."
AGENTS.md is the agent's guide; point your agent at it.
docs/quickstart.md walks through a first test.
The skill (install already did this; the command is for the skill alone). It teaches an agent how to test with Tapwright: the loop, how
to read an answer, what to do on each error, how to report, and the mistakes agents make.
tapwright skill install # for you: ~/.claude/skills and ~/.agents/skills
tapwright skill install --project . # for one project
Starter routes for the phone's own apps (Notes today; Reminders, Calendar, Mail and Messages follow). tapwright starters install [--maps DIR] adds them to your maps for drive {"route": ...}; a route or place of yours is never overwritten, and the answer names the routes it kept.
Claude Code reads .claude/skills; Codex and other agents read .agents/skills. The skill
is skills/tapwright, in the open
Agent Skills format, so skill installers can take it from this
repository too.
Tools