phonectl-mcp
Enables AI agents to see and control a real iPhone running iOS 27 or later over USB, including screenshots, on-screen text extraction with positions, taps, long presses, swipes, typing, key/chord and hardware button presses, app launching and listing, clipboard access, and status checks.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
phonectl-mcp
An MCP server that lets AI agents see and drive a real iPhone over a USB cable: screenshots, the text on screen, taps, swipes, typing, hardware buttons, apps and the clipboard. macOS only.
Nothing is installed on the phone and nothing is jailbroken. It uses the developer services iOS already exposes to a trusted Mac (the same ones Xcode uses), and the touch and keyboard input path that iOS 27 opened over USB.
Requirements
A Mac. The USB tunnel and the on-screen text recognition (Apple Vision) are macOS-only.
An iPhone on iOS 27 or later. Taps, swipes and typing need iOS 27. Screenshots and app control may also work on iOS 17–26, but this is untested.
A USB data cable (a charge-only cable won't work).
On the phone: Developer Mode turned on, and this Mac trusted.
phonectl doctorwalks you through both.uv.
Tested on an iPhone 17 Pro with iOS 27.2 and macOS 27.
Related MCP server: iphone-use
Install
uv tool install phonectl-mcp
phonectl install-service
phonectl doctorinstall-serviceruns the server at login as a launchd job. It listens onhttp://127.0.0.1:47321/mcpand creates an access token in~/.config/phonectl/token. It also prints the client setup below.doctorchecks every link from the cable to the server and says what to do about anything that fails.phonectl doctor --fixmounts the developer disk image if it is missing.
Connect a client
Claude Code:
claude mcp add --scope user --transport http phone http://127.0.0.1:47321/mcp \
--header "Authorization: Bearer $(cat ~/.config/phonectl/token)"Any other client that speaks streamable HTTP needs two things: the URL above, and the header Authorization: Bearer <token>.
Why one server for every client
The phone keeps a single control connection to the Mac. If two programs each open their own, they keep knocking each other off. So one resident server owns the phone, and every agent and script connects to that server. Your own scripts can call the same tools with any MCP client library.
This only makes the connection safe to share. The server does not stop two agents from tapping the screen at the same time, so let one drive at a time.
Tools
Coordinates are iOS points, which match the pixels of the screenshot the server returns (402×874 on an iPhone 17 Pro).
Tool | What it does |
| Captures the screen. |
| Returns the text on screen with positions in points, as JSON. Much cheaper than an image when an agent or script only needs to find a button. |
| Touch. |
| Drag. To scroll down, swipe upward. |
| Types into the focused field. ASCII is typed key by key. Other text (Chinese, emoji) is pasted through the clipboard, which replaces what was on it. |
| Presses a key or chord, such as |
| Presses a hardware button: |
| Opens apps and finds their bundle ids. |
| Reads and writes the phone's clipboard. |
| Reports the server and the phone link. |
The tools that act on the phone (tap, long_press, swipe, type_text, press_key, press_button, launch_app) return a screenshot taken afterwards; pass screenshot=False to skip it. Taps are not confirmed by the phone, so use that screenshot to see whether a tap landed.
Settings
Set these environment variables before running phonectl install-service; it copies them into the service.
Variable | Default | Meaning |
| first USB iPhone | Which phone to use when more than one is connected. |
|
| HTTP port. The server only listens on 127.0.0.1. |
|
| Where the access token is kept. |
|
| Pixels per point. Use 2 on an iPhone SE, XR or 11. It only sets the screenshot size; taps stay correct either way. |
|
| Languages for |
|
| Seconds to wait before the screenshot that follows an action. |
|
| Seconds without input after which the input stream to the phone is closed. The next input reopens it, which takes about 0.6 s. |
|
| Seconds to wait for the phone before a call fails, on top of the time a gesture takes. |
|
| Log level ( |
Other commands: phonectl restart restarts the server (for example after upgrading with uv tool upgrade phonectl-mcp), and phonectl uninstall-service removes it. Running phonectl-mcp with no arguments speaks stdio for a single client; this is meant for debugging.
Troubleshooting
Run phonectl doctor first. It tells you which link is broken.
Symptom | Fix |
No iPhone found | Use a data cable, unlock the phone, then replug. |
"Mac is not trusted" | Unlock the phone, replug, and tap Trust. |
Developer Mode switch is missing | Open Xcode once with the phone connected. The switch then appears under Settings › Privacy & Security. |
Screenshots fail | Run |
Taps do nothing | Taps need iOS 27 or later. Also make sure the screen is on and unlocked. |
Clients cannot connect | Run |
Security
The server listens only on
127.0.0.1and rejects any request without the token.An agent connected to it can do anything you could do with your finger: send messages, buy things, delete data. Give it the narrowest instructions you can, and watch the screen while it works.
You use it at your own risk. Automating third-party apps may break their terms of service.
Development
git clone https://github.com/jiefeng-ai/phonectl-mcp
cd phonectl-mcp
uv sync
uv run pytestTo run your working copy as the service, run uv run phonectl install-service from the clone.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Cloud iPhones and Macs with Xcode for AI agents: build, run and test iOS apps, use the screen.
Cloud iPhone Simulators for AI agents: build the Xcode project, read the screen, tap by label, test.
Give an AI agent an iPhone to see, tap and type on over MCP. Free early access (Simulator).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control real iPhones and simulators on macOS, allowing for UI interaction, testing, and automation.65 npm95MIT
- FlicenseAqualityAmaintenanceControl 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.643487-
- 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.38 npm10MIT
- AlicenseBqualityFmaintenanceEnables AI agents to see and operate a real USB-connected iPhone from a Linux Docker host — taking screenshots with region zoom, reading the element tree, tapping, swiping, long-pressing, typing text, pressing hardware buttons, listing/launching/terminating apps, and opening URLs. Automatically recovers from replugs and crashes, re-signs its automation agent before expiry, and falls back to a signing-free HID path on newer iOS.13MIT