esp32-iphone-agent
This server lets an AI agent see and operate a real iPhone through an ESP32 board, and save/replay successful task runs.
See the screen:
screenshotcaptures the current iPhone display (pixel coordinates for all actions);device_inforeports board status (mirroring, frozen video, busy app, USB, BLE link).Control touch:
tap(with optional multi-tap/double tap),longpress(configurable duration), andswipe(rests at the end, so lists stop where you leave them).Input text & keys:
type_textfor ASCII text (Chinese via pinyin + candidate commit),press_keyfor keys/combos (enter, esc, tab, backspace, space, arrows, cmd+a, shift+tab…), andpress_buttonfor the HOME button.Listen:
phone_audioreturns words spoken/played by the iPhone in the last 30 s, or why audio isn't available.Review history:
historylists recent runs or shows a run's steps with the screenshot each was performed on (0–1000 screen units).Reusable intents:
intent_list/intent_showbrowse saved intents (prompt, hints, recorded steps with reference screens), andintent_savestores a working run as a replayable intent with a prompt and up to 6 hints.Multi-device: most tools accept an optional
deviceboard id when several boards are connected.
Acts as an AirPlay receiver on the ESP32-S3 board, receiving the iPhone's mirrored screen and audio stream and forwarding it to the agent app so the agent can see the screen and hear voice prompts or listening exercises.
Controls a real iPhone running iOS 18+ by using AirPlay screen mirroring, BLE commands, and USB HID input, allowing an AI agent to observe the screen and perform taps, swipes, typing, and app navigation through AssistiveTouch.
Sends iPhone screenshots to OpenAI-compatible vision models for planning and acting, with support for user-provided API keys to drive the agent's step-by-step decisions.
1. Get the board | 2. Flash in one click | 3. Install the app |
A plain Seeed Studio XIAO ESP32S3 (~$7, not Sense or Plus).Which board to buy → | Plug into Chrome or Edge and flash over USB. Nothing to install.Flash the board → | Install ESP32 Agent and follow its four guided steps.Get it on TestFlight → |
Phone-Use Models & Recent Highlights
Model | Role & Highlights | Links |
Manina‑4B‑HD‑1.0 | Open-weight 4B grounding ( | |
Manina‑4B‑Lite‑1.0 | Live Locate & Act engine (640 tokens): |
Android app (
android/). Same agent on Android 6.0+ (Android 7.0+ on Google Play with built-in free AI, no account needed): the board pairs over Bluetooth while the app captures the screen natively.USB or Bluetooth HID (App 1.0.8+, fw v0.2.7+). Switch between wired USB and cable-free Bluetooth in the app—Lightning iPhones work without a camera adapter when the board is powered externally (built on @cy41's work in #94).
Audio & long runs. On-device AirPlay audio transcription for listening/voice prompts (how it works), built-in free AI line (or bring any OpenAI-compatible vision key), unlimited steps with pause/resume, and step-by-step replay (export traces).
Related MCP server: Zeptap
Why a Board
Most iPhone agents tether your phone to a Mac running Xcode, Developer Mode, and WebDriverAgent. Here the $7 ESP32-S3 board replaces the computer—once flashed, the iPhone runs tasks completely on its own.
ESP32 iPhone Agent | Computer-tethered agentsWebDriverAgent, CoreDevice, idevice | |
What you need | An iPhone and a $7 board | A Mac, Xcode, developer tools |
Setup | Browser flash + TestFlight + 4 guided steps | Clone, build, install dependencies, sign helper app |
iPhone changes | AssistiveTouch on (guided in-app) | Developer Mode, USB trust and pairing |
While it runs | Just the phone—take it anywhere | Computer stays awake and connected |
Apps & audio | Every app on screen + AirPlay audio | Limited to debug/accessibility interfaces |
Tradeoffs: you buy a $7 board, each step takes a few seconds, and hotspot mode uses cellular data (or join a 2.4 GHz home Wi-Fi in Settings › Board to use LAN instead).
Shared free line busy (HTTP 503)? Switch to your own OpenAI-compatible or Manina API key in Settings › Model, or ping @iamhenryyuan.
How It Works
New here? Read AI control for iPhone and how Manina AI works.
iPhone ──Screen Mirroring (Wi-Fi)──▶ ESP32-S3 (AirPlay, H.264 TCP :7201)
▲ │
└── USB / Bluetooth HID ◀── BLE commands ◀── ESP32 Agent app (same iPhone)Eyes (AirPlay). The board runs a Wi-Fi hotspot (ESP32 Agent in Screen Mirroring) or joins your 2.4 GHz Wi-Fi, forwarding raw H.264 frames over TCP
:7201without decoding on the MCU.Hands (USB or Bluetooth HID). Standard mouse + keyboard; AssistiveTouch turns pointer clicks and drags into taps and swipes.
Closed-loop brain (the app). Decodes frames in the background (with Dynamic Island status), runs planner + actor models, homes and visually recalibrates the relative pointer before fine taps, verifies screen changes, and records every run for replay.
Hardware & Quick Start
Only follow install instructions in this repository or onmanina.ai. Never run "quick install" one-liners (iex(irm ...), etc.) posted in issues or comments.
Part | Notes |
ESP32-S3 board | Plain Seeed Studio XIAO ESP32S3 (8 MB PSRAM; not Sense or Plus), ~$7 (Amazon* · where to buy). |
USB-C cable | Short USB-C data cable, e.g. Anker 60W 1 ft* (or external USB power in Bluetooth mode). |
iPhone | iOS 18+ (App Store) or iOS 16.4+ on TestFlight (incl. iPhone 8 / X). USB-C plugs in directly; Lightning uses Bluetooth mode or a Camera Adapter. |
Vision model | Built-in free line, Manina API, or any OpenAI-compatible vision endpoint. |
* Affiliate link (Amazon Associate). Full hardware & adapter notes: hardware guide · setup guide.
Flash the board in Chrome/Edge at manina.ai/install over USB (~30 seconds).
Install ESP32 Agent from TestFlight.
Complete the 4 guided steps in-app: pair BLE → Screen Mirroring to ESP32 Agent → enable AssistiveTouch (auto-calibrated) → pick the free AI line or add an API key.
Run a task: type a goal ("Open Settings and go to Wi-Fi") and tap Start (also triggerable via Siri, Shortcuts, widgets, or Control Center).
Experimental boards: M5Stack StopWatch (round-screen ESP32-S3 with battery, Bluetooth-only; flash at manina.ai/install?board=m5stopwatch, TestFlight 1.0.9+). Custom Bluetooth HID & Zectrix Note 4 docs: docs/bluetooth-hid.md · docs/note4-bluetooth.md.
Build & flash firmware from source (arduino-cli + ESP32 core 3.3.x +
NimBLE-Arduino@2.5.1; always useflash.shsonimble_cfg.hBLE buffer sizes apply):arduino-cli lib install "NimBLE-Arduino@2.5.1" hardware/flash.sh # optional: [serial port] [--debug] # StopWatch also needs: M5Unified@0.2.29 and M5GFX@0.2.36Build the iOS app from source (generated via XcodeGen from
ios/project.yml; works with a free Apple ID, manual Wi-Fi password fallback without paid Hotspot Configuration):cp ios/Config/Local.xcconfig.example ios/Config/Local.xcconfig # Set DEVELOPMENT_TEAM & IA_BUNDLE_ID, then run IPhoneAgent: open ios/IPhoneAgent.xcodeproj
Use from a Coding Agent (MCP & CLI)
Drive a real iPhone from your computer over Bluetooth or Wi-Fi (esp32agent net join) via esp32agent (board fw v0.2.2+, MCP Registry io.github.onehumanbeing/esp32agent, no iOS app required). Guides: iPhone MCP server · Claude Code walkthrough · CLI docs · Agent skill · llms.txt (full) ·
# Claude Code plugin (MCP server + skill)
/plugin marketplace add onehumanbeing/esp32-iphone-agent
/plugin install esp32agent@manina
# Or register the MCP server directly
claude mcp add esp32agent -- npx -y esp32agent mcpCursor, Cline & standard MCP clients (mcpServers JSON):
{
"mcpServers": {
"esp32agent": { "command": "npx", "args": ["-y", "esp32agent", "mcp"] }
}
}DeepSeek Harness (integrations/dsh · demo video) & Hermes Agent (integrations/hermes):
dsh plugin --profile web add dsh-esp32agent
hermes plugins install \
onehumanbeing/esp32-iphone-agent/integrations/hermes --enableArchitecture, Limitations & Reference
ios/ SwiftUI iOS app: BLE, H.264 decode, agent loop, replay, widgets
android/ Kotlin/Compose Android app + BLE pen firmware (android/firmware/)
hardware/ ESP32-S3 firmware: BLE GATT, hotspot, AirPlay, USB/BLE HID
prompts/ Plain-text planner & actor prompts bundled into the app
harness/ Wireless devicectl loop (Mac → iPhone app → board OTA → logs)
docs/ BLE protocol (ble-protocol.md), trace export, board notesKey limitations: AirPlay source must be an iPhone/iPad (macOS Screen Mirroring is unsupported); mirrored stream is
480×1040up to 5 fps; iOS hides passcode, Apple Pay, and DRM video over AirPlay; keep the phone unlocked in portrait (iPad supports both orientations full-screen); Chinese input types pinyin viaCtrl+Space(no emoji). Stuck? See troubleshooting.
Models & prompts: Any OpenAI-compatible vision API works (
vLLM,SGLang,llama.cpp,Ollama, cloud APIs) with separate planner/actor selection andSettings → Model → Advanced → Extra body JSON(forapi.deepseek.com,{"thinking":{"type":"disabled"}}is sent by default unless overridden). Prompts live inprompts/. Developed withnvidia/Qwen3.8-Flash-Next-NVFP4on dual DGX Sparks (TensorFold).Wireless harness & protocol:
harness/app.sh,harness/fw.sh,harness/run.sh, andharness/logs.shautomate wireless builds and tests overdevicectl(harness/README.md). Host BLE simulator:hardware/tools/board_test.py(hardware/tools/README.md). Protocol & remote logs: docs/ble-protocol.md · docs/remote-debug-log.md.Roadmap: Shipped standalone board+app loop, iPad portrait/landscape, Android port, Bluetooth HID, and pinyin input. Next: iPhone landscape apps, multi-action steps, and in-app model recommendations (suggested by @asharthinks).
Project | Approach | Difference from this project |
UxPlay mirroring + ESP32-S3 BLE mouse + vision model | Needs a computer; single-tap instructions | |
iPhone agent app via Apple CoreDevice debug channel | Needs Developer Mode and Developer Disk Image | |
HDMI capture + USB HID + multimodal model | External capture hardware; mainly Android | |
PicoKVM HDMI capture + USB HID | Requires macOS controller + PicoKVM | |
ESP32-S3 BLE HID + AssistiveTouch iPhone app | Closest approach; this project adds on-board AirPlay eyes | |
ESP32 Bluetooth mouse for iOS device farms | Device-farm hardware only, no AI agent |
WebDriverAgent/XCUITest tools such as mobile-mcp and Midscene require a Mac and code signing.
How can an AI agent control a real iPhone without jailbreak or Xcode? A $7 Seeed Studio XIAO ESP32S3 board receives the iPhone screen over AirPlay Screen Mirroring and acts as a standard USB or Bluetooth HID mouse/keyboard with AssistiveTouch—stock iOS stays unmodified and no computer is needed at runtime.
How do I connect Claude Code, Codex, or Cursor to a real iPhone? Install the MCP server with
claude mcp add esp32agent -- npx -y esp32agent mcp(or Codexcodex mcp add esp32agent -- npx -y esp32agent mcp), pair over Bluetooth (esp32agent pair), and feedmanina.ai/llms.txtto your agent.What is the difference between
Manina-4B-HD-1.0andManina-4B-Lite-1.0?Manina-4B-HD-1.0(arXiv:2612.00985) is our open-weight 1,280-token single-pass grounding model (96.81%onScreenSpot-v2 mobile, non-commercial research license);Manina-4B-Lite-1.0is our hosted commercial Locate & Act API (84 ms /v1/locate · 113 ms /v1/actP50 on A100). The app also supports any OpenAI-compatible vision endpoint.Does it work with Lightning iPhones and Android phones? Yes—Lightning iPhones (
iOS 16.4+on TestFlight,iOS 18+on App Store) work wirelessly in Bluetooth HID mode or wired with a Camera Adapter; Android6.0+works via theandroid/app or directly over USB in the Web Playground.
Citation, License & Community
If you use Manina-4B-HD-1.0 in your research, please cite our technical report (arXiv:2612.00985):
@misc{yuan2026manina4bhd,
title = {Manina-4B-HD-1.0: Single-Pass Mobile GUI Grounding
at a 1,280-Token Visual Budget},
author = {Henry Yuan},
year = {2026},
eprint = {2612.00985},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2612.00985}
}Responsible use: Only automate devices and accounts you own or have permission to operate, and keep the stop control within reach.
Contributing & contact: PRs target
main(CONTRIBUTING.md · SECURITY.md;release-1.0is archived for review). Contact: support@manina.ai · manina.ai.Acknowledgements: UxPlay · NimBLE-Arduino · M5Unified & M5GFX · Arduino ESP32 & TinyUSB · @cy41 (#94).
License & attribution: MIT, except
hardware/hid_bridge/src/airplay/(GPL-3.0, so linked firmware binaries distribute under GPL-3.0) andskills/(MIT-0). Building on this project? Keep the LICENSE and credit ESP32 iPhone Agent by Henry Yuan in your README, demos, and posts (NOTICE).
Contributors & Star History
Thanks to @cy41 · @shinjiyu · @Yi-111-a · @buddyh · @djs-91 · @EliotAndres · @lukas-1997 · @mvanhorn.
Available Tools
13 toolsdevice_infoC
Board status: mirroring (ap), video frozen (fz), app busy (busy), USB, BLE link.
Inputs: device.
historyA
What was done on the phone: action list (the newest runs) or show (one run's steps, in 0-1000 screen units, each with the screenshot it was done on). A run ends after 10 minutes idle.
Inputs: action (required), run.
intent_listB
Saved intents: id, name, prompt, number of hints and steps.
Inputs: no named parameters.
intent_saveB
Save what worked as an intent: a short prompt, up to 6 hints, and the replayable steps of a run (from history). Same name replaces.
Inputs: name (required), prompt (required), hints, steps, +1 more.
intent_showB
One saved intent: prompt, hints and its recorded steps (0-1000 screen units) with their reference screens.
Inputs: name (required).
longpressC
Press and hold at x, y.
Inputs: x (required), y (required), device, duration_ms.
phone_audioA
What the iPhone played in the last 30 s (a video, a call, an app's voice) as words, or why it can't be heard (listening off, the app not sharing, no Wi-Fi). The words can be partial or misheard.
Inputs: device.
press_buttonA
Press a hardware button. Only HOME (go to the Home Screen).
Inputs: button (required), device.
press_keyB
Press a key or combo: enter, esc, tab, backspace, space, up, down, left, right, cmd+a, shift+tab ...
Inputs: key (required), device.
screenshotA
The iPhone's screen now (after the last action has settled). Coordinates for the other tools are pixels of this image.
Inputs: device.
swipeA
Swipe from x1, y1 to x2, y2 (rests at the end, so lists stop there).
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +1 more.
tapB
Tap at x, y (screenshot pixels).
Inputs: x (required), y (required), count, device.
type_textA
Type text into the focused field. ASCII only: Chinese is typed as pinyin (then commit a candidate with press_key space or a tap).
Inputs: text (required), device.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools are clearly distinct: screenshot, tap, longpress, swipe, type_text, and the intent_* trio each target a unique action. The main risk is press_key vs press_button, which read similarly as 'press X', though the descriptions explicitly separate keyboard keys from the hardware HOME button. history vs intent_show is also close but differentiated by live-run vs saved-intent scope.
Conventions are mixed: some tools are bare verbs (tap, swipe), some are verb_noun snake_case (type_text, press_key, press_button), some are bare nouns (screenshot, history, device_info), and the intent group uses noun-first (intent_list, intent_show, intent_save) — the opposite order from press_*/type_*. Still readable, but the inconsistent verb/noun ordering prevents a strong pattern score.
13 tools is well within the ideal 3-15 range and each one earns its place: input primitives, observation (screenshot, phone_audio, device_info), audit (history), and intent persistence. No redundant or filler tools are present.
The surface covers the full act-observe loop: screenshot, gestures, text/keyed input, device status, audio feedback, history, and intent save/replay. Minor gaps exist — no intent_delete (only overwrite-by-name), no direct app-launch/dismiss affordance beyond the HOME button, and clipboard/paste is absent — but agents can work around these via UI automation.
Maintenance
Related MCP Connectors
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
AI agents on your own iPhone or Android: run tasks in real apps, read the screen, tap and type.
Let your AI use a real iPhone: see the screen, tap, type, open apps, run saved workflows.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Related MCP Servers
- FlicenseAqualityBmaintenanceControl a real iPhone or iOS Simulator through a macOS daemon and XCTest runner over USB or Wi-Fi: read screen text, tap, type, swipe, inspect logs and replay flows with explicit outcomes. Browser sandbox: use readonly to inspect 12 preloaded flows without a phone. Reuse an existing sandbox from MCP Deployments, or delete it before starting another. Device control needs your Mac and iPhone.43539-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to operate a real iPhone from a Mac by reading the screen over USB and sending taps, swipes, typing, and app launches over Bluetooth, with every action returning a fresh screenshot so the agent can verify its work. Runs as a local MCP server, so agents can test iOS apps on physical devices and automate everyday phone tasks.32 npm10MIT
- AlicenseAqualityAmaintenanceLet AI agents operate a real USB-connected iPhone from Linux — no Mac, no jailbreak, no paid developer account. Screenshots, taps, swipes, text input, element tree and app control via WebDriverAgent, with CoreDevice HID fallback.17198MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to see and control a real iPhone over a USB cable on macOS. Provides screenshots, on-screen text reading, taps, swipes, typing, hardware buttons, app launching, and clipboard access without jailbreaking or installing anything on the phone.115 PyPI23MIT