How zhongerxin/iphone-use works
iPhone Use is a local MCP product for controlling a real iPhone over USB through WebDriverAgent (WDA), with setup guidance and a live screen preview. The principal workflow is an assistant invoking MCP tools: the server routes setup or phone actions, obtains app and page state or performs gestures through WDA, and returns observations and screenshots. A separate widget displays the live screen. The graph includes documented WorkBuddy and Doubao host adapters; unsampled wiring is omitted unless documented. The experimental tree-handle driver is excluded as an opt-in experiment.
Main entry points: iphone_use.py Codex MCP · wda_screen.py Screen capture · mcp_server.py WorkBuddy MCP · wda_controller.py Phone actions
Components 21
Host integrations
- Codex MCP
server/iphone_use.py - WorkBuddy MCP
workbuddy/mcp_server.py - WorkBuddy adaptation
workbuddy/host_text.py - WorkBuddy frame source
workbuddy/preview.py - Doubao MCP
doubao/mcp_stdio.py - Doubao adaptation
doubao/doubao_text.py
MCP runtime
- Setup and readiness
server/wda_setup.py - Usage analytics
server/analytics.py
Device operations
- Phone actions
server/wda_controller.py - WDA transport
server/wda_client.py - Text input
server/wda_text.py - Screenshot processing
server/wda_image.py - App discovery
server/wda_apps.py
Screen preview
- Screen capture
server/wda_screen.py - Screen widget
ui/src/app.ts - USB forwarding
tooling/forward.mjs - Screen streaming
tooling/screen-stream.mjs
Other components
- Assistant
- iPhone
- WebDriverAgent
- Apple catalog
Connections 25
- Assistant → Codex MCP: calls tools
README.md - Assistant → WorkBuddy MCP: calls tools
README.md - Assistant → Doubao MCP: calls tools
README.md - WorkBuddy MCP → Codex MCP: adapts runtime
workbuddy/mcp_server.py - WorkBuddy MCP → WorkBuddy adaptation: rewrites guidance
workbuddy/mcp_server.py - WorkBuddy MCP → WorkBuddy frame source: starts preview
workbuddy/mcp_server.py - Doubao MCP → Codex MCP: adapts runtime
doubao/mcp_stdio.py - Doubao MCP → Doubao adaptation: adapts text
doubao/doubao_text.py - Codex MCP → Setup and readiness: routes setup
server/iphone_use.py - Codex MCP → Phone actions: routes actions
server/iphone_use.py - Codex MCP → App discovery: routes app lookup
server/iphone_use.py - Codex MCP → Screen capture: routes preview
server/iphone_use.py - Codex MCP → Usage analytics: records usage
server/iphone_use.py - Phone actions → WDA transport: sends commands
server/wda_controller.py - Phone actions → Text input: delegates input
server/wda_controller.py - Phone actions → Screenshot processing: processes screenshots
server/wda_controller.py - WDA transport → WebDriverAgent: sends HTTP
README.md - WebDriverAgent → iPhone: controls device
README.md - App discovery → WDA transport: queries installed apps
README.md - App discovery → Apple catalog: looks up catalog
server/wda_apps.py - Screen capture → WebDriverAgent: captures frames
README.md - Screen widget → Screen capture: shows live screen
README.md - WorkBuddy frame source → Screen capture: reads frames
workbuddy/preview.py - USB forwarding → WebDriverAgent: forwards USB
README.md - Screen streaming → Screen capture: streams frames
README.md