home / mcp / expo-android mcp server
MCP server for Android emulator automation via ADB.
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.
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.
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.
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.
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.
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.
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.
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.
List connected devices and emulators.
Validate adb availability and show connected devices.
Override the active device serial for this MCP process.
UI dump parsed into elements with a summary (screenshot optional).
Capture a screenshot alone (base64 or file path).
Return elements matching search criteria.
Find an element and tap its center.
Wait for an element to appear, with optional state checks.
Verify element existence and state.
Tap at specific x/y coordinates.
Swipe between coordinates.
Press and hold at coordinates.
Type text in the focused field.
Send Android key events like BACK or HOME.
Launch an app by package name.
List installed package names.