Skip to content
Back to search

mobai-mcp

MCP (Model Context Protocol) server for MobAI — AI-powered mobile device automation. Lets AI assistants (Claude Code, Cursor, Windsurf, Cline, and other MCP-compatible tools) control Android and iOS…

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mobai-app--mobai-mcp/badge.svg)](/listings/mobai-app--mobai-mcp)

HTML

<a href="/listings/mobai-app--mobai-mcp"><img src="/api/listings/mobai-app--mobai-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code

claude mcp add mobai -- npx -y mobai-mcp

Cursor

Add to `.cursor/mcp.json`:

{
  "mcpServers": {
    "mobai": {
      "command": "npx",
      "args": ["-y", "mobai-mcp"]
    }
  }
}

Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):

{
  "mcpServers": {
    "mobai": {
      "command": "npx",
      "args": ["-y", "mobai-mcp"]
    }
  }
}

Windsurf / Cline / other MCP clients

The server speaks stdio — use your client's generic MCP configuration:

{
  "command": "npx",
  "args": ["-y", "mobai-mcp"]
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 163 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MobAI MCP Server
  2. [![npm version](https://img.shields.io/npm/v/mobai-mcp.svg)](https://www.npmjs.com/package/mobai-mcp)
  3. [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/Apache-2.0)
  4. MCP (Model Context Protocol) server for [MobAI](https://mobai.run) — AI-powered mobile device automation. Lets AI assistants (Claude Code, Cursor, Windsurf, Cline, and other MCP-compatible tools) control Android and iOS devices, emulators, and simulators via a single DSL-first interface.
  5. ## How it works
  6. All device interaction is batched through one primary tool: **`execute_dsl`**. Instead of exposing dozens of fine-grained tools (tap, swipe, type…), the server accepts a JSON script describing a sequence of actions with predicates, assertions, waits, and conditional branches. This keeps round-trips low and encodes retry/failure strategies server-side.
  7. A small set of companion tools handles device discovery, screenshots, app management, and running `.mob` test files.
  8. ## Prerequisites
  9. - Node.js 18+
  10. - [MobAI desktop app](https://mobai.run) running locally (HTTP API on `127.0.0.1:8686`)
  11. - A connected Android or iOS device, emulator, or simulator
  12. ## Installation
  13. ### Claude Code
  14. ```bash
  15. claude mcp add mobai -- npx -y mobai-mcp
  16. ```
  17. ### Cursor
  18. Add to `.cursor/mcp.json`:
  19. ```json
  20. {
  21. "mcpServers": {
  22. "mobai": {
  23. "command": "npx",
  24. "args": ["-y", "mobai-mcp"]
  25. }
  26. }
  27. }
  28. ```
  29. ### Claude Desktop
  30. Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
  31. ```json
  32. {
  33. "mcpServers": {
  34. "mobai": {
  35. "command": "npx",
  36. "args": ["-y", "mobai-mcp"]
  37. }
  38. }
  39. }
  40. ```
  41. ### Windsurf / Cline / other MCP clients
  42. The server speaks stdio — use your client's generic MCP configuration:
  43. ```json
  44. {
  45. "command": "npx",
  46. "args": ["-y", "mobai-mcp"]
  47. }
  48. ```
  49. ## Tools
  50. ### Device management
  51. | Tool | Description |
  52. |---|---|
  53. | `list_devices` | List all connected Android and iOS devices |
  54. | `get_device` | Get details about a specific device |
  55. | `start_bridge` | Start the automation bridge on a device (required before interaction) |
  56. | `stop_bridge` | Stop the automation bridge |
  57. | `claim_device` | Claim exclusive use of a device for this session (usually optional: acting on an unclaimed device auto-claims it) |
  58. | `release_device` | Release one or all device leases held by this session |
  59. ### Screenshots
  60. | Tool | Description |
  61. |---|---|
  62. | `get_screenshot` | Fast, low-quality screenshot for LLM visual analysis (may be downscaled; response includes scale factor) |
  63. | `save_screenshot` | Full-quality PNG to disk for reporting, debugging, or sharing |
  64. ### Apps
  65. | Tool | Description |
  66. |---|---|
  67. | `list_apps` | List installed apps on the device |
  68. | `install_app` | Install an `.apk` or `.ipa` from a local file path |
  69. | `uninstall_app` | Uninstall an app by bundle ID / package name |
  70. | `debug_app` | Launch an app in debug mode and write stdout/stderr to a log file |
  71. ### Automation
  72. | Tool | Description |
  73. |---|---|
  74. | `execute_dsl` | **Primary tool.** Execute a batch of DSL steps: tap, type, swipe, observe, assertions, web automation, metrics, screen recording, and more. |
  75. ### Test management
  76. Tests are `.mob` files on disk inside project directories. You read, write, and edit them directly using your assistant's filesystem tools — MobAI watches for changes and updates the UI live. MCP is only needed to discover projects and run tests.
  77. | Tool | Description |
  78. |---|---|
  79. | `test_get_active` | Get the active test project directory and its `.mob` cases |
  80. | `test_list_projects` | List all known test project directories with their `.mob` cases |
  81. | `test_run` | Run a `.mob` test case on a device (`project_dir` + `case_path` + `device_id`, optional `params` for `${name}` substitution) |
  82. ## Resources
  83. Read these **before** attempting any device interaction — they describe the DSL schema, action set, predicates, failure strategies, and `.mob` syntax.
  84. | URI | Purpose |
  85. |---|---|
  86. | `mobai://reference/device-automation` | How to control devices — guide, all DSL actions, predicates, and failure strategies |
  87. | `mobai://reference/testing` | Testing workflow, rules, error fixes, and `.mob` script syntax |
  88. ## Example
  89. Open the iOS Settings app, navigate to Wi-Fi, and verify the toggle exists:
  90. ```json
  91. {
  92. "version": "0.2",
  93. "steps": [
  94. {"action": "open_app", "bundle_id": "com.apple.Preferences"},
  95. {"action": "wait_for", "predicate": {"text": "Settings"}, "timeout_ms": 3000},
  96. {"action": "tap", "predicate": {"text_contains": "Wi-Fi"}},
  97. {"action": "wait_for", "predicate": {"type": "switch"}, "timeout_ms": 3000},
  98. {"action": "assert_exists", "predicate": {"type": "switch"}},
  99. {"action": "observe", "include": ["ui_tree"]}
  100. ]
  101. }
  102. ```
  103. Pass this as the `commands` argument (a JSON string) to `execute_dsl` along with a `device_id` from `list_devices`.
  104. ## Troubleshooting
  105. **"Connection refused" / "Could not reach the MobAI desktop app"** — Make sure the MobAI desktop app is installed and running, and the API is reachable at `http://127.0.0.1:8686`. If you don't have it yet, download and install it from [https://mobai.run/download](https://mobai.run/download).
  106. **"Bridge not running"** — Call `start_bridge` first. The iOS bridge can take up to a minute to come up.
  107. **Screenshots not visible** — `get_screenshot` saves to `/tmp/mobai/screenshots/` by default and returns the file path. Use your assistant's file-reading capability to view them. DSL `observe` screenshots are extracted from the response and saved to the same directory.
  108. ## Development
  109. ```bash
  110. git clone https://github.com/MobAI-App/mobai-mcp.git
  111. cd mobai-mcp
  112. npm install
  113. npm run build
  114. node dist/index.js
  115. ```
  116. ## License
  117. Apache 2.0 — see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.