Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
WAYLAND_DISPLAYNoYour 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_FILENoPath 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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. start waits until Android has booted (about 20-30 s). Stopping closes every Android app.

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 shell with root and stack_dump. adb root is disabled in Waydroid, so root runs sudo waydroid shell. Pass a file holding the sudo password, or nothing to use sudo without one (a NOPASSWD rule). With check, runs id -u as root once; if sudo rejects the password, root stays off so repeated failures can't lock sudo.

list_appsB

Installed Android packages with their names. launchable lists apps with a launcher icon, including system apps such as Settings.

app_infoC

One package's version, SDK levels, debuggable flag, paths, launcher activity, running processes, open display and permissions.

launch_appA

Opens an app. window opens it in its own desktop window and hidden on an off-screen display with no window (both need waydroid-app-displays; hidden defaults to 1080x2340 at 440 dpi). waydroid uses Waydroid's own window. size fixes the Android display in pixels and dpi its density (dp width = pixels * 160 / dpi), so 720x1280 at 320 dpi is a 360 dp phone. Launching an open app again applies the new options, and options left out go back to the defaults. Returns the display id that input, screenshot and ui_tree act on; it changes each time the app is closed and opened.

start_activityA

Starts an activity with an intent on a display, and waits for it to draw: open a URL or deep link (url), or an exact component such as com.android.settings/.Settings. Returns am start -W's timing (TotalTime is the launch time in ms).

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 element: text, description or resource id to find in the UI tree. swipe goes from x,y to x2,y2 (swipe up to scroll down). text types into the focused field, so tap the field first; key sends a key such as BACK, ENTER, TAB, HOME or DEL.

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. start begins collecting new lines with the same filters as logcat and returns an id. read returns the lines since the last read; with wait_for it first waits up to timeout_s for a line matching that regex, such as a crash (FATAL EXCEPTION) or your own log message. stop ends it; list shows all.

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 read with an id from the list for the full report and stack.

stack_dumpA

Thread stacks of a running app without killing it: Java stacks (java), native backtraces (native), or both. Uses debuggerd as root (see root_access). Useful for a frozen app or an ANR in progress.

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. waydroid lists Waydroid's persist.waydroid.* settings with their meaning and current value. get reads names or a regex. set changes one: persist.waydroid.* through waydroid prop set, others with setprop (debug., log.tag. and persist.log.tag.* work without root). Most Waydroid settings apply after a session restart.

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 package.

portsA

Connects ports between the host and Android over adb. reverse makes a host server reachable from Android (reverse tcp:8000 tcp:8000, then open http://127.0.0.1:8000 in Android). forward makes an Android socket reachable from the host. devtools forwards a Chromium-based browser's DevTools to a host port and lists its pages. remove undoes one, list shows all.

host_logsB

Host-side logs of Waydroid: waydroid is /var/lib/waydroid/waydroid.log (container start, mounts, errors), container the waydroid-container service's journal, session the session's journal, and kernel the kernel log (binder, GPU and overlay errors).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 25 tools

Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count3/5

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.

Completeness5/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues