How do I let Codex operate my iPhone?
Register one local MCP server and Codex can see and use a real iPhone. The server is Manina AI CLI (esp32agent). It talks over Bluetooth, or your Wi-Fi, to a small XIAO ESP32S3 board on the phone. The board receives the iPhone’s Screen Mirroring and acts as its mouse and keyboard, so iOS stays stock: no jailbreak, no Xcode, no developer account.
No board yet? Buy a XIAO ESP32S3, then flash it in your browser.
What you need
Section titled “What you need”- A standard Seeed Studio XIAO ESP32S3 (8 MB flash, 8 MB PSRAM), with its antenna attached: where to buy.
- Board firmware v0.2.2 or later, from the installer in Chrome or Edge.
- An iPhone XS or newer on iOS 18 (or iPhone 8 / X on iOS 16.4+), with cellular data.
- A computer with Bluetooth where Codex runs. Screenshots also need ffmpeg.
1. Install the CLI
Section titled “1. Install the CLI”curl -fsSL https://manina.ai/install.sh | shOn Windows PowerShell: irm https://manina.ai/install.ps1 | iex. With Node.js 18+: npm install -g esp32agent.
2. Pair the board and mirror the screen
Section titled “2. Pair the board and mirror the screen”Plug the board into the iPhone, then within three minutes of powering it:
esp32agent devicesesp32agent pairOn the iPhone, join the board’s hotspot (ESP32Agent-…; find the password), turn on Control Center → Screen Mirroring → ESP32 Agent, and turn on Settings → Accessibility → Touch → AssistiveTouch. Check it:
esp32agent screenshotesp32agent calibrate3. Add the MCP server to Codex
Section titled “3. Add the MCP server to Codex”codex mcp add esp32agent -- esp32agent mcpCodex now has these tools: screenshot, tap, longpress, swipe, type_text, press_key, press_button, device_info, history, intent_list, intent_show and intent_save. Pairing stays in the terminal.
4. Give it a small first task
Section titled “4. Give it a small first task”Use esp32agent to take a screenshot of my iPhone. Open Settings and go to Wi-Fi. Take a fresh screenshot after each action to check the result. Stop when the Wi-Fi page is visible.
The agent should look → take one action → look again. Watch the first run and stop Codex if it goes off track. Codex supplies the reasoning and the model; the CLI only provides the phone controls.
Limits
Section titled “Limits”- Over Bluetooth, screenshots can be about a second behind. Put the board on your Wi-Fi with
esp32agent net joinfor near-live screenshots. - The CLI can’t open or install apps directly: the agent goes through the Home Screen or search. HOME is the only hardware button.
- Typing is ASCII, one key per character; Chinese goes through the Pinyin keyboard.
- While the iPhone app is running a task, CLI commands answer
busy. Use one at a time.
Screenshots go to the model Codex uses. Check its data policy before working on personal accounts, and use only devices and accounts you own or may control (disclaimer).
Full command list, Wi-Fi link and logs: CLI & AI agents. The same server works in Claude Code and other MCP clients.
