Skip to main content

opdroid

Android device control through MCP and a deterministic CLI.

opdroid exposes a connected Android device as a set of practical tools: capture a gridded screen, inspect UI hierarchy, tap cells, swipe, type text, press Android navigation keys, and launch apps. Bring your own MCP-capable agent.

Requirements

  • Python 3.10+
  • ADB installed and running
  • Android device or emulator with USB debugging enabled

Installation

uv add opdroid

You can also run it without installing into the current environment:

uvx opdroid --help
uvx opdroid devices

For local development:

uv sync
uv run opdroid --help

Agent Skill

opdroid is built to be skill-native according to the agentskills.io open standard. You can install it directly into your AI coding assistant (like Claude Code or Cursor) using the Vercel Skills CLI:

npx skills add shikhargen/opdroid

Alternatively, you can print the recommended skill instructions for manually pasting or configuring other agents using the CLI:

opdroid skill

The MCP server also exposes this through the get_android_use_skill tool.

MCP Server

Run the MCP server over stdio:

opdroid mcp

Run it directly from PyPI with uvx:

uvx opdroid mcp

Target a specific device:

opdroid mcp --serial emulator-5554
uvx opdroid mcp --serial emulator-5554

Print a ready-to-copy MCP config snippet:

opdroid mcp-config

Example config:

{
  "mcpServers": {
    "opdroid": {
      "command": "opdroid",
      "args": ["mcp"]
    }
  }
}

Alternative config that runs through uvx without a prior install:

{
  "mcpServers": {
    "opdroid": {
      "command": "uvx",
      "args": ["opdroid", "mcp"]
    }
  }
}

Project-local Codex config example in .codex/config.toml:

[mcp_servers.opdroid]
command = "uvx"
args = ["opdroid", "mcp"]
enabled = true

CLI

List devices:

opdroid devices

Capture the current screen with a grid and UI hierarchy:

opdroid screen --output artifacts/screen.png

Operate the device:

opdroid tap E10
opdroid tap-sequence B16 E16 H16
opdroid swipe E18 E6
opdroid input-text "hello world"
opdroid press back
opdroid launch-app com.android.settings

MCP Tools

  • get_screen: returns a gridded screenshot and compact interactive element list.
  • tap: tap a grid cell.
  • tap_sequence: tap multiple grid cells.
  • swipe: swipe between two grid cells.
  • input_text: type text into the focused field.
  • press_home, press_back, press_enter, press_recent_apps: Android key actions.
  • launch_app: launch an app by package name.
  • wait: wait for loading or animation.
  • list_devices: list connected Android devices.
  • get_android_use_skill: return the recommended agent skill text.

Configuration

By default opdroid connects to ADB at 127.0.0.1:5037.

Environment variables:

  • OPDROID_ADB_HOST: ADB server host.
  • OPDROID_ADB_PORT: ADB server port.
  • OPDROID_CELL_SIZE: grid cell size in analysis screenshots.

Equivalent CLI options are available where device access is needed:

opdroid devices --adb-host 127.0.0.1 --adb-port 5037
opdroid mcp --adb-host 127.0.0.1 --adb-port 5037

Development Checks

uv run python -m compileall src tests
uv run opdroid --help

License

MIT

Metadata

Release files for opdroid 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opdroid 1.1.0
File Size Uploaded Provenance Actions
opdroid-1.1.0.tar.gz 82.8 kB Without provenance Details for opdroid-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opdroid 1.1.0
File Interpreter ABI Platform Actions
opdroid-1.1.0-py3-none-any.whl Python 3 none any Details for opdroid-1.1.0-py3-none-any.whl

Total release size: 106.1 kB

Release files / opdroid-1.1.0.tar.gz

Download URL opdroid-1.1.0.tar.gz
Size 82.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08efebbc5821dae2172f9abb4ca1c704f4ec6513d04db8eb1717d93a98018d75
BLAKE2b-256 checksum
How to use checksums
9dae9ea005a803659a8d8bb3d7a64f52c6e935d6481422ce4a79497da4473cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / opdroid-1.1.0-py3-none-any.whl

Download URL opdroid-1.1.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e2b527f617c2d81d0396e4912137c3e70bf525e9f29e3f551b281035d137881
BLAKE2b-256 checksum
How to use checksums
d9836f3db6ca63b44a7679b81b21c5d9686fd5e849f6cd1f257a2bd5c144232f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for opdroid 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page