android — Claude Code MCP server: features and setup
This MCP server lets an AI agent control Android devices and emulators through ADB. Use it to inspect app screens, automate UI actions, or review logs.
claude mcp add --env ANDROID_HOME=<ANDROID_HOME> --transport stdio android -- npx -y android-mcp-serverWhat android does
The server exposes tools for capturing screenshots, reading the UI hierarchy, and targeting elements by text or resource-id. An agent can tap, swipe, type, press keys, install APKs, launch apps, and inspect logcat with filters for package, level, or time. Device listing and emulator startup are included too.
You need Node.js 18+, the Android SDK with platform-tools and ADB, plus a running emulator or connected device. On macOS, the server looks for the SDK at ~/Library/Android/sdk; otherwise it uses ANDROID_HOME. If the SDK lives elsewhere, set that variable in the MCP configuration. Without ADB access, its device controls cannot run.
Add it to Claude Code with claude mcp add. You can target a device by ID, and tap_and_wait combines a tap, a wait for the UI to settle, and a fresh UI-tree result. The app itself needs no SDK integration or code changes; the server works through ADB.
What it helps with
- inspect the elements shown on an Android screen
- tap a control by its text or
resource-id - enter text and step through a UI flow
- capture a screenshot and inspect
logcat - start an emulator to check an app
Example prompts for the agent
- Inspect the Android screen and tell me which controls are visible.
- Tap the “Sign in” button and check the updated screen.
- Capture a screenshot of the app and look for errors in
logcat.
How to install android
Platform CLI
claude mcp add --env ANDROID_HOME=<ANDROID_HOME> --transport stdio android -- npx -y android-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add android --env ANDROID_HOME=<ANDROID_HOME> -- npx -y android-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"android": {
"command": "npx",
"args": [
"-y",
"android-mcp-server"
],
"env": {
"ANDROID_HOME": "<ANDROID_HOME>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"android": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"android-mcp-server"
],
"env": {
"ANDROID_HOME": "<ANDROID_HOME>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e ANDROID_HOME=<ANDROID_HOME> android npx -y android-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about android
How do I install android in Claude Code?
Run claude mcp add android -- npx -y android-mcp-server. If the Android SDK is outside its usual location, run claude mcp add --env ANDROID_HOME=<ANDROID_HOME> --transport stdio android -- npx -y android-mcp-server instead.
What does the android MCP server do?
It lets an agent control Android devices and emulators through ADB, inspect app interfaces, perform touch actions, and read logs.
What does android need to run?
You need Node.js 18+, the Android SDK with ADB, and a running emulator or connected device. Set ANDROID_HOME if the SDK is in a custom location.