ios-device-mcp
Provides tools for driving a real iPhone or iPad over USB for iOS app development testing: building and installing apps, launching with console log capture, reading the accessibility tree, performing taps, swipes and typing, taking screenshots, and recording audio.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ios-device-mcplaunch my app on the iPhone and show me the login screen's accessibility tree"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ios-device-mcp
An MCP server that drives a real iPhone or iPad (not the simulator) over USB for app development testing. It can build and install your app, launch it with console log capture, read the accessibility tree, tap, swipe, type and take screenshots.
How it works
devicectl(Xcode's CoreDevice CLI) lists devices and installs, uninstalls and launches apps.runner/is a small XCUITest bundle whose single test never ends. It runs an HTTP server on the device (port 22087) and maps requests to XCUITest calls (XCUICoordinate.tap,typeText,snapshot(),XCUIScreen.screenshot()…).src/is the Node MCP server. It builds the runner withxcodebuild build-for-testing, starts it withxcodebuild test-without-building, and reaches it through the device's CoreDevice tunnel address (fd…::1). The tunnel works over USB and Wi-Fi with no port forwarding.
The driver starts automatically the first time a UI tool runs, takes about 5–8 s to start, and stops when the MCP server exits.
Related MCP server: iphone-mcp
Requirements
macOS with Xcode 16+ and
xcodegen(brew install xcodegen);ffmpegfor audio recording (brew install ffmpeg)Node 20+
An iPhone/iPad that is paired, has Developer Mode on, is unlocked, and is registered in your developer team
Setup
git clone <repo-url> ios-device-mcp && cd ios-device-mcp
npm install && npm run buildYour Team ID is in Xcode > Settings > Accounts (select the team), or on developer.apple.com under Membership. Then register the server with Claude Code for all your projects:
claude mcp add --scope user ios-device \
-e IOS_DEVICE_MCP_TEAM_ID=<TEAMID> \
-- node "$PWD/dist/index.js"Other MCP clients: run node dist/index.js over stdio with the same env vars. See .mcp.example.json for a project-scoped config.
Env var | Purpose |
| Required. Team used to sign the runner |
| Runner bundle ID prefix (default |
| UDID or name of the device to use |
|
|
| Driver port (default 22087) |
| Mac mic name substring for recordings (default: first non-iPhone/iPad input) |
| Where WAVs go (default |
The pre-rename IPHONE_MCP_* names are still read as a fallback.
Device selection: if neither IOS_DEVICE_MCP_DEVICE nor a tool's device argument is set, the server only picks a device that is physically connected over USB. It never picks a Wi-Fi-only device implicitly.
First run on a device: iOS asks for the passcode to allow UI automation. Keep the device unlocked while the driver starts.
Agent skill (optional)
The repo also ships a skill that teaches your agent how to use these tools well: the build → launch → describe → act → verify loop, element IDs over coordinates, waiting instead of sleeping, and the device-safety rules. Install it with the skills CLI:
npx skills add ChrisThoma/ios-device-mcpOr copy skills/ios-device-mcp into ~/.claude/skills/. The skill only
guides the agent; the MCP server above is what does the work.
Tools
Tool | What it does |
| Show devices and installed apps |
|
|
| Install a |
| Launch/relaunch; |
| Read captured output; |
| Force-quit an app |
| List / copy files from an app's data container (dev-signed apps). |
| JPEG scaled to points, so image pixels equal tap coordinates |
| Compact accessibility tree with |
| Coordinate gestures (points). |
| Record the Mac mic for N seconds |
| Set media volume to a level (0–1, 16 steps), verified on the system volume indicator |
| Find by text / accessibility ID / type, with waiting and |
| Type into the focused field ( |
|
|
| Open a URL or deep link |
| Rotate the interface |
| Manage the on-device driver explicitly ( |
Text matching in tap_element tries exact label/ID/value matches first, then whole-word matches in short labels. Every result says which element was tapped. Give your app accessibility identifiers and match with id for the most reliable tests.
Known limitations
Foreground app: detected from the last launched app, else by scanning installed apps' states, else SpringBoard.
Taps go to the foreground app: coordinates are anchored to the app in front. Anchored to SpringBoard, a tap on an in-app alert button also reached the view behind the alert.
Home button:
XCUIDevice.press(.home)is ignored on some iOS 26 builds, so the driver falls back to activating SpringBoard. The press takes about 2–3 s.Landscape: coordinates are screen points in the current orientation, and landscape has had little testing.
Logs:
os_log/Loggercapture works like Xcode's console: the app is launched withOS_ACTIVITY_DT_MODE(andOS_ACTIVITY_MODE=debug), which mirrors its log messages to stderr. Only messages from the app's own process are captured, not from system daemons or extensions. Private values show in plain text. Lines show[category]but not the subsystem.Recording sync: recordings use
ffmpeg(brew install ffmpeg), and the terminal needs microphone permission. Recording start is measured to about ±70 ms. XCUITest takes about 0.4–0.7 s to deliver a tap, so the result gives a window ("sent at … completed at …"), and in testing the sound always landed inside it.Volume: iOS has no API to set the volume, and the level an app can read goes stale.
set_volumepresses the buttons and reads SpringBoard's volume indicator to verify the level, so the indicator briefly shows on screen.No lock/unlock or Face ID simulation.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
remote debug iOS/Android/Unity/Godot/Flutter/RN/Web on real-device.ui-tree/screenshots/taps,tests.
Build, run, and inspect iOS apps in disposable hosted Simulators from cloud coding agents.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to control real iPhones and simulators on macOS, allowing for UI interaction, testing, and automation.56 npm91MIT
- AlicenseNot gradedqualityCmaintenanceControl a real, physical iPhone from an MCP client, enabling tapping, swiping, typing, reading messages, and navigating apps via Apple's UI-automation channel.7 npmMIT
- AlicenseAqualityAmaintenanceEnables driving an iOS Simulator from a model: taking screenshots, reading the UI tree, tapping, swiping, typing, managing app lifecycle and device state such as appearance, permissions, location, and notifications, without code signing or a physical device.25184 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to control a physical iPhone from macOS through local phone tools, including USB capture, Bluetooth HID, and AssistiveTouch interactions. It also exposes relay tools for remote access over Streamable HTTP with optional OAuth.MIT