Skip to main content
Glama

adb-visual-mcp

A small, stateless, pure-visual MCP server for Android devices. It exposes only the I/O needed to operate an emulator or phone: screen capture, taps, swipes, and keyboard input. Visual reasoning stays in the calling agent.

The server talks to Android through adb shell and adb exec-out; it does not use the accessibility tree, OCR, Appium, or a cached UI model.

Tools

  • devices() lists devices and readiness.

  • adb_command(args, device?, timeout_s?, max_output_chars?) runs any adb command and returns exit code, stdout, and stderr.

  • screenshot(device?, grid_rows?, grid_cols?) returns JSON geometry plus a PNG. The optional grid is only a visual reference overlay.

  • click(x, y, device?, button?, count?) taps absolute screen coordinates. Right and middle map to a long press.

  • mouse(action, device?, ...) supports scroll and drag (swipe).

  • keyboard(action, device?, text?, keys?) types text or sends Android key events.

The visual and input tools accept an optional device serial. With no argument, exactly one ready device must be present. The server never caches the selected device or current screen.

adb_command is the escape hatch for everything the typed tools do not cover (installing APKs, reading properties, package management). Its args is either an argument list or a single string that is split like a shell line. Without device it runs without -s, so global commands such as devices and version work. Output is capped per stream; long output keeps the head and tail and reports how many characters were dropped.

{
  "args": ["shell", "pm", "list", "packages"],
  "device": "emulator-5554",
  "timeout_s": 30,
  "max_output_chars": 20000
}

Related MCP server: android-mcp

Install

Requires Python 3.10+, adb, and a running Android device or emulator.

uv sync
uv run adb-visual-mcp --version

Set the adb path when it is not on PATH:

export ADB_VISUAL_MCP_ADB=/data/zqf/android-sdk/platform-tools/adb
export ADB_VISUAL_MCP_DEVICE=emulator-5554

Run

stdio, for an MCP client that launches the process:

uv run adb-visual-mcp

Streamable HTTP:

uv run adb-visual-mcp --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp

Interaction model

screenshot -> visual reasoning -> click/mouse/keyboard -> screenshot to verify

The server does not identify buttons or choose coordinates. Callers should use a grid overlay when fine positioning is needed and should not invent coordinates for visually uncertain targets.

Notes

keyboard type uses adb shell input text; it is intended for ASCII text. For non-ASCII input, use the device's own IME or a dedicated helper app. mouse move is intentionally unsupported because Android touchscreens have no hover pointer.

Development

uv run pytest
uv run python tests/smoke.py

Available Tools

6 tools
adb_commandA

Run an arbitrary adb command and return exit code, stdout, and stderr.

args is the adb argument list, for example ["shell", "getprop", "ro.product.model"] or "shell pm list packages". Without device the command runs without -s, so global commands such as devices or version work; pass a serial for device-scoped commands.

NameRequiredDescriptionDefault
argsYes
deviceNo
timeout_sNo
max_output_charsNo

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden. It helpfully discloses the return shape (exit code/stdout/stderr) and that commands are arbitrary, implying write/destructive capability, but it never warns that adb can reboot, wipe, or install, and says nothing about how `timeout_s` or `max_output_chars` alter behavior (truncation, kill-on-timeout).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the action and the return contract, then the parameter guidance. The examples earn their space by disambiguating string-vs-list input, though the formatting is slightly airy for the amount of content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by declaring the exit-code/stdout/stderr return shape — exactly what an agent needs to interpret results. The remaining gap is behavioral coverage of the timeout and output-size limits, which matter for a tool that can hang or flood context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does this well for `args` (accepts a list or a string, with two concrete examples) and `device` (maps to the `-s` serial flag), but `timeout_s` and `max_output_chars` are never mentioned despite having bounds and defaults that affect behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('run an arbitrary adb command') and names the return contract (exit code, stdout, stderr). The word 'arbitrary' distinguishes it clearly from the narrow siblings (devices, screenshot, click, keyboard, mouse), which each wrap a single adb operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the global-vs-device-scoped split ('without `device` the command runs without -s, so global commands such as `devices` or `version` work'), which is real routing guidance. However, it never tells the agent when to prefer the dedicated siblings (devices, screenshot, click) over shelling out through this generic escape hatch, nor any preconditions for mutating commands.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

