DroidRun MCP Server
Provides text-based control of Android devices through the accessibility tree, enabling UI interaction, app launching, navigation, text input, and gesture control via ADB without requiring screenshots.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DroidRun MCP Serveropen the Chrome browser and go to google.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DroidRun MCP Server
A text-based MCP (Model Context Protocol) server for controlling Android devices from Claude Code. Pure accessibility tree automation - no screenshots needed.
Features
Text-based UI interaction - Read and interact with Android UI elements using accessibility tree
No screenshots required - Faster and more efficient than vision-based approaches
Simple indexed tapping - Elements are numbered for easy interaction
Full device control - Navigate, type, swipe, and launch apps
Related MCP server: Termux MCP Server
Prerequisites
Android device with USB debugging enabled
Python 3.10+
ADB (Android Debug Bridge) installed on your computer
Claude Code CLI installed
Step 1: Install ADB
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install adbmacOS
brew install android-platform-toolsWindows
Download from Android SDK Platform Tools and add to PATH.
Step 2: Enable USB Debugging on Android
Go to Settings > About Phone
Tap Build Number 7 times to enable Developer Options
Go back to Settings > System > Developer Options
Enable USB Debugging
Connect your device via USB
Accept the "Allow USB debugging" prompt on your phone
Verify connection:
adb devicesYou should see your device listed.
Step 3: Install DroidRun
pip install droidrunInstall DroidRun Portal App on Device
Run the setup command to install the Portal app on your Android device:
droidrun setupThis will:
Download the DroidRun Portal APK
Install it on your connected device
Open the Accessibility Settings
Enable Accessibility Service
After droidrun setup, you need to manually enable the accessibility service:
The Accessibility Settings will open automatically
Find DroidRun Portal in the list
Tap on it and enable the service
Confirm any permission dialogs
You can verify the setup worked:
droidrun testStep 4: Install This MCP Server
Clone the repository
git clone https://github.com/chukfinley/droidrun-mcp-server.git
cd droidrun-mcp-serverInstall dependencies
pip install droidrun mcpStep 5: Configure Claude Code
Add the MCP server to your Claude Code configuration.
Edit ~/.claude.json and add under mcpServers:
{
"mcpServers": {
"droidrun": {
"type": "stdio",
"command": "python3",
"args": ["/full/path/to/droidrun-mcp-server/server.py"],
"env": {}
}
}
}Important: Use the full absolute path to server.py!
Example:
{
"mcpServers": {
"droidrun": {
"type": "stdio",
"command": "python3",
"args": ["/home/youruser/droidrun-mcp-server/server.py"],
"env": {}
}
}
}Restart Claude Code
claudeAvailable Tools
Tool | Description |
| Get device model, Android version, and serial |
| Get current screen UI elements as indexed list |
| Tap element by index number from |
| Tap screen at specific coordinates |
| Swipe up/down/left/right |
| Input text (optionally tap element first) |
| Press Android back button |
| Press Android home button |
| Press Enter key |
| Open app by package name |
| List installed apps (non-system) |
Usage Example
Once configured, you can ask Claude Code to control your Android device:
> Open the Settings app and go to About Phone
Claude will:
1. Call app("com.android.settings")
2. Call ui() to see the screen
3. Call tap() on the appropriate elements
4. Navigate to About PhoneExample ui() output:
APP: Settings (com.android.settings)
KEYBOARD: hidden
FOCUS: none
1. TextView: "Network & internet" - (0,200,1080,300)
2. TextView: "Connected devices" - (0,300,1080,400)
3. TextView: "Apps" - (0,400,1080,500)
4. TextView: "About phone" - (0,900,1080,1000)Then Claude taps element 4: tap(4)
How It Works
This MCP server wraps the DroidRun library to provide Android device control through Claude Code. It uses the Android accessibility tree (not screenshots) for UI detection, making it fast and reliable.
The DroidRun Portal app runs on your Android device and provides:
Accessibility service for UI tree extraction
Numbered overlay for visual feedback (optional)
Input method for text entry
Troubleshooting
"No Android device connected"
# Check if device is connected
adb devices
# If not listed, try:
adb kill-server
adb start-server
adb devices"Portal is not installed"
droidrun setup"Accessibility service not enabled"
Go to Settings > Accessibility
Find DroidRun Portal
Enable the service
Or run droidrun setup again - it will open the settings for you.
MCP server not showing in Claude Code
Check your
~/.claude.jsonconfigurationEnsure the path to
server.pyis absolute (starts with/)Restart Claude Code completely after config changes
"Permission denied" errors
Make sure server.py is executable:
chmod +x server.pyQuick Start Summary
# 1. Install ADB
sudo apt install adb # Linux
# 2. Enable USB debugging on your Android device
# 3. Connect device and verify
adb devices
# 4. Install DroidRun
pip install droidrun
# 5. Setup Portal app on device
droidrun setup
# 6. Enable accessibility service on device (manual step!)
# 7. Clone this repo
git clone https://github.com/chukfinley/droidrun-mcp-server.git
# 8. Install dependencies
pip install droidrun mcp
# 9. Add to ~/.claude.json (see Step 5 above)
# 10. Restart Claude Code
claudeLicense
MIT
Credits
This server cannot be deployed
Maintenance
Related MCP Connectors
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Control Android TV from any AI. 38 MCP tools: playback, recap, recommend, smart-home, schedules.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables control of Android devices via ADB, allowing screenshot capture, touch simulation, and swipe gestures through natural language commands.22120 npm6MIT
- FlicenseAqualityFmaintenanceEnables remote control of Android phones via Claude Desktop, offering 45+ tools including UI automation for app interactions.5714-
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to observe and operate Android devices through ADB and uiautomator2, supporting screenshot capture, UI hierarchy access, and actions like tap, swipe, and text input.Apache 2.0
- FlicenseBqualityCmaintenanceEnables AI assistants to observe, reason about, and control connected Android devices via ADB, providing tools for screenshots, UI hierarchy parsing, semantic element clicking, gestures, text input, and app lifecycle management.13-