Mobai Mcp
About
MCP (Model Context Protocol) server for MobAI (https://mobai.run) - AI-powered mobile device automation. This server enables AI coding assistants like Cursor, Windsurf, Cline, and other MCP-compatible tools to control Android and iOS devices, emulators, and simulators.
Details
- Author
- MobAI-App
- Downloads
- 329
- Categories
- Developer Tools, Other
Jump to
- Device Control: List, connect, and manage Android/iOS devices
- UI Automation: Tap, type, swipe, and interact with native apps
- Web Automation: Control Safari/Chrome and WebViews with CSS selectors
- DSL Batch Execution: Execute multiple automation steps efficiently
- AI Agent: Run autonomous agents to complete complex tasks
- Screenshot Capture: Capture and save device screenshots
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Mobai McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Run the server via npx -y mobai-mcp and configure it as an MCP server in your AI tool's settings. For example, in Cursor add to .cursor/mcp.json with the command and args shown above. The server uses stdio transport.
list_devices
List all connected Android and iOS devices, emulators, and simulators
get_device
Get information about a specific device
start_bridge
Start the on-device bridge (accessibility service on Android, WebDriverAgent on iOS). Required before automation.
stop_bridge
Stop the on-device bridge
get_screenshot
Capture a screenshot from the device. Returns the file path to the saved PNG.
get_ui_tree
Get the UI accessibility tree showing all visible elements with indices for tapping
tap
Tap an element by index (from UI tree) or coordinates
type_text
Type text on the device (tap input field first to focus)
swipe
Perform a swipe gesture
go_home
Navigate to device home screen
launch_app
Launch an application by bundle ID
list_apps
List installed applications on the device
get_ocr
Perform OCR text recognition on the current screen (iOS only). Returns detected text with screen coordinates for tapping (already adjusted for tapping).
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", "include": ["ui_tree"]} ], "on_fail": {"strategy": "retry", "max_retries": 2} }
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.
web_list_pages
List available web pages (browser tabs and WebViews) for web automation
web_navigate
Navigate to a URL in the browser
web_get_dom
Get the DOM tree of the current web page
web_click
Click an element in the web page using CSS selector
web_type
Type text into a web element using CSS selector
web_execute_js
Execute JavaScript in the web page context
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
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mobai mcp": {
"mobai": {
"command": "npx",
"args": [
"-y",
"mobai-mcp"
]
}
}
}
}
McpServers
{
"mobai": {
"command": "npx",
"args": [
"-y",
"mobai-mcp"
]
}
}
MobAI MCP Server
MCP (Model Context Protocol) server for MobAI - AI-powered mobile device automation. This server enables AI coding assistants like Cursor, Windsurf, Cline, and other MCP-compatible tools to control Android and iOS devices, emulators, and simulators.
Features
- Device Control: List, connect, and manage Android/iOS devices
- UI Automation: Tap, type, swipe, and interact with native apps
- Web Automation: Control Safari/Chrome and WebViews with CSS selectors
- DSL Batch Execution: Execute multiple automation steps efficiently
- AI Agent: Run autonomous agents to complete complex tasks
- Screenshot Capture: Capture and save device screenshots
Prerequisites
- Node.js 18+
- MobAI desktop app running locally (provides the HTTP API on port 8686)
- Connected Android or iOS device (or emulator/simulator)
Installation & Configuration
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"mobai": {
"command": "npx",
"args": ["-y", "mobai-mcp"]
}
}
}
Claude Desktop
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"mobai": {
"command": "npx",
"args": ["-y", "mobai-mcp"]
}
}
}
Windsurf
Add to Windsurf MCP config:
{
"mcpServers": {
"mobai": {
"command": "npx",
"args": ["-y", "mobai-mcp"]
}
}
}
Cline / Other MCP Clients
Configure according to your client's MCP server setup. The server uses stdio transport.
{
"command": "npx",
"args": ["-y", "mobai-mcp"]
}
Available Tools
Device Management
-list_devices - List all connected devices
- get_device - Get device information
- start_bridge - Start on-device automation bridge
- stop_bridge - Stop automation bridge
UI Automation
-get_screenshot - Capture device screenshot
- get_ui_tree - Get accessibility tree
- tap - Tap element by index or coordinates
- type_text - Type text
- swipe - Perform swipe gesture
- go_home - Navigate to home screen
- launch_app - Launch app by bundle ID
- list_apps - List installed apps
DSL Execution
-execute_dsl - Execute batch automation script
AI Agent
-run_agent - Run autonomous agent for complex tasks
Web Automation
-web_list_pages - List browser tabs/WebViews
- web_navigate - Navigate to URL
- web_get_dom - Get DOM tree
- web_click - Click element by CSS selector
- web_type - Type into element by CSS selector
- web_execute_js - Execute JavaScript
Low-Level
-http_request - Make raw HTTP request to MobAI API
Available Resources
- mobai://api-reference - Complete API documentation
- mobai://dsl-guide - DSL batch execution guide
- mobai://native-runner - Native app automation guide
- mobai://web-runner - Web automation guide
Example Usage
List devices and take screenshot
Use the list_devices tool to see connected devices.
Then use get_screenshot with the device ID.
Automate Settings app
Use execute_dsl with:
{
"version": "0.2",
"steps": [
{"action": "open_app", "bundle_id": "com.apple.Preferences"},
{"action": "delay", "duration_ms": 1000},
{"action": "observe", "context": "native", "include": ["ui_tree"]},
{"action": "tap", "predicate": {"text_contains": "General"}}
]
}
Run AI agent
Use run_agent with device_id and task: "Open Settings and enable WiFi"
Comparison with Claude Code Plugin
| Feature | Claude Code Plugin | MCP Server |
|---------|-------------------|------------|
| Platform | Claude Code only | Any MCP client |
| Tools | http_request (generic) | Named tools + http_request |
| Resources | Skills (markdown) | MCP resources |
| Setup | Plugin install | npx |
The MCP server provides the same functionality as the Claude Code plugin but works with any MCP-compatible AI tool.
Troubleshooting
"Connection refused" error
- Ensure MobAI desktop app is running - Check that API is available at http://127.0.0.1:8686"Bridge not running" error
- Usestart_bridge tool first before automation
- iOS bridge may take up to 60 seconds to start
Screenshots not visible
- Screenshots are saved to/tmp/mobai/screenshots/
- Use your AI tool's file reading capability to view them
Development
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