clickB

Tap an absolute screen coordinate. Right/middle map to a long press.

NameRequiredDescriptionDefault
xYes
yYes
countNo
buttonNoleft
deviceNo

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It usefully discloses the non-obvious behavior that 'right'/'middle' buttons map to a long press, but omits other important traits: what 'count' does (multi-click?), how 'device' is used, coordinate origin, and whether the call blocks or returns anything.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the core action and no wasted words. The second sentence is terse but earns its place by surfacing a non-obvious mapping, though 'Right/middle' is slightly ambiguous phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no annotations, no output schema, and 0% schema coverage, this description is under-specified. It covers the coordinate and button mapping but is silent on count, device selection, coordinate origin, and return behavior, leaving significant gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning for 'x'/'y' (absolute screen coordinates) and hints at 'button' semantics, but leaves 'count' (1–10) and 'device' (nullable, default null) completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Tap') and resource ('absolute screen coordinate'), making the operation immediately identifiable. It avoids confusion with keyboard, screenshot, or devices siblings, though it does not explicitly distinguish itself from 'mouse', which could plausibly overlap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus siblings like 'mouse' or 'adb_command', nor are prerequisites (e.g., active device connection) stated. Usage is only implied by the phrase 'Tap an absolute screen coordinate'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

devicesA

List Android devices known to adb, including readiness and model.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden, but "List" plus zero parameters makes the read-only, side-effect-free nature clear enough. It does not disclose behavior when no devices are attached, when adb is unavailable, or whether the call blocks/polls, which would matter for an agent orchestrating device control.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler. Nothing in it is redundant with the structured fields, since the schema is empty.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description must hint at returns, which it does via "readiness and model." For a zero-param listing tool this is close to sufficient; only error/empty-state behavior is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline applies. The mention of readiness and model correctly sets expectations about the result fields rather than inventing inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "List Android devices known to adb," and adds what each entry contains (readiness and model). Against siblings like click, screenshot, and adb_command, the read-only enumeration intent is obvious, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is given. The natural workflow (call this first to discover devices, then use the control siblings) is only implied by the tool's purpose, and it never mentions prerequisites such as the adb server needing to be running.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

keyboardC

Type text, press one key, or send a key sequence to the focused app.

NameRequiredDescriptionDefault
keysNo
textNo
actionYes
deviceNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and largely drops it. It implies input injection into whatever window has focus, but does not disclose permission/accessibility requirements, key-name syntax, timing or waiting behavior, or whether text is typed character-by-character. The only real disclosure is the 'focused app' targeting, which is useful but thin for a write-action tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single well-formed sentence with zero filler, and the three operating modes are front-loaded. It is efficient but unstructured — a short action-to-parameter mapping would have cost little and added much.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Four parameters at 0% schema coverage, no annotations, and no output schema means the description is the only source of behavioral detail, and it supplies almost none. An agent cannot tell from this alone how to format keys, what 'device' means, or what happens on failure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and does not. It only obliquely covers text (type) and keys (press/hotkey); the 'device' parameter is completely unexplained, and there is no guidance on accepted key names, chord syntax for arrays, or what device values are legal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a concrete verb set (type / press / send a sequence) and the target (the focused app), which maps cleanly onto the action enum values type/press/hotkey. It distinguishes itself from the mouse/click siblings implicitly by being the keyboard-input tool, but never states that contrast outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance: nothing says which action to pick for a single character vs. a chord, when to prefer this over mouse/click, or what preconditions exist (focus, permissions). 'To the focused app' hints at a constraint but no alternatives or exclusions are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mouseC

Scroll the screen or drag between absolute coordinates.

