Skip to main content
Glama
Android Mobile MCP Server

Android Mobile MCP Server

Android Mobile MCP Server

Minimal Android-only fork of the original mobile-mcp project by MobileNext.

This project keeps only the Android functionality and exposes it through a Streamable HTTP MCP server protected by a shared bearer token.

License and attribution

This project is derived from the original mobile-mcp project and is licensed under the Apache License 2.0.

Keep the Apache License file in this repository and preserve the original copyright notices. This repository is a modified Android-focused fork and is not the official upstream project.

Related MCP server: android-mcp-tools

Requirements

  • Node.js 20+

  • Android SDK Platform Tools

  • adb on your PATH

  • one running Android emulator or one connected Android device

  • a shared secret in .env via MOBILEMCP_AUTH

Check connectivity:

adb devices

Setup environment

Create a .env file in the project root:

MOBILEMCP_AUTH=your_shared_secret_here

You can use the example file:

cp .env.example .env

Install and run

npm install
npm run build
node lib/index.js --listen 0.0.0.0:3000

Server URL:

http://localhost:3000/mcp

The server requires a bearer token for every HTTP request.

Auth header

Authorization: Bearer your_shared_secret_here

MCP config

{
  "mcpServers": {
    "mobile-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "Authorization": "Bearer your_shared_secret_here"
      }
    }
  }
}

Example device-targeted tool call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "mobile_list_apps",
    "arguments": {
      "device": "emulator-5554"
    }
  }
}

Use the device ID from:

adb devices

Docker

On Linux, expose the host ADB daemon on TCP port 5037 before starting the container:

adb kill-server
adb -a start-server
adb devices

The -a flag is required for Docker clients. Without it, ADB listens only on the host's local Unix socket and container commands fail with Connection refused.

The container must be told how to reach the host adb server. host.docker.internal is only available on Docker Desktop or when explicitly mapped for Linux.

Docker Desktop / macOS / Windows

docker build -t mobile-mcp-android .

Linux with host networking

docker run -d \
  --network host \
  -e MOBILEMCP_AUTH=your_shared_secret_here \
  -e ADB_SERVER_SOCKET=tcp:127.0.0.1:5037 \
  --name mobile-mcp-android \
  mobile-mcp-android

If port 3000 is already in use, change the host port mapping to another port, for example 3000:3000 as above.

Then access the server at:

http://localhost:3000/mcp

If you are debugging inside the container, the adb server should then resolve correctly:

docker exec -it mobile-mcp-android sh
adb devices

Notes

  • Android-only build

  • iOS support removed

  • intended for local Android automation and emulator/device control

  • anyone without the correct MOBILEMCP_AUTH secret cannot connect

License

This project is distributed under the Apache License 2.0. See the included LICENSE file for the full text.

Available Tools

27 tools
mobile_allocate_remote_deviceAllocate Remote DeviceA

Reserve a physical device from the remote cloud fleet for exclusive use, returning a device identifier usable with the other mobile_* tools. Unlike local devices, a remote device is a shared and billed resource borrowed for the session - only call this after the user has explicitly asked to use a remote/cloud device, never speculatively or as a fallback when a local device isn't found. Requires mobile_login_to_cloud_provider to have been called first; if this fails with an authentication error, call that tool then retry. Use mobile_list_remote_devices first to see which names and versions actually exist in the fleet before filtering by them. Release the device with mobile_release_remote_device once the whole task is finished - releasing wipes the device's state, so do not release and reallocate between steps of the same task just to be tidy.

Inputs: platform (required), name, type, wait, +2 more.

mobile_click_on_screen_at_coordinatesClick ScreenA

Click on the screen at given x,y coordinates. If clicking on an element, use the list_elements_on_screen tool to find the coordinates.

Inputs: x (required), y (required), device (required).

mobile_double_tap_on_screenDouble Tap ScreenB

Double-tap on the screen at given x,y coordinates.

Inputs: x (required), y (required), device (required).

mobile_get_crashGet Crash ReportA
Read-only

Get the full content of a crash report by its ID. Use mobile_list_crashes to find available crash IDs.

Inputs: id (required), device (required).

mobile_get_orientationGet OrientationB
Read-only

Get the current screen orientation of the device

Inputs: device (required).

mobile_get_screen_sizeGet Screen SizeA
Read-only

Get the screen size of the mobile device in pixels

Inputs: device (required).

mobile_install_appInstall AppC

Install an app on mobile device

Inputs: path (required), device (required).

mobile_launch_appLaunch AppA

Launch an app on mobile device. Use this to open a specific app. You can find the package name of the app by calling list_apps_on_device.

Inputs: device (required), packageName (required), locale.

mobile_list_appsList AppsA
Read-only

List all the installed apps on the device

Inputs: device (required).

mobile_list_available_devicesList DevicesA
Read-only

List all available devices. This includes both physical mobile devices and mobile simulators and emulators. It returns both Android and iOS devices. These are local devices already connected to this machine, ready to use immediately at no cost - for devices from the shared remote cloud fleet, use mobile_list_remote_devices instead.

Inputs: no named parameters.

mobile_list_crashesList Crash ReportsA
Read-only

List crash reports available on the device

Inputs: device (required).

mobile_list_elements_on_screenList Screen ElementsA
Read-only

List elements on screen and their coordinates, with display text or accessibility label. Do not cache this result.

Inputs: device (required).

mobile_list_remote_devicesList Remote DevicesA
Read-only

