How to control a real iPhone with Claude Code or Codex A developer released iphone-cli (iph), a Rust-built single binary that acts as both a CLI and a stdio MCP server to control a real iPhone over USB or Wi-Fi on macOS and Windows. The tool reads Apple's accessibility tree and drives apps without Xcode or any runner app installed on the phone, targeting iOS 27 or later, and is registered in the Official MCP Registry as io.github.HyunSeob/iphone-cli. It lets agents like Claude Code and Codex read the screen and tap controls by name, such as opening Settings and selecting General. I wanted Claude Code to open Settings on my iPhone and tap General by name. On a real iPhone, the usual options each come with a catch. Appium with WebDriverAgent gives you an element tree, but you need a signed WDA runner on the phone typically built with Xcode; on Windows, Appium needs a preinstalled or externally managed WDA . Tools built on macOS iPhone Mirroring skip WDA, but require macOS 15+ on Apple silicon or T2, aren't available in the EU, and depend on screenshots or OCR instead of Apple's accessibility tree. So I built iphone-cli iph https://github.com/HyunSeob/iphone-cli in Rust: a single binary that works as both a CLI and a stdio MCP server on macOS and Windows. It reads Apple's accessibility tree and drives apps on a real iPhone over USB or Wi-Fi, without Xcode or any runner app installed on the phone. iph targets real iPhones running iOS 27 or later . Plug the phone in over USB, unlock it, and tap Trust before running setup. iph macOS Apple silicon & Intel universal binary : curl -fsSL https://raw.githubusercontent.com/HyunSeob/iphone-cli/main/install.sh | sh iph setup The installer verifies the checksum and puts iph in ~/.local/bin and prints the PATH line if needed . Release binaries for macOS are ad-hoc signed in CI, and you don't need to sign or install a runner app on the phone. Windows 10/11 x64 : Pair over USB first. After that, the Windows PC can stay on Ethernet as long as the iPhone is on the same LAN. winget install Apple.AppleMobileDeviceSupport . iph-windows-x86 64.zip from iph.exe , and add its folder to your PATH . iph setup . Build from source with stable Rust: cargo install iphone-cli Windows builds need Visual Studio C++ Build Tools. iph setup runs iph doctor , walks through any failed checks, and lets you press Enter to re-check in an interactive terminal. It verifies pairing, Developer Mode you toggle it on the phone and reboot , the Developer Disk Image, screen lock, accessibility reading, and touch input. For the touch check, it brings Settings to the front and scrolls one step and back. If developer services are missing, iph doctor prefers Xcode's copy of the Developer Disk Image and also checks its cached download, fetching and SHA-256-verifying it if needed. My test phone already had the image mounted, so I haven't verified the auto-download path on a clean device yet. Once USB works, run iph doctor --fix-wifi while the cable is still plugged in to enable Wi-Fi, or register the phone's IP directly with iph --udid