waydroid-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| WAYLAND_DISPLAY | No | Your desktop session's Wayland display, needed to start Waydroid. If the MCP client doesn't pass it, the server reads it from `systemctl --user show-environment` and falls back to the only `wayland-N` socket in `/run/user/<uid>`. | |
| WAYDROID_MCP_SUDO_FILE | No | Path to a file containing your sudo password, readable only by you. Used so the server can run `sudo waydroid shell` for root-only tools. Alternatively, configure a sudoers rule instead. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools to run, drive and debug Android apps in Waydroid on a Linux desktop. Call status first; session starts Waydroid if it's stopped. Open apps with launch_app: hidden runs an app on an off-screen display at a chosen size and density, which suits automated checks. Act on an app by package name; input coordinates are display pixels. Debug with logcat, logcat_follow, crashes, stack_dump, trace and app_perf. Files the tools write (screenshots, recordings, traces) go to /tmp/waydroid-mcp.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| statusA | Waydroid's state: session and container, adb serial, whether Android has booted, Android and LineageOS versions, graphics, the per-app window service and the apps open in it, and how root access is set up. Call this first. |
| sessionA | Starts, stops or restarts the Waydroid session. |
| list_displaysA | Android's displays with id, name, size and density, plus the apps open in their own windows or hidden displays. Display 0 is Waydroid's main window; input and screenshots take a display id or a package. |
| root_accessA | Sets up root in Android for |
| list_appsB | Installed Android packages with their names. |
| app_infoC | One package's version, SDK levels, debuggable flag, paths, launcher activity, running processes, open display and permissions. |
| launch_appA | Opens an app. |
| start_activityA | Starts an activity with an intent on a display, and waits for it to draw: open a URL or deep link ( |
| install_apkA | Installs an APK, or a split bundle (.apks, .xapk, .apkm), from a host path or an http(s) URL. Replaces an installed version by default. Returns the package name and version. |
| app_actionA | Changes an app's state: force_stop, clear_data (also stops it), uninstall, uninstall_keep_data, grant or revoke a runtime permission, or close_window (closes its own window or hidden display; the app keeps running). |
| screenshotA | Screenshot of an app's display or of Waydroid's main display, returned as an image and saved as a full-resolution PNG. Tap coordinates are display pixels: when the image is scaled down, divide image coordinates by the scale it reports. |
| record_screenB | Records a display to an MP4 file on the host for a fixed time, then returns its path. |
| ui_treeA | The accessibility tree of the windows on an app's display: one line per element with class, text, hint, description, #resource-id, state flags, @center coordinates to tap and bounds, all in display pixels. Works on hidden and unfocused displays. Hides layout-only and off-screen elements unless all_nodes. |
| inputA | Touch and keyboard input on a display, in display pixels. tap and long_press take x and y, or |
| logcatA | Recent Android log lines, filtered by app, tag, priority, time and regex. Android's clock is UTC. For logs that keep coming, such as while you reproduce a bug, use logcat_follow. |
| logcat_followA | Follows the Android log in the background across calls. |
| crashesA | Lists recent Java crashes and native crashes and ANRs, newest first, from Android's dropbox (kept across reboots), tombstones and ANR traces, optionally for one app. Pass |
| stack_dumpA | Thread stacks of a running app without killing it: Java stacks ( |
| traceB | Records a Perfetto system trace (scheduling, frames, binder, app trace sections) for duration_s and saves it on the host. With package, the app's own Trace sections are recorded; with launch, the app is force-stopped and launched a second into the trace to capture a cold start. Open the file at https://ui.perfetto.dev. |
| app_perfB | An app's memory (PSS summary from meminfo), frame rendering stats (jank percentage and frame time percentiles from gfxinfo) and CPU use. reset_frames clears the frame stats afterwards, so the next call measures only what happens in between. |
| propsA | Android system properties. |
| shellB | Runs a shell command in Android and returns its output and exit code: dumpsys, am, pm, cmd, wm, getprop and so on. Runs as adb's shell user, or as root with root: true (see root_access). Nothing can be piped into it. |
| filesA | Copies files between the host and Android: push a host path to an Android path, or pull an Android path to the host. App-private files under /data/data are readable with pull only for debuggable apps (through run-as), given |
| portsA | Connects ports between the host and Android over adb. |
| host_logsB | Host-side logs of Waydroid: |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Most tools target clearly different resources or actions, and descriptions clarify boundaries such as logcat vs logcat_follow vs host_logs. A few pairs still require care, notably launch_app vs start_activity and session controls vs app_action force_stop/clear_data, but the overlap is manageable.
Names are all snake_case and some families are consistent, such as list_apps/list_displays and logcat/logcat_follow. However, the set mixes verb-led names like record_screen and launch_app with noun-led names like status, session, props, shell, and crashes, so the pattern is readable but not fully predictable.
The 25-tool surface is at the heavy end for an Android container management server. Each group is relevant, but diagnostics alone span app_perf, trace, stack_dump, crashes, logcat, logcat_follow, host_logs, record_screen, and screenshot, making the set borderline crowded.
The tools cover the full Waydroid lifecycle: session control, app install/launch/state changes, display and input handling, screenshots and UI inspection, logs, crashes, performance, tracing, shell access, file transfer, port forwarding, properties, and root setup. There are no obvious domain gaps that would block an agent's workflows.