Mobai Mcp

io.github.MobAI-App由 GitHub 帳號 MobAI-App 發布v1.2.1更新於 Oct 24, 2026

AI-powered mobile device automation for Android and iOS devices, emulators, and simulators

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

讓 AI 助理透過批次 DSL 腳本操作 Android 與 iOS 裝置、模擬器與仿真器,並提供截圖、應用程式管理與測試執行能力的 MCP 伺服器。

可以做什麼
  • 探索、佔用與釋放裝置,啟動或停止自動化橋接
  • 取得供模型視覺分析的快速低畫質截圖,或將全畫質 PNG 存到磁碟
  • 列出、安裝、解除安裝應用程式,並以除錯模式啟動應用程式並寫入日誌
  • 執行批次 DSL 腳本,涵蓋點擊、輸入、滑動、等待、斷言、網頁自動化、指標收集與螢幕錄影
  • 列出測試專案並在指定裝置上執行 .mob 測試案例
適用情境
適合需要助理實際操作真實或模擬行動應用的情境,例如探索流程、重現問題、檢查介面狀態或執行既有的 .mob 測試案例。主要面向已連接裝置的本地桌面環境。
執行需求
需要 Node.js 18 以上、在本機執行的 MobAI 桌面應用程式(HTTP API 位於 127.0.0.1:8686),以及已連接的 Android 或 iOS 裝置、模擬器或仿真器。透過 npx mobai-mcp 以 stdio 方式安裝,未宣告任何 API 金鑰或環境變數。
安裝前請注意
助理會實際操作裝置:安裝與解除安裝應用程式、點擊輸入、執行測試,都會改變裝置狀態。裝置租約依工作階段持有,對未佔用的裝置執行操作會自動佔用。截圖與除錯日誌會寫入本機磁碟,伺服器也會連線到本機 8686 連接埠的桌面應用程式。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mobai Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MobAI MCP Server

[npm version] [License]

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 devices, emulators, and simulators via a single DSL-first interface.

How it works

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.

A small set of companion tools handles device discovery, screenshots, app management, and running .mob test files.

Prerequisites

  • Node.js 18+
  • MobAI desktop app running locally (HTTP API on 127.0.0.1:8686)
  • A connected Android or iOS device, emulator, or simulator

Installation

Claude Code

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

Cursor

Add to .cursor/mcp.json:

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

Claude Desktop

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

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

Windsurf / Cline / other MCP clients

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

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

Tools

Device management

ToolDescription
list_devicesList all connected Android and iOS devices
get_deviceGet details about a specific device
start_bridgeStart the automation bridge on a device (required before interaction)
stop_bridgeStop the automation bridge
claim_deviceClaim exclusive use of a device for this session (usually optional: acting on an unclaimed device auto-claims it)
release_deviceRelease one or all device leases held by this session

Screenshots

ToolDescription
get_screenshotFast, low-quality screenshot for LLM visual analysis (may be downscaled; response includes scale factor)
save_screenshotFull-quality PNG to disk for reporting, debugging, or sharing

Apps

ToolDescription
list_appsList installed apps on the device
install_appInstall an .apk or .ipa from a local file path
uninstall_appUninstall an app by bundle ID / package name
debug_appLaunch an app in debug mode and write stdout/stderr to a log file

Automation

ToolDescription
execute_dslPrimary tool. Execute a batch of DSL steps: tap, type, swipe, observe, assertions, web automation, metrics, screen recording, and more.

Test management

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.

ToolDescription
test_get_activeGet the active test project directory and its .mob cases
test_list_projectsList all known test project directories with their .mob cases
test_runRun a .mob test case on a device (project_dir + case_path + device_id, optional params for ${name} substitution)

Resources

Read these before attempting any device interaction — they describe the DSL schema, action set, predicates, failure strategies, and .mob syntax.

URIPurpose
mobai://reference/device-automationHow to control devices — guide, all DSL actions, predicates, and failure strategies
mobai://reference/testingTesting workflow, rules, error fixes, and .mob script syntax

Example

Open the iOS Settings app, navigate to Wi-Fi, and verify the toggle exists:

json
{  "version": "0.2",  "steps": [    {"action": "open_app", "bundle_id": "com.apple.Preferences"},    {"action": "wait_for", "predicate": {"text": "Settings"}, "timeout_ms": 3000},    {"action": "tap", "predicate": {"text_contains": "Wi-Fi"}},    {"action": "wait_for", "predicate": {"type": "switch"}, "timeout_ms": 3000},    {"action": "assert_exists", "predicate": {"type": "switch"}},    {"action": "observe", "include": ["ui_tree"]}  ]}

Pass this as the commands argument (a JSON string) to execute_dsl along with a device_id from list_devices.

Troubleshooting

"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.

"Bridge not running" — Call start_bridge first. The iOS bridge can take up to a minute to come up.

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.

Development

bash
git clone https://github.com/MobAI-App/mobai-mcp.gitcd mobai-mcpnpm installnpm run buildnode dist/index.js

License

Apache 2.0 — see LICENSE.

來源:README.md,提交 75348bb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分