iphone-cli

A Rust command-line tool and MCP server that lets AI agents read and operate any app on a real iPhone through its accessibility tree, with no Xcode, WebDriverAgent or app on the phone. Needs iOS 27 and is very new.

View on GitHub ↗
Stars
★ 163
Last commit
24 Nov 2026
Maintenance
Active
Licence
MIT
Category
MCP Servers
GitHub
HyunSeob/iphone-cli

Overview

iphone-cli (command name iph) connects over USB or Wi-Fi to the same developer services Xcode uses to read the accessibility tree and send touch and keyboard input. There is no signing, no test runner and nothing to install on the phone. Every command prints JSON, and a result says whether input was done, not_sent (safe to retry) or unknown (do not resend, read the screen first). A built-in JavaScript engine can run multi-step flows in one call.

It is a new project (created 10 Nov 2026). The README says it is verified on one iPhone 15 Pro Max running iOS 27.0.1, plus one iPhone on iOS 27.2 on Windows, and that input is not expected to work on iOS 26 or earlier. It builds on the idevice library and on Poki's documented behaviour, but uses no Poki code.

iphone-cli is licensed under the MIT licence.

Features

  • iph read lists the on-screen elements, iph find matches them with selectors (label, role, identifier, value, within, index), and an ambiguous selector returns an error instead of guessing.
  • iph tap, swipe, pinch, scroll, type, key, button, launch, apps and screenshot. iph type pastes text, then restores the clipboard and checks the field's value.
  • iph batch runs a JSON list of steps, and iph script runs JavaScript (QuickJS) with saved scripts available through iph run.
  • iph syslog captures the phone's log while other commands run. iph dnd turns Do Not Disturb on and off, because notification banners can take taps near the top of the screen.
  • iph mcp serves the same tools over MCP: iph_read, iph_tap, iph_script, iph_syslog and others. A skill is included for agents.
  • iph setup and iph doctor check pairing, Developer Mode, the developer disk image and touch input, and say what to do on the phone for each failed check.

Requirements

  • A Mac or a Windows 10 or 11 (x64) computer. On Windows, Apple's device service must be installed.
  • A real iPhone on iOS 27 or later, paired, with Developer Mode on. Simulators, Android, Linux hosts and landscape are out of scope.
  • A developer disk image on the phone. Xcode is not required: if the phone lacks one, iph doctor installs it, using Xcode's copy when the Mac has Xcode and otherwise fetching a pinned copy (about 18 MB, with a checksum) from the public doronz88/DeveloperDiskImage repository. The README says the repository itself contains no Apple files, and that mounting the image automatically is written but untested.

Install

  1. On a Mac, run curl -fsSL https://raw.githubusercontent.com/HyunSeob/iphone-cli/main/install.sh | sh, then iph setup. The script downloads the release binary, checks its checksum and puts it in ~/.local/bin/iph. You may want to read the script first.

  2. Or, with Rust 1.93 or later, run cargo install iphone-cli. On Windows, download iph-windows-x86_64.zip from the releases page and put iph.exe in a folder on your PATH.

  3. Register the MCP server with claude mcp add iph -- iph mcp or codex mcp add iph -- iph mcp.

Example

Plug in the phone, run iph setup, then ask your agent to open Settings and read the iOS version. The agent can call iph read --human to see the screen and iph tap "General" to tap an element. The README reports a median of 1.35 seconds for iph read on a Settings screen in its test setup (the author's measurement). Nothing works on a locked phone, and Face ID and passcode prompts are never answered for you.

Works with

Claude CodeCodexAny MCP client

Listed in

Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.

Report a correction

More in this category