iPhone MCP
Enables AI agents to control real iPhones and simulators on macOS, allowing for UI interaction, testing, and automation.
README
<div align="center"> <img src="https://raw.githubusercontent.com/blitzdotdev/iPhone-mcp/refs/heads/master/BlitzBlue.png" width="100" /> <br /><br /> <p>iPhone MCP server that lets AI use iPhones</p>
iPhone-mcp
MCP server that lets AI agents control real iPhones and iPhone simulators on MacOS. Works with Claude Code, Cursor, Codex, OpenCode, and any MCP-compatible AI agent.
Requirements
- macOS
- Xcode (install from App Store or
xcode-select --install) - Node.js 18+
- Homebrew
Installation
npm install @blitzdev/iphone-mcp
Quick Start
Global (use in any project)
npx @blitzdev/iphone-mcp --setup-all
This installs dependencies and configures @blitzdev/iphone-mcp for all your AI agents. It automatically sets up Claude Code, Cursor, Codex, OpenCode.
<i>NOTE: For Cursor, you need to enable the blitz-iphone MCP server in Cursor Settings</i>
Project-scoped (one project only)
cd <your project>
npx @blitzdev/iphone-mcp --setup-here
This prompts you to choose which AI agents to configure (Claude Code, Cursor, Codex, OpenCode) and writes the config files into your project directory. @blitzdev/iphone-mcp will only be available when you open an agent inside that directory.
Then just ask
Open a new AI agent session and ask:
> scan the simulator screen and tell me what you see
> connect to my iPhone and test the login flow
> find bugs in my app — tap around, try edge cases, report anything weird
<!-- NOTE: Video showing Claude Code responding to "test my app", scanning UI, tapping buttons, finding a bug, and screenshotting the result -->
What can it do?
| Capability | Simulator | Physical iPhone |
|---|---|---|
| Tap, swipe, type text | Yes | Yes |
| Press buttons (Home, Lock, Siri) | Yes | Yes |
| Scan UI elements with coordinates | Yes | Yes |
| Take screenshots | Yes | Yes |
| List & launch installed apps | Yes | Yes |
| Auto-detect devices | Yes | Yes |
| Live screen viewer in browser | -- | Yes |
<!-- NOTE: Image showing a split view — left side has Claude Code terminal with scan_ui output, right side shows the corresponding simulator screen with UI elements highlighted -->
iPhones
Connect your iPhone via USB or make sure it's on the same Wi-Fi network (home/office networks work, public cafe Wi-Fi won't).
First-time setup — your iPhone needs:
- Developer Mode enabled (Settings > Privacy & Security > Developer Mode)
- Trust this computer when prompted on the phone
Then ask your agent:
> connect to my iPhone
The agent will build and install WebDriverAgent on your phone (takes 1-3 minutes the first time), then give you a URL like http://localhost:5152?udid=... — open it in your browser to see a live view of your phone screen.
<!-- NOTE: Image showing the browser-based viewer with an iPhone screen displayed in a dark bezel frame -->
Simulators
Boot any iPhone simulator, then ask your AI agent to interact with it. No extra setup needed beyond --setup-all or --setup-here.
> what apps are installed on the simulator?
> launch Safari and go to example.com
> take a screenshot
<!-- NOTE: Image showing terminal output of the list_apps tool with clean formatted app list -->
Example session
You: test the checkout flow in my app
Agent: Let me scan the simulator to see what's on screen.
[calls scan_ui]
I can see the home screen. Let me launch your app first.
[calls launch_app with bundleId "com.myapp"]
[calls get_screenshot]
The app is open on the main screen. I see a "Shop" tab at the bottom.
Let me tap it and walk through the checkout flow.
[calls device_action: tap on "Shop" tab]
[calls scan_ui]
I see a list of products. Let me add one to cart...
<!-- NOTE: Video showing a full end-to-end testing session — agent launches app, navigates through screens, finds a UI bug, screenshots it, and reports the issue -->
MCP Tools reference
These are the tools your AI agent can call:
| Tool | What it does |
|---|---|
get_execution_context |
Find available simulators and iPhones |
scan_ui |
Find tappable elements — buttons, links, text fields — with their coordinates |
describe_screen |
Full UI element hierarchy (more detail than scan_ui) |
device_action |
Tap, swipe, press buttons, type text, press keys |
device_actions |
Run multiple actions in sequence |
get_screenshot |
Save a screenshot and return the file path |
list_devices |
List all simulators and physical devices |
launch_app |
Launch an app by bundle ID |
list_apps |
List installed apps |
setup_device |
Build & install WebDriverAgent on a physical iPhone |
Manual MCP configuration
If you'd rather configure things yourself:
Claude Code — add to ~/.claude.json (global) or .mcp.json (project):
{
"mcpServers": {
"blitz-iphone": {
"command": "npx",
"args": ["@blitzdev/iphone-mcp"]
}
}
}
Cursor — add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"blitz-iphone": {
"command": "npx",
"args": ["@blitzdev/iphone-mcp"]
}
}
}
Codex — add to ~/.codex/config.toml (global) or .codex/config.toml (project):
[mcp_servers.blitz-iphone]
command = "npx"
args = ["@blitzdev/iphone-mcp"]
OpenCode — add to opencode.json in your project root:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"blitz-iphone": {
"type": "local",
"command": ["npx", "-y", "@blitzdev/iphone-mcp"],
"enabled": true
}
}
}
Troubleshooting
"No booted simulator found" — Open Simulator.app or run xcrun simctl boot "iPhone 16" first.
Physical device not detected — Make sure Developer Mode is on, the phone is connected via USB, and you've tapped "Trust" on the phone.
WDA build fails — Open Xcode > Settings > Accounts and make sure an Apple ID is signed in. Xcode needs a signing identity to build WDA.
"Connection refused" errors — The idb companion may have crashed. Run npx @blitzdev/iphone-mcp --setup-all again to re-initialize.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。