mobai-mcp
v1.2.1AI-powered mobile device automation for Android and iOS devices, emulators, and simulators
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_devices
List all connected Android and iOS devices, emulators, and simulators
get_device
Get information about a specific device
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID (serial for Android, UDID for iOS) |
start_bridge
Start the on-device bridge (accessibility service on Android, WebDriverAgent on iOS). Required before automation.
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
stop_bridge
Stop the on-device bridge
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
get_screenshot
Capture a screenshot from the device. Returns the file path to the saved PNG.
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
get_ui_tree
Get the UI accessibility tree showing all visible elements with indices for tapping
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
include_keyboard | boolean | Include keyboard elements in the tree (default: false). Useful for interacting with on-screen keyboards. |
only_visible | boolean | Filter to only visible elements (default: true) |
verbose | boolean | Include detailed elements array with bounds (default: false) |
tap
Tap an element by index (from UI tree) or coordinates
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
index | number | Element index from UI tree (preferred) |
x | number | X coordinate (use with y instead of index) |
y | number | Y coordinate (use with x instead of index) |
type_text
Type text on the device (tap input field first to focus)
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
text * | string | Text to type |
swipe
Perform a swipe gesture
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
from_x * | number | Starting X coordinate |
from_y * | number | Starting Y coordinate |
to_x * | number | Ending X coordinate |
to_y * | number | Ending Y coordinate |
duration_ms | number | Duration in milliseconds (default: 300) |
go_home
Navigate to device home screen
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
launch_app
Launch an application by bundle ID
| Parameter | Type | Description |
|---|---|---|
bundle_id * | string | App bundle ID (e.g., com.apple.Preferences, com.android.settings) |
device_id * | string | Device ID |
list_apps
List installed applications on the device
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
get_ocr
Perform OCR text recognition on the current screen (iOS only). Returns detected text with screen coordinates for tapping (already adjusted for tapping).
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
execute_dsl
Execute a batch of automation steps using the DSL (Domain Specific Language). This is the PREFERRED method for complex automation as it's more reliable than sequential API calls. DSL supports: observe, tap, type, toggle, swipe, scroll, open_app, navigate, wait_for, assert_*, if_exists, delay, execute_js (web) Example DSL script: { "version": "0.2", "steps": [ {"action": "observe", "context": "native", "include": ["ui_tree"]}, {"action": "tap", "predicate": {"text_contains": "Settings"}}, {"action": "delay", "duration_ms": 500}, {"action": "observe", "context": "native", "…
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
script * | object | DSL script object with version, steps, and optional on_fail |
run_agent
Run an AI agent to perform a task autonomously. The agent will observe the screen, make decisions, and execute actions to complete the task.
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
task * | string | Task description (e.g., 'Open Settings and enable WiFi') |
agent_type | string | Agent type (default: toolagent) |
use_vision | boolean | Enable vision/screenshots (default: from app settings) |
web_list_pages
List available web pages (browser tabs and WebViews) for web automation
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
web_get_dom
Get the DOM tree of the current web page
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
web_click
Click an element in the web page using CSS selector
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
selector * | string | CSS selector (e.g., 'button.submit', '#login-btn') |
web_type
Type text into a web element using CSS selector
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
selector * | string | CSS selector for the input element |
text * | string | Text to type |
web_execute_js
Execute JavaScript in the web page context
| Parameter | Type | Description |
|---|---|---|
device_id * | string | Device ID |
script * | string | JavaScript code to execute (use 'return' for results) |
http_request
Make a raw HTTP request to the MobAI API. Use this for advanced operations not covered by other tools. Base URL: http://127.0.0.1:8686/api/v1 Common endpoints: - GET /devices - List devices - GET /devices/{id}/screenshot - Take screenshot - GET /devices/{id}/ui-tree - Get UI tree - POST /devices/{id}/dsl/execute - Execute DSL script - POST /devices/{id}/agent/run - Run AI agent
| Parameter | Type | Description |
|---|---|---|
method * | string | HTTP method |
url * | string | Full URL or endpoint path (e.g., /devices) |
body | string | Request body as JSON string |
timeout_ms | number | Timeout in milliseconds (default: 600000) |