NameRequiredDescriptionDefault
xNo
yNo
to_xNo
to_yNo
deltaNo
actionYes
deviceNo
duration_msNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions scrolling and dragging but omits side effects, target device behavior, scroll direction, duration effects, and any permission or safety context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no redundant text. However, it is too terse for an eight-parameter input tool and omits information that would make the sentence useful rather than merely short.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex input tool with eight parameters, no annotations, and no output schema. The description identifies the high-level actions and coordinate basis, but it is not complete enough to guide correct invocation across the various parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across eight parameters. The phrase 'absolute coordinates' gives some context for the coordinate fields, but the description does not explain x/y versus to_x/to_y, delta, device, duration_ms, or the required action enum.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states two specific operations, scrolling and dragging, and clarifies that drag uses absolute coordinates. It is clear what the tool does, but it does not explicitly distinguish itself from the sibling click or keyboard tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose scroll versus drag, no prerequisites, and no mention of alternatives such as click. The description only implies that the tool is used for these two mouse actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

screenshotC

Capture the full Android screen, optionally with a uniform visual grid.

NameRequiredDescriptionDefault
deviceNo
grid_colsNo
grid_rowsNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It mentions that the full screen is captured and that a grid is optional, but it does not disclose the return format, whether an image is returned, device default behavior, or any permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is appropriately sized for a simple screenshot tool, though brevity leaves other gaps that are penalized in the relevant dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotation coverage, so the description should explain what the tool returns and how device selection works. It only says the full screen is captured with an optional grid, leaving the return type and parameter behavior unclear for an agent invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so all three parameters are undocumented in the schema. The description mentions a 'uniform visual grid,' which loosely relates to grid_cols and grid_rows, but it does not explain their semantics, units, limits, or the device parameter at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: capture the full Android screen. This clearly distinguishes it from sibling input tools such as click, mouse, and keyboard, though it does not explicitly compare itself to them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives, nor any prerequisites or exclusions. The implied use case is clear from 'capture the full Android screen,' but the description provides no routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedadb_command
    • First observedclick
    • First observeddevices
    • First observedkeyboard
    • First observedmouse
    • First observedscreenshot

TDQS

B3.2/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct interaction (keyboard input, mouse scroll/drag, click tap, screenshot capture, device listing), so selection is generally clear. The main overlap is `adb_command`, a generic escape hatch that can replicate every other tool's function (e.g. `shell input tap`, `shell screencap`, `devices`), though this is an intentional, documented fallback rather than true ambiguity.

Naming Consistency3/5

Five tools are single lowercase words (keyboard, mouse, devices, screenshot, click) while `adb_command` uses a snake_case namespace prefix, and the set mixes nouns (devices, screenshot) with a verb (click) and input-device names (keyboard, mouse). It is readable and loosely noun-oriented, but there is no predictable verb_noun or resource pattern an agent can rely on.

Tool Count5/5

Six tools is well-scoped for a focused Android-device-control server: discovery, three input primitives, capture, and a raw escape hatch. Each tool earns its place without redundant wrappers or an oversized surface.

Completeness4/5

The surface covers the core interaction loop (find device, see screen, tap/drag/scroll, type) and `adb_command` closes arbitrary gaps like app install, UI hierarchy dumps, or device connect/restart. Minor gaps remain: no dedicated swipe/fling or long-press tool, and no built-in wait-for-UI or clipboard operations, though all are reachable through `adb_command`.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to control, inspect, and automate Android devices, Waydroid containers, and AVD emulators over ADB. Provides tools for screenshots, UI-hierarchy text-based tapping, gestures, key presses, text input, app management, and raw shell commands.
    12
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to visually perceive and directly control Android devices via ADB and screen-control tooling, including screenshots, taps, swipes, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming.
    151 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to see and control Android devices through ADB and scrcpy, supporting screenshots, input, app management, UI automation, shell/file access, and audio/video streaming.
    151 npm
    MIT