List the catalog of device models (make, platform, OS version) available to reserve from the remote cloud device fleet. This is different from mobile_list_available_devices, which lists real devices and simulators/emulators already connected to this local machine and ready to use immediately at no cost. Remote devices live in a shared cloud fleet: they are not usable until reserved with mobile_allocate_remote_device, and reserving one may be a limited/billed resource. Requires mobile_login_to_cloud_provider to have been called first; if this fails with an authentication error, call that tool then retry.

Inputs: no named parameters.

mobile_login_to_cloud_providerLogin to Cloud ProviderA

Start authenticating this machine with the remote device cloud provider. This is required once before mobile_list_remote_devices or mobile_allocate_remote_device will work; if either of those fails with an authentication error, call this tool and then retry. This starts a browser-based device-code login and returns quickly with a URL and a one-time code - it does NOT wait for the login to complete. Show the URL and code to the user verbatim and ask them to open the URL and enter the code in their own browser. The login keeps running in the background after this tool returns; once the user confirms they've completed it, retry the remote devices tool that originally failed. Only call this after the user has explicitly asked to connect to, log into, or use remote/cloud devices - never call it speculatively, since it interrupts the user to act in their browser.

Inputs: no named parameters.

mobile_long_press_on_screen_at_coordinatesLong Press ScreenB

Long press on the screen at given x,y coordinates. If long pressing on an element, use the list_elements_on_screen tool to find the coordinates.

Inputs: x (required), y (required), device (required), duration.

mobile_open_urlOpen URLA

Open a URL in browser on device

Inputs: url (required), device (required).

mobile_press_buttonPress ButtonC

Press a button on device

Inputs: button (required), device (required).

mobile_release_remote_deviceRelease Remote DeviceA
Destructive

Release a device previously reserved with mobile_allocate_remote_device back to the remote cloud fleet so it becomes available to others. Releasing is destructive to the device's state: apps installed, files pushed, and any other changes made during this session are lost, and a later mobile_allocate_remote_device call may take time and could return a different physical unit. Only release once the whole task is finished - if there is more work to do on the same device shortly, keep holding it rather than releasing and reallocating.

Inputs: device (required).

mobile_save_screenshotSave ScreenshotB

Save a screenshot of the mobile device to a file

Inputs: device (required), saveTo (required).

mobile_set_orientationSet OrientationA

Change the screen orientation of the device

Inputs: device (required), orientation (required).

mobile_start_screen_recordingStart Screen RecordingA

Start recording the screen of a mobile device. The recording runs in the background until stopped with mobile_stop_screen_recording. Returns the path where the recording will be saved.

Inputs: device (required), output, timeLimit.

mobile_stop_screen_recordingStop Screen RecordingA

Stop an active screen recording on a mobile device. Returns the file path, size, and approximate duration of the recording.

Inputs: device (required).

mobile_swipe_on_screenSwipe ScreenC

Swipe on the screen

Inputs: device (required), direction (required), x, y, +1 more.

mobile_take_screenshotTake ScreenshotA
Read-only

Take a screenshot of the mobile device. Use this to understand what's on screen, if you need to press an element that is available through view hierarchy then you must list elements on screen instead. Do not cache this result.

Inputs: device (required).

mobile_terminate_appTerminate AppB

Stop and terminate an app on mobile device

Inputs: device (required), packageName (required).

mobile_type_keysType TextC

Type text into the focused element

Inputs: text (required), device (required), submit (required).

mobile_uninstall_appUninstall AppA
Destructive

Uninstall an app from mobile device

Inputs: device (required), bundle_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools map to clearly distinct actions and objects, and the descriptions generally resolve potential confusion. However, mobile_take_screenshot and mobile_save_screenshot have overlapping purposes, and mobile_press_button vs. mobile_click_on_screen_at_coordinates could be misread without careful attention.

    Naming Consistency4/5

    All tools share a consistent mobile_ prefix and mostly follow a verb_noun pattern, making the set predictable. Minor deviations exist with longer prepositional names like mobile_click_on_screen_at_coordinates and mobile_long_press_on_screen_at_coordinates, but they do not break readability.

    Tool Count3/5

    27 tools is on the heavy side for a typical MCP server, but the broad mobile automation scope—UI interaction, app lifecycle, screenshots/recording, crash reporting, and remote device management—largely justifies the count. Still, the surface feels larger than ideal and could be tightened.

    Completeness4/5

    The server covers the core mobile automation lifecycle well: app install/uninstall/launch/terminate, screen interaction, navigation, screenshots, recording, and crash retrieval. Notable gaps include file push/pull, device health/battery info, and an explicit wait-for-element/condition tool, but these are workable around.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to discover, pair with, and control Android phones running the FreeCode Agent app over a local network, including accessibility tree inspection, taps/swipes/text input, screenshots, and live screen streaming.
      8
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents and test runners to control Android devices via local ADB, including listing devices, tapping, swiping, typing, sending system keys, launching apps, and dumping UI hierarchy. Communicates over MCP stdio without exposing network listeners.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables controlling an Android device from an MCP client via ADB, including wireless debugging discovery, UI-tree inspection, and performing taps, swipes, typing, app actions, and shell commands without relying on screen coordinates.
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Exposes Android device automation tools to MCP clients, letting AI agents inspect UI trees, interact with elements, launch/stop apps, run shell commands, transfer files, and manage events/tasks over adb/uiautomator2 without installing anything on the device.
      60
      MIT