loading…
Search for a command to run...
loading…
An MCP server for reliable iOS Simulator automation that enables agents to control devices, read accessibility UI trees, and capture screenshots. It supports de
An MCP server for reliable iOS Simulator automation that enables agents to control devices, read accessibility UI trees, and capture screenshots. It supports deterministic grounded actions like tapping, typing, and swiping to create a closed-loop observe-reason-act cycle.
MCP server for reliable iOS Simulator automation.
Control simulators, read accessibility UI trees, capture screenshots, and run grounded agent actions through one Model Context Protocol server.
Most mobile automation breaks when scripts act without observing current screen state.
app-screen-mcp fixes that by combining:
idb ui describe-alltap, type_text, swipe, hardware buttons)This gives agents a closed loop: observe, reason, act, verify.
UI tree + optional screenshot)MCP Client / Agent
|
v
app-screen-mcp
|
+--> xcrun simctl (devices, app lifecycle, screenshots)
|
+--> idb (UI tree, tap, swipe, type, hardware buttons)
|
v
iOS Simulator
idb toolingManual install for idb:
brew tap facebook/fb
brew install idb-companion
pip3 install fb-idb
bash <(curl -fsSL https://raw.githubusercontent.com/xmuweili/app-screen-mcp/main/install.sh)
The script checks/installs:
idb-companionfb-idbapp-screen-mcp (global npm package)npm install -g app-screen-mcp
git clone https://github.com/xmuweili/app-screen-mcp.git
cd app-screen-mcp
npm install
npm run build
Config file:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["/absolute/path/to/app-screen-mcp/dist/index.js"]
}
}
}
Common config paths:
.cursor/mcp.json.vscode/mcp.jsonUse the key your client expects: mcpServers or mcp.servers.
{
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["/absolute/path/to/app-screen-mcp/dist/index.js"]
}
}
}
Restart your MCP client after updating config.
| Tool | Purpose |
|---|---|
list_simulators |
List simulators and boot state |
boot_simulator |
Boot simulator by UDID |
launch_app |
Launch app by bundle_id |
terminate_app |
Force-quit app by bundle_id |
get_ui_tree |
Return normalized accessibility tree |
take_screenshot |
Capture JPEG screenshot with compression and unchanged-image suppression |
get_screen_summary |
Return tree + optional screenshot with token-saving options |
tap |
Tap absolute (x, y) |
tap_relative |
Tap relative (rx, ry) in [0,1] |
type_text |
Type into focused field |
swipe |
Swipe between points with optional duration |
press_button |
Press HOME, LOCK, SIDE_BUTTON, or SIRI |
find_elements |
Search tree by label/value/hint text |
tap_text |
Find best text match and tap target point |
tap_id |
Tap by accessibility identifier |
{
"name": "get_screen_summary",
"arguments": {
"include_image": false,
"compact_tree": true
}
}
{
"name": "get_screen_summary",
"arguments": {
"include_image": true,
"max_dim": 720,
"quality": 55
}
}
{
"name": "get_screen_summary",
"arguments": {
"include_image": true,
"only_if_changed": true,
"previous_image_hash": "<last_hash>"
}
}
1. get_screen_summary(include_image=false)
2. find_elements("Sign In")
3. tap_id("login_email") or tap_text("Email")
4. type_text("[email protected]")
5. tap_text("Sign In")
6. get_screen_summary(include_image=true, only_if_changed=true)
Permission behavior is enforced by the MCP client, not this server.
Allow this server in ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__ios-simulator__*"]
}
}
ios-simulator must match your MCP server name.
Codex uses command-level approvals. Use “always allow” for recurring safe command prefixes when prompted.
npm install
npm run build
npm start
Main implementation:
src/index.tsThe integration tests run against a real booted iOS Simulator.
npm test
Before running tests:
demo-app/ if not already installed.Test helpers:
tests/helpers/client.tstests/helpers/ui.tstests/helpers/vision.tsNo iOS simulator is currently runningboot_simulator.idb command failuresidb-companion and fb-idb installation and PATH.args instead of relying on shell PATH.Contributions are welcome.
For tool changes:
src/index.tssrc/index.tstests/demo-app.test.tsMIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"app-screen-mcp": {
"command": "npx",
"args": []
}
}
}