Skip to content

Can Claude Code or Codex control a real iPhone?

Yes. You can use Claude Code or Codex to control a real iPhone connected by USB through an MCP server on your Mac. With the Mobster MCP server, Claude Code passed 9 of 14 read-only tasks on an iPhone 15 Pro at a median time of 25 seconds. Codex passed 9 of 14 at a median time of 34 seconds. Both ran on 14 October 2026, with one run per task, graded blind. Neither agent has an iPhone tool of its own. Both use tools over MCP.

How the agent reaches the phone

Your agent starts the Mobster MCP server, mobster mcp, on your Mac. The server talks over USB to WebDriverAgent, the open-source XCTest runner from the Appium project, on the phone. Each screen call returns the screen’s accessibility tree: the labelled buttons, fields and switches that VoiceOver reads. The agent picks a control by its name and calls tap, type_text or swipe.

Add it to Claude Code or Codex

  1. Download Mobster for Mac and set up your iPhone in the app. You need an Apple silicon Mac, Xcode signed in to an Apple ID, Developer Mode on the iPhone and a USB cable. A free Apple ID works.
  2. In Mobster for Mac, open Settings › Connectors and press Add next to Claude Code or Codex. To add it from a terminal, run these:
curl -fsSL https://mobster.dev/install.sh | shmobster mcp install claude-code codex
  1. Give your agent a first task that only reads:
Call list_devices, then open Settings on my iPhone and read me the first five rows. Don't change anything.

Give Claude Code or Codex your real iPhone through MCP covers each step of the setup, what list_devices returns and how the device lock works.

Measured results with Mobster and phone-harness

The test covered 14 read-only tasks, from reading Settings to listing Instagram DM threads and asking Maps for a drive time. All ran on one iPhone 15 Pro with iOS 26.0.1. Benchmarks describes the method.

Agent and phone toolPassedMedian timeMean list price a task
Claude Code (Sonnet 5.5) with the Mobster MCP9 of 1425 s$0.065
Codex (gpt-6.1-sol) with the Mobster MCP9 of 1434 s$0.072
Codex (gpt-6.1-sol) with phone-harness 0.3.27 of 1478 s$0.120
Claude Code (Sonnet 5.5) with phone-harness 0.3.25 of 14120 s$0.132

phone-harness drives the phone through iPhone Mirroring on your Mac and needs the iPhone locked. The Mobster runs used USB with the iPhone unlocked. Builds changed during those runs that evening. Each task ran once, so one task moves a rate by 7 points. Every agent failed two tasks: watching 20 Instagram Reels in a row and watching the TikTok feed.

Where the agent stops

  • A locked iPhone. The call fails with “Your iPhone is locked. Unlock it and try again. No action was taken.” You unlock it yourself.
  • A send, a purchase, a post or a delete. On a real iPhone, each one shows an approval card in Mobster for Mac. The agent can’t answer the card.
  • Face ID, a passcode or a CAPTCHA. Mobster doesn’t get past them. Games that draw their own screens don’t work.

What it costs

Mobster for Mac is free on any number of iPhones. Claude Code and Codex keep running on your own plan or API key.

Questions

  • Does the same setup work on the iOS simulator?

    Yes. The Mobster MCP server also drives an iOS simulator that Mobster manages. A simulator needs no Developer Mode, cable or signing.

  • Can I stop the agent from using my personal iPhone?

    Yes. Add the server with --allow-device and the name of your test phone, such as --allow-device "Test iPhone". Mobster refuses any other real iPhone.

Sources