droidpilot
Enables AI agents to control a real Android phone: observe the screen, tap or swipe, perform multi-touch gestures, type text, press keys, open apps, and wait for UI changes using adb and scrcpy.
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., "@droidpilot Open the Settings app, find Bluetooth, and turn it on."
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.
droidpilot
droidpilot lets an AI coding agent use a real Android phone. The agent looks at the screen and touches it like a finger.
droidpilot is an MCP server. Any agent that supports MCP can use it. Examples: Claude Code, Codex, Gemini CLI, Kiro.
What it does
Action | Tool |
Look at the screen |
|
Touch |
|
Move a finger |
|
Use two or more fingers |
|
Type and press keys |
|
Open an app |
|
Wait |
|
An action returns in about 0.4 seconds. It does not check the screen. The next observe says changed=yes or changed=NO. The agent can then find a tap that did nothing.
observe also wakes and unlocks a phone that has no PIN. If a PIN blocks it, the result starts with NEEDS_HUMAN.
A tap on a buy, pay, send or delete button returns BLOCKED. The agent must repeat it with confirm=true.
Related MCP server: phone-mcp-server
How it works
AI agent --MCP--> droidpilot --scrcpy control socket--> phone (real touch events)
|
+--adb screencap + uiautomator--> screenshot + numbered UI elementsdroidpilot sends touch events through the scrcpy control socket. This gives real multi-touch.
If scrcpy fails, droidpilot uses
adb shell input. This gives one finger only.droidpilot reads the screen with
screencapanduiautomator dump.
Quick start
Do these steps once on the phone:
Open Settings > About. Tap Build number 7 times.
Open Developer options. Turn on USB debugging.
On realme and Oppo phones, turn on Disable permission monitoring.
Set the USB mode to File transfer. Do not use USB tethering.
Connect the cable. Tap Allow on the phone.
Then run these commands on the computer:
source env.sh # sets the paths for adb and scrcpy
uv run droidpilot doctor # checks the phone and every layer
uv run droidpilot serve # starts the MCP serverAdd to an agent
Use this command as the MCP server. The transport is stdio.
uv --directory /path/to/droidpilot run droidpilot serveAn example config is in examples/mcp.example.json.
Settings
Variable | Default | Meaning |
|
|
|
|
| Wait after each action. |
|
|
|
|
|
|
| first device | Choose a phone when more than one is connected. |
|
| Where the run log is kept. |
Commands
Command | Use |
| Start the MCP server. |
| Test adb, the phone, the screen, and touch. |
| Remove the files droidpilot put on the phone. |
Test
uv run pytest # no phone needed
uv run python tests/e2e_device.py # needs a phone or an emulatorKnown limits
observetakes about 3 seconds. The UI dump on the phone is the limit. See docs/ROADMAP.md.Apps that block screenshots show a black screen. The UI tree can still work.
Web views inside apps give only part of their UI to the tree.
A phone without a PIN is easy to use. A phone with a PIN needs the user to unlock it.
Documents
License
MIT. See LICENSE.
Available Tools
18 toolsdevice_statusA
Show the phone, screen size, rotation, input backend (scrcpy multi-touch or adb fallback) and foreground app.
Inputs: no named parameters. Returns: result
double_tapB
Double tap (zoom in maps/photos, select a word).
Inputs: x (required), y (required). Returns: result
gestureA
Arbitrary multi-finger gesture. All fingers move in lockstep over duration_ms (rotate, three-finger swipe, curves).
Inputs: strokes (required), duration_ms. Returns: result
list_appsB
Installed package names (third-party only unless include_system).
Inputs: include_system. Returns: result
long_pressB
Press and hold (context menus, drag handles, selection).
Inputs: x (required), y (required), duration_ms. Returns: result
observeA
Numbered UI elements, a snapshot id, app/rotation/keyboard state and whether the screen changed. Call before acting.
Inputs: image, diff_only.
open_appB
Launch an app by package name.
Inputs: package (required). Returns: result
pinchA
Two-finger pinch centred at (x,y). Needs the scrcpy backend (see device_status).
Inputs: x (required), y (required), scale (required), duration_ms. Returns: result
press_keyC
Press a hardware/navigation key.
Inputs: key (required). Returns: result
screenshotA
Screenshot only, without the element list.
Inputs: no named parameters.
scrollB
Scroll the view. 'down' reveals content below (finger moves up).
Inputs: amount, direction. Returns: result
swipeA
Drag one finger from (x1,y1) to (x2,y2). Short duration = fling, long = precise drag (sliders, reorder).
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +1 more. Returns: result
tapC
Single tap at a point.
Inputs: x (required), y (required), confirm. Returns: result
tap_elementA
Tap the center of an element from the latest observe.
Inputs: index (required), confirm, snapshot. Returns: result
tap_textA
Tap the element whose label contains text. One call instead of observe, read index, tap.
Inputs: text (required), nth, confirm. Returns: result
type_textA
Type into the focused field (tap the field first). Handles non-ASCII via clipboard paste.
Inputs: text (required), submit. Returns: result
waitB
Wait until the screen stops changing (loading spinners, animations).
Inputs: ms. Returns: result
wait_forB
Wait until an element with this label appears.
Inputs: text (required), timeout_ms. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target clearly distinct capabilities (observe vs screenshot vs wait vs wait_for are well differentiated in descriptions). The tap family (tap, tap_text, tap_element), and the movement family (swipe, scroll, pinch, gesture) are related but descriptions make the boundaries intelligible. An agent can generally pick correctly, though swipe vs scroll and gesture vs pinch require reading the description.
Casing is uniformly lowercase snake_case, but verb style is mixed: verb_noun tools (open_app, list_apps, press_key, type_text, tap_text, tap_element) coexist with bare verbs (tap, swipe, scroll, pinch, observe, wait), nouns (screenshot, gesture) and a noun_phrase (device_status). Still readable, but no single predictable pattern.
18 tools is on the heavy side but each maps to a real mobile-automation capability (observation, touch, gesture, text input, app management, waiting). Nothing is obviously redundant, though a few bare taps could arguably be collapsed. Count is justified by the breadth of the domain.
The surface covers the mobile interaction lifecycle well: observe/status/screenshot for perception, a full touch and gesture set, text/key input, app launch and listing, and both time- and element-based waits. Minor gaps remain: no close/stop app, no element-scoped scroll or swipe (only coordinates), and no text clearing or clipboard retrieval.
Maintenance
Related MCP Connectors
AI agents on real phones: run tasks, read the screen, tap, type and install apps.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Mobile sandboxes for AI agents: each agent gets its own cloud Android phone or iOS simulator over MCP, reads the screen, taps, types and installs your app. Android $0.01/min, iOS $0.03/min, parked phones free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables full Android control from any AI agent via 7 MCP tools, including screen capture, touch interaction, app management, and system control.23 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.7AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to see and operate a real Android phone over adb by fusing live screenshots with UI-tree data, supporting look, tap, swipe, type, and screenshot actions through any MCP client.4MIT
- AlicenseNot gradedqualityBmaintenanceControls Android and iOS devices from AI agents through a token-efficient MCP server, enabling observation, tapping, typing, gestures, navigation, assertions, and safety-gated actions.2MIT