MobAI MCP Server logo

MobAI MCP Server

Organization
MobAI-App

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…

PublisherMobAI-App
Repositorymobai-mcp
LanguageTypeScript
Forks
20
Stars
247
Available tools
22
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    MobAI MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 22 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    247 stars and 20 forks from the linked repository.

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.git
cd mobai-mcp
npm install
npm run build
node dist/index.js

License

Apache 2.0 — see LICENSE.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • 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

Use MobAI MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MobAI MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MobAI MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MobAI MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mobai-app-mobai-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mobai-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MobAI MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MobAI MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MobAI MCP Server to help me with this task?
MobAI MCP Server
Sure. I read it.
Here is what I found using MobAI MCP Server.

Frequently asked questions

What is the MobAI MCP Server MCP server used for?

MobAI MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MobAI MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MobAI MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MobAI MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MobAI MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MobAI MCP Server MCP to TypingMind?

MobAI MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MobAI MCP Server MCP provide in TypingMind?

MobAI MCP Server exposes 22 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MobAI MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MobAI MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

MobAI API Reference

Complete API documentation for MobAI HTTP API

DSL Automation Guide

Guide for using the DSL batch execution system

Native App Automation

Guide for automating native mobile apps

Web Automation

Guide for automating browsers and WebViews

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