Sponsored by Deepsite.site

Mobai Mcp

Created By
MobAI-App6 days ago
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. 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
Overview

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

FeatureClaude Code PluginMCP Server
PlatformClaude Code onlyAny MCP client
Toolshttp_request (generic)Named tools + http_request
ResourcesSkills (markdown)MCP resources
SetupPlugin installnpx

The MCP server provides the same functionality as the Claude Code plugin but works with any MCP-compatible AI tool.

Troubleshooting

"Connection refused" error

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

Server Config

{
  "mcpServers": {
    "mobai": {
      "command": "npx",
      "args": [
        "-y",
        "mobai-mcp"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.