m

mobai-mcp

@MobAI-App/mobai-mcp
Hosted
0 Stars 30 次浏览 MobAI-App 更新于 2026-08-23

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

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

可用工具 (5 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

tavily_search 14 个参数 需填 1 项

Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.

必填参数:query

tavily_extract 6 个参数 需填 1 项

Extract content from URLs. Returns raw page content in markdown or text format.

必填参数:urls

tavily_crawl 11 个参数 需填 1 项

Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.

必填参数:url

tavily_map 8 个参数 需填 1 项

Map a website's structure. Returns a list of URLs found starting from the base URL.

必填参数:url

tavily_research 2 个参数 需填 1 项

Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.

必填参数:input

服务介绍

MobAI MCP Server

npm version
License

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

  • Use start_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

#  Clone the repository
git clone https://github.com/MobAI-App/mobai-mcp.git
cd mobai-mcp

#  Install dependencies
npm install

#  Build
npm run build

#  Run locally
node dist/index.js

# License

Apache 2.0 - see LICENSE for details.

相关 MCP 服务