iphone-use
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IPHONE_USE_MCP_TOOLS | No | Tool profile: all (full server), readonly (12 observation and registry tools), or a comma-separated allowlist. Use readonly for browser-only registry inspection. Device actions require a separately configured macOS daemon and iPhone. | all |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Drive a real iPhone. The loop:
If the user names a phone or there are multiple installed phones, use phone_instances and pass the chosen instance (an installed daemon instance name such as i13 or default) on every phone_* call. Omitted instance describes only the configured daemon, never all phones. Explicit unavailable instances fail without fallback. phone_status — act only when drivable=true, with one exception: released=true (freed after the last task) is brought back by the next phone tool itself (elements, tap, run_steps, …), which waits for it and answers phone_not_ready with what to do if a person must act (e.g. the passcode). Otherwise pause screen reads/actions and follow recovery/next_step. For target_configured=false with recovery_owner=unconfigured, inspect xcrun devicectl list devices and run iphone-use doctor on the daemon host; ask which device if ambiguous, then IPU_RUNNER_UDID= iphone-use setup only for an authorized confirmed target. Preserve --instance for named instances; external runners recover on their owning host, never via local setup. Do not take over another owner or bypass privacy/handoff. For trust/passcode blockers, the person acts on the phone; never ask for their passcode, pause screen reads during entry, then verify status and resume the original task. Do not loop setup or reconnect; call phone_reconnect once only when the user's current task needs the phone and a tool did not bring it back (each reconnect may make the user type the passcode), never for health checks.
Look for a saved flow FIRST. Responses that enter an app (launch_app, the first phone_elements in a new app) carry a
registryblock: if a listed flow does the task, phone_flow_run it — one call instead of dozens. phone_flow_list shows all of them. No flow but a clear goal: use phone_jev_run only when its model credentials are configured and the user authorized the whole goal; otherwise plan bounded phone_run_steps batches.Otherwise read phone_elements and act on what it names (phone_tap_element, phone_tap_label for a unique label) only to explore; as soon as you know the next few steps, send them as ONE phone_run_steps batch (wait_for between screens) — it returns the resulting screen, so a task takes a few turns, not one per tap. Tool routing: phone_tap_label resolves one unique visible label from a fresh read; phone_tap_element uses an index and token from the same snapshot for ambiguous controls; phone_tap is for pixel-only targets. phone_scroll moves one viewport, phone_scroll_find finds one label, and phone_collect_list reads several pages. phone_screen is the person's live panel; phone_screenshot is one model-visible image; phone_screen_frame belongs only to the panel. Screenshots only when pixels matter. Diagnostic/install/recording tools are for tasks that request those capabilities, not ordinary navigation.
Verify each step;
retry_safe:falsemeans never replay. One action at a time per phone: parallel phone tool calls run in no fixed order and their observations overlap; batch them instead.A response carrying
flow_suggestion, or any finished multi-step task with no flow: ASK THE USER whether to save it. Only if they agree: phone_flow_draft, fix its todo list, phone_flow_run the file once, then phone_flow_publish(confirm=true) with their OK. Call phone_release_owner when the task is done: it also frees the phone (the device runner stops, so the phone leaves automation mode); the next task's first phone tool brings it back.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| phone_app_notesA | Read or replace persistent notes for one bundle id about app navigation and quirks. Resolve bundle with phone_apps; without text, read the existing Markdown. With text, replace it entirely (not append), at most 16 KiB UTF-8; read first to preserve useful notes. An empty text clears the notes. The first screen read in an app also includes them in its registry block. Use phone_flow_draft for executable task replay, not these notes. Writes affect future sessions; never store passwords, codes or personal data. Errors do not prove a write was delivered: read back before retrying. |
| phone_appsA | Find an app's bundle id by name. Read-only: no screen access, no owner lease. Searches the phone's installed apps, then a verified catalog of popular apps and Apple's built-ins, then the App Store only when neither matched; exact matches hide partial ones. Candidates carry name, bundle_id, source (installed|catalog|apple), installed_verified and publisher; installed_verified=false with installation_checked=false means unknown, not absent. Then launch_app bundle (or |
| phone_capabilitiesA | Supported UI operations and cached readiness: the backend's single-step, batch and perform vocabularies, observation support and accepted modes (phone_status covers device/setup/owner). Read-only: no device connection, wake or lease. supported is static; available is cached, blocked_by names locked, released, reconnecting, human_handoff, owned_by_other or offline; ok:null is unknown, never readiness. UI control only, not app install or device management. If blocked, follow phone_status. |
| phone_collect_listA | Read a scrolling list across pages in ONE call: reads rows of one kind (default Cell), swipes a page, repeats until the page repeats (duplicate_page), end_label shows, or max_pages (default 6, max 10). Rows dedupe on (kind, identifier, label, value): look-alike rows without identifiers may collapse, so reconcile counts the user cares about. complete=true ONLY when end_label was seen; duplicate_page is not proof of the end. Leaves the screen on the last page. swipes_uncertain: never replay. |
| phone_crashesA | Crash reports on the phone: without |
| phone_elementsA | The current screen as text — use instead of screenshots. Rows carry kind, label, identifier, value, rect, state and a |
| phone_flow_draftA | Turn what you just did on the phone into a flow: the daemon's trail of applied actions in the current app (not flow runs) as a flow v1 document — snapshot taps become label/identifier locators, typed text becomes named inputs and is never included — plus a |
| phone_flow_infoA | Inspect an installed flow before phone_flow_run: returns metadata, declared inputs and step templates with placeholders, never runtime input values. Use an id from phone_flow_list, such as health/export-all: exactly two lowercase app/flow slugs, not a local file path. Check app, locale, verification and side effects before execution. Invalid or missing ids return an error without running or downloading anything; use phone_flow_update if the registry store is empty. To inspect a new local draft, validate its file instead of guessing a registry id. |
| phone_flow_listA | Installed deterministic per-app flows — check before exploring a task: phone_flow_run replays one without model decisions or screenshots. Filters category, app (registry app dir or bundle id, not a display name) and verified combine. Rows: id, description, inputs, risk, compat with this phone's app version; detail=true for full JSON. verified = a recorded hardware run, not a guarantee. phone_flow_info shows effects. An empty store needs phone_flow_update once; a filter miss ≠ empty store. |
| phone_flow_publishA | Publish a working flow to the official registry through the user's GitHub CLI: fork if needed, write the flow and any new app.json, rebuild index.json, push a branch, open a public PR. confirm=true only after the user agreed to that publication. Draft with phone_flow_draft and prove with phone_flow_run first; phone_flow_report is for problems in existing flows. verified_on takes device/iOS/date; unverified flows open a draft PR. Returns id, repo, branch, head, pr_url; inspect it before retrying. |
| phone_flow_reportA | File an issue on the official flow registry for an installed flow that failed (label changed, app updated, wrong locale). Uses the failure captured by the last phone_flow_run of that id — failed step, redacted daemon result, daemon version — so you only add a short note. Screen labels, typed text, and element lists are stripped. OUTWARD-FACING: requires confirm=true after the user agreed. Do not file for a phone that was simply locked/offline, or for a flow you ran on the wrong app/locale. |
| phone_flow_runA | Run one flow exactly once: an installed registry id or a flow file (*.json, e.g. a draft being proved). Pass its declared inputs; risk=side_effect needs confirm=true; compat broken/incompatible for the installed app version needs force=true. Declared |
| phone_flow_updateA | Mirror the official iphone-use flow registry (github.com/leeguooooo/iphone-use-flows) into the local store. Every file is checksum-verified and strictly validated before it is written; locally added flows are kept. Call once when phone_flow_list reports an empty store, or to pick up new flows. Network only; the phone is not touched. |
| phone_holdA | Keep the phone through a bounded human-in-the-loop pause inside the current task (a PIN, a prompt, a code): the idle watchdog will not release it for |
| phone_home_layoutA | Read all home-screen pages, Dock, folders and widget stacks from the paired iPhone without swiping or screenshots. Needs a physical target over usbmuxd, not drivable=true or a runner: no reconnect. Page indexes are persisted icon state (hidden pages included); null row/col or positions_complete=false means unknown, never drag coordinates. action: backup (plist on the Mac), preview (diff plist vs phone), apply/restore (replace the layout; confirm=true only after the person saw the preview). |
| phone_install_appA | Install an app build on the phone: |
| phone_instancesA | List installed local iPhone instances and their read-only status. This inventory is not a list of paired/connected devices. For recovery_owner=unconfigured, inspect xcrun devicectl list devices and run iphone-use doctor on the daemon host; ask which phone when ambiguous. Does not start, reconnect or claim a phone. Pass instance in any phone_* call to choose one; omitted instance preserves this MCP server's configured daemon. Missing/invalid instances never fall back to another phone. |
| phone_jev_runA | Hand ONE whole goal to the fast on-phone agent (TypeSafe Jev picks each step from the element table in ~1–2 s; a small LLM types values). For a clear multi-step goal with no saved flow (check phone_flow_list first). Returns status done|blocked|max_steps with the step history; it answers BLOCKED rather than send, pay, delete or share anything the goal did not ask for — still confirm such goals with the user and verify the end screen. Needs TYPESAFE_API_KEY (+TEXT_MODEL_API_KEY to type). |
| phone_keyA | Press a navigation or editing key in the foreground app, acting on its current focus. Use phone_type for literal text and phone_tap_element to focus a field first. Check phone_status.drivable and the focused control: delete/backspace can erase content, and return/enter may submit or send it. The schema lists accepted names; unsupported names fail before input is sent. observe defaults on and returns the settled screen change. On an unknown outcome, inspect the screen before another key; repeating a key can change or submit content twice. |
| phone_loginA | Log the app on screen in with the user's OWN account from their password vault (bitwarden-use on the Mac): the daemon reads the entry and types it, so no credential passes through this conversation. Use when an app shows its login page during the user's task. Several matching entries: the answer lists their names; ask the user, then pass item (and user). Existing accounts only — never sign-up, password change or payment. needs_code: call again with code_via (sms|mail) and code_from (max two). |
| phone_logsA | Capture and read the paired phone's live system log for app debugging (phone_crashes for saved crash reports). action: start, then reproduce, then read (default; filters process/contains/level, pass the returned next as since); stop releases the relay, clear drops the buffer. Connection/auth failures are errors, not an empty log. Capture stops itself after 15 min without reads. Lines: #seq time process[pid] level: message. Logs may hold private data: collect only what the task needs. |
| phone_metricsA | Task performance aggregates for this client's X-Phone-Owner on the selected instance: HTTP-call counts, batch/flow usage, stale/unknown outcomes, losses, p50/p95 latency. HTTP calls are not model turns or tokens; model_round_trips stays null without a complete declared trace. Read-only: no connection, runner launch or lease — never reconnect for metrics. Default the latest 5 open and recent runs, max 20 per section, 12 KiB row budget; omitted counts and truncation are explicit. |
| phone_read_valueA | Read one element's AX value without tapping, focusing, waking or a lease. Give exactly one identifier or exact label from a fresh read, optionally kind; ambiguity refuses. Use when phone_elements marks value_truncated or the task needs the full field text. Returns one bounded value with source/completeness; complete means this API did not cut it, not that the app exposes its whole document. A smaller max_utf16 gives truncated:true. Secure fields and runners without ipu:valueRead refuse. |
| phone_reconnectA | Start/restart on-device automation; occupies the phone, may need the operator to unlock it. Only to continue a current user-requested task that cannot proceed — never for initialization, health checks, a finished task or to keep the phone ready. Needs released/offline status, recovery_owner=daemon, no blocker or reconnect in progress. Call once; wait_secs blocks until drivable, a blocker or timeout (outcome retrying: the supervisor retries within a minute). Never switches devices. |
| phone_recordA | Record the iPhone screen to an MP4 on the daemon's Mac: start, perform the requested task, then stop to get path, duration and size. status checks the recording without starting one. Unlike phone_screenshot (one image) or phone_screen (live panel), this persists video under the instance state directory's runs/recordings. Requires a usable device video stream and a writable output directory. Auto-stops after 10 minutes or 200 MB; ended explains why. Video can contain private screens: record only the authorized task, stop when done, and do not treat the returned Mac path as an upload. |
| phone_release_ownerA | Release this session's phone lease when its task ends so another session can drive. Also frees the phone: a daemon-managed runner stops at once (the phone leaves automation mode) unless a live viewer, an active phone_hold or a recording keeps it; the next phone tool brings it back. Unlike phone_hold(secs=0) this gives up ownership. Sends no input, returns owner=null; releasing an unowned phone succeeds; another session's lease returns phone_owned and is never taken over. |
| phone_run_endA | Close a live task opened with phone_run_start and return its metrics: HTTP calls (not model turns), batches, observed actions, flows, stale/unknown outcomes, failures and p50/p95 call time. Use the same run_id and session; a missing or already-closed run cannot produce a new live summary. Supply turn_ids only for a complete_trace declaration, including every model generation; otherwise model_round_trips remains unknown. This ends accounting only, not a video recording or the owner lease: use phone_record(stop) and phone_release_owner for those. |
| phone_run_startA | Open a task boundary for this session's daemon metrics; pair with phone_run_end, not phone_record (video). Later session calls count toward this run; this does not drive or reserve the phone. Optional: without it, idle gaps infer runs. Use a fresh run_id for each task; starting the same still-open id resumes that run rather than resetting its counts. complete_trace is valid only before its first counted call and commits you to supply every model turn id at run_end. Returns a start acknowledgement; report errors rather than claiming metrics were recorded. |
| phone_run_stepsA | THE DEFAULT WAY TO ACT: run several steps in ONE call and get the screen it ended on back (observe, default on): one turn, not one per tap. The daemon validates the whole batch, holds one lock, stops at the first failure. Single-action tools are for exploring. Guard screen changes with wait_for; never batch an unverified irreversible step. The steps are exactly a saved flow's |
| phone_run_traceA | Read this session's redacted action timeline for a run started with trace=true. Bounded memory only; includes counts and delivery/verification receipts, never typed values or screenshots. It cannot replay actions. |
| phone_screenA | Open the live iPhone screen panel beside the chat, or reuse the one already open, in hosts that render MCP Apps: the person watches the phone while you work and can press Home or refresh. Read-only: takes no owner lease and wakes nothing. Returns a short status (phone, drivable, owner). Open it once when the person wants to watch; it never replaces phone_elements or phone_screenshot for your own observation. Hosts without MCP Apps show no panel. |
| phone_screen_frameA | Internal frame transport for the iphone-use MCP Apps panel; models use phone_screenshot for a still image and phone_elements for text. Returns structuredContent with status, frame (mime_type=image/png and base64 data), ok and error. A private hold returns frame=null; an empty or failed capture is reported rather than invented pixels. max_side is clamped to 200–1000; fresh bypasses the reusable frame. The panel calls this with visibility app; do not poll it from model turns or use it for health checks. |
| phone_screenshotA | One screen as an image/png block, when pixels matter; phone_elements for text/targets, phone_screen for the person's live panel. Reuses the settled frame after an observed action. max_side default 1200 (0 = full resolution; an oversized image is stepped down to fit 1.5 MB); overlay=true draws interactive frames with their phone_elements indexes. Capture only for the current task; private holds or offline devices refuse. An image does not prove an action succeeded; check the state or receipt. |
| phone_scrollA | Move the viewport with one device-side swipe (phone_scroll_find to reach a known label, phone_collect_list to read several pages). x,y is a normalized anchor inside the scrollable region — avoid text fields, sliders and screen edges, a misplaced gesture can edit a control or navigate away. Positive dy reveals content below, negative above; dx right/left. Travel is 1.5× each delta in points, clamped to 15–75% of the screen. Inspect the observed result before repeating. |
| phone_scroll_findA | Find one exact label, swiping at most max_swipes (default 1, max 5) when it is off screen. Stops at once — no further swipe — when the label is ambiguous (candidates with index and frame), covered or not drawn. Found: |
| phone_set_locationA | Simulate GPS for testing location-aware apps. Supply both lat (-90–90) and lon (-180–180), in finite decimal degrees, or clear=true without coordinates to restore real location; combining clear with coordinates is refused. Every app sees the simulated position until cleared; it is not a navigation or address lookup tool. Counts as one daemon action and requires authorized device control. Returns the applied location/clear status; on a transport failure the effect is unknown. Inspect the result before proceeding and clear the simulation when the test ends. |
| phone_shortcutA | System shortcut: home, spotlight, volume_up/volume_down (physical device; the ACK confirms the request, not the level) or save_screenshot (a mutation, unlike phone_screenshot: the receipt means requested, not saved; if iOS shows a preview choose Done/Save there, never take another; check Photos before claiming saved). Never replay an uncertain capture or volume press. App Switcher is unsupported; unknown names fail before input. phone_key for field keys, launch_app for an app. |
| phone_statusA | Read the phone's state without taking control: owner (another session's owner means do not drive; control calls get phone_owned), device_state, screen_state, runner, locked, drivable, released, hint, next_step, recovery, setup_blocked_on/phase/message, lock_readiness (will_lock_needs_person: a person must unlock after a pause; relay the hint), keep_runner_alive. Act only on drivable=true; otherwise relay next_step and stop. Never ask for a passcode; pause reads while one is entered. |
| phone_subtreeA | Read one native element's bounded subtree by element+snapshot, serializing only that element (locator lookup may still read the app tree). Requires a unique live semantic target and a runner with ipu:elementSubtree. Returned row positions are READ ONLY, not action refs; use unique locators or fresh phone_elements refs for input. complete=false means descendants may be missing. |
| phone_tapA | Tap a pixel target using normalized x,y from 0–1, with (0,0) at top-left. Prefer phone_tap_element for an accessible control; use phone_screenshot to locate a pixel-only target. Requires phone_status.drivable=true and current screen evidence: a tap may send, buy, delete or toggle whatever occupies that point, so authorize its actual effect first. observe defaults on and returns the settled screen change. Read outcome/retry_safe; if delivery is unknown, inspect the current state or receipt before considering another tap. |
| phone_tap_elementA | Tap one element by its zero-based index and snapshot token from the SAME phone_elements response. The daemon re-reads the tree; a small change on the same screen (clock, badge, a flipped switch) still finds the row by kind, identifier, label and enclosing rows, while another page, a new alert, or look-alikes it cannot tell apart refuse with nothing sent, so a stale element reference cannot silently tap a different control. Use identifier/kind/label/state fields to choose the index. Snapshot refs are ephemeral: never persist them in a flow. |
| phone_tap_labelA | Tap an iPhone UI element by an EXACT visible label (requires drivable=true in phone_status). Reads a fresh phone_elements snapshot, requires exactly one match, then performs a snapshot-bound tap. Zero or multiple matches return an error and send NO action. For duplicate labels, choose by identifier/kind/state from phone_elements and call phone_tap_element with that response's snapshot. |
| phone_typeA | Type Unicode text into the focused field (focus it with phone_tap_element first; phone_key for editing keys). Text may replace a selection or land in the wrong field if focus moved. Long text is chunked; budget_ms (6000..15000) may stop at a safe boundary and return a single-use continue_token: continue with only that token. On partial failure read characters_confirmed and remaining_text; never resend the whole value blindly. Verify the field before submitting; unknown outcome ≠ nothing typed. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| iphone-use-screen | Live view of the iPhone being driven, with Home and refresh buttons. |
TDQS
Scored across 43 tools
The set covers many adjacent capabilities: tap/tap_element/tap_label, screenshot/screen/screen_frame, scroll/scroll_find/collect_list, and run_steps/flow_run/jev_run. The descriptions explicitly distinguish them, but with 43 tools an agent still has many plausible choices and must read long guidance before selecting.
Almost all tools use a consistent snake_case phone_ prefix. There are minor deviations: several are noun/status names rather than verb_noun, and flow/run naming is not perfectly parallel, but overall it is predictable.
43 tools is well above the 25-tool heavy threshold and feels excessive even for a broad iPhone automation server. The surface spans device control, flows, metrics, recording, logs, layout, and app management, so many tools may be justified individually but the set is still unwieldy for an agent.
The server covers a wide lifecycle: inspection, UI interaction, flows, recording, screenshots, metrics, logs, crashes, app install, recovery, and ownership. Minor gaps exist, such as no explicit app launch/uninstall tool and no direct flow deletion, but most workflows can be handled through step batches or flow operations.