home / mcp / expo-android mcp server

expo-android MCP Server

MCP server for Android emulator automation via ADB.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "frndchagas-expo-android": {
      "command": "npx",
      "args": [
        "-y",
        "@fndchagas/expo-android"
      ],
      "env": {
        "PORT": "7332",
        "ADB_PATH": "$HOME/Library/Android/sdk/platform-tools/adb",
        "ADB_DEBUG": "0",
        "ADB_SERIAL": "auto",
        "MCP_TRANSPORT": "stdio",
        "ADB_TIMEOUT_MS": "15000",
        "ADB_MAX_BUFFER_MB": "10"
      }
    }
  }
}

You can automate Android emulator and device interactions using the Expo Android MCP server. This tool streamlines validating ADB, inspecting UI, and performing taps, text input, and other actions on connected Android environments through MCP-enabled clients.

How to use

To use this MCP server, you first ensure a compatible Android environment is ready, then connect or start an emulator, and finally interact with the device through the MCP client. Start by validating your setup with the doctor tool, then explore the UI and perform actions such as inspecting elements, tapping, or entering text.

Typical usage patterns include inspecting the UI to retrieve element trees, locating interactive controls, and performing actions like taps or text entry. You can also override the active device per call if you need to target a specific emulator or physical device. Use an interactive sequence to locate a control and simulate user behavior across screens.

How to install

Prerequisites: ensure you have Node.js 18 or higher installed, the Android SDK platform-tools (adb) available, and an Android emulator or a physical device connected.

Verify that adb can see your devices.

Install the MCP server globally so you can run it from any shell.

Additional notes

Environment variables commonly used with this MCP server include ADB_PATH to specify the adb executable and ADB_SERIAL to target a specific device or emulator. Other adb-related settings control timeouts, buffer sizes, and diagnostic logging. You can set MCP_TRANSPORT to determine how the server communicates (stdio, http, or both) and choose a port for HTTP transport if you enable it.

Troubleshooting

If adb cannot be found or is not accessible, set ADB_PATH to the full path of your adb executable or define a broader Android SDK path that includes platform-tools. For example, export ADB_PATH or export ANDROID_HOME to your SDK directory. If multiple devices are connected, specify ADB_SERIAL to select the target device. After changing environment variables, restart the MCP process to apply the updates.

MCP usage examples

Run the doctor command to validate adb availability and connected devices, then inspect the UI to gather elements and interactive state. You can run actions such as tapping or inputting text on the focused field.

Inspect and interact with the UI

Use the inspect tool to obtain a parsed representation of the UI, including a summary and optional screenshots. Then use findElement, tapElement, waitForElement, and assertElement to locate and interact with elements on the screen.

Automation examples

You can script a sequence that discovers a login button, taps it, and types credentials into a focused field. Always ensure the target device is ready and the app is in the expected state before performing actions.

Available tools

devices

List connected devices and emulators.

doctor

Validate adb availability and show connected devices.

setDevice

Override the active device serial for this MCP process.

inspect

UI dump parsed into elements with a summary (screenshot optional).

screenshot

Capture a screenshot alone (base64 or file path).

findElement

Return elements matching search criteria.

tapElement

Find an element and tap its center.

waitForElement

Wait for an element to appear, with optional state checks.

assertElement

Verify element existence and state.

tap

Tap at specific x/y coordinates.

swipe

Swipe between coordinates.

longPress

Press and hold at coordinates.

inputText

Type text in the focused field.

keyEvent

Send Android key events like BACK or HOME.

openApp

Launch an app by package name.

listPackages

List installed package names.