Skip to main content

Droidrun MCP Server

A Model Context Protocol (MCP) server for Droidrun, enabling LLMs (like OAI, Claude and Gemini) to control Android devices directly.

Features

  • Natural Language Control: "Open Settings and turn on Wi-Fi".
  • Visual Understanding: Analyzes screenshots to navigate the UI.
  • Trajectory Management: Automatically saves session history and screenshots.
  • Safe Execution: Runs locally on your machine.

Prerequisites

  • Python 3.10+
  • ADB installed and running (adb devices should show your device).

Installation

Option 1: Configure Your Client (Easiest setup)

Add the server to your MCP client configuration (e.g., claude_desktop_config.json or Gemini CLI config or Codex CLI config).

Option 2 Using uvx

This is the easiest way to run the server without managing virtual environments manually.

uvx droidrun-mcp

Option 3: Using pip

You can also install it directly from PyPI:

pip install droidrun-mcp

Note: Ensure you have ADB installed and your Android device connected.

Important: You must provide your API keys and (optionally) configuration paths via environment variables.

{
  "mcpServers": {
    "droidrun": {
      "command": "uvx",
      "args": [
        "droidrun-mcp"
      ],
      "env": {
        "GOOGLE_API_KEY": "your-key-here",
        "OPENAI_API_KEY": "your-key-here",
        "DROIDRUN_TRAJECTORY_PATH": "~/.droidrun-mcp/trajectories",
        "DROIDRUN_CONFIG_PATH": "~/.droidrun-mcp/config.yaml"
      }
    }
  }
}

[!TIP] We recommend copying the default config.yaml to ~/.droidrun-mcp/config.yaml so you can customize it easily.

Environment Variables

Variable Description Default
DROIDRUN_TRAJECTORY_PATH Where to save logs/screenshots. ~/.droidrun-mcp/trajectories
DROIDRUN_CONFIG_PATH Path to a custom config.yaml. config.yaml (in package)
GOOGLE_API_KEY Required for Gemini models. -
OPENAI_API_KEY Required for OpenAI models. -

Available Tools

  • execute_task(instruction): Executes a natural language command on the device.
    • instruction: "Open YouTube and search for cats"
    • apk_path: (Optional) Only for testing specific APKs.
  • get_trajectory(session_id): Retrieves the event log for a session.
  • get_screenshots(session_id): Gets screenshots from a session.
  • get_single_screenshot(session_id, step): Gets a specific screenshot.

Development

To contribute to this project:

  1. Clone the repo:
    git clone https://github.com/droidrun/droidrun-mcp.git
    
  2. Install dependencies:
    uv sync --all-extras
    
  3. Run locally:
    fastmcp run droidrun_mcp/server.py
    

Metadata

Release files for droidrun-mcp 0.1.5

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

Source distribution (sdist)

Source distribution for droidrun-mcp 0.1.5
File Size Uploaded
droidrun_mcp-0.1.5.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for droidrun-mcp 0.1.5
File Interpreter ABI Platform
droidrun_mcp-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / droidrun_mcp-0.1.5.tar.gz

Download URL droidrun_mcp-0.1.5.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
69b4ec6738f2b830671ecc952ede5fdf67df9dd884a9e19ce76adc6fbf643844
BLAKE2b-256 checksum
How to use checksums
6f5e8f67f2e426ca57b18da1d4ab1d76e281019cfa326ced44f831cf9c848a01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.

Transparency log

Release files / droidrun_mcp-0.1.5-py3-none-any.whl

Download URL droidrun_mcp-0.1.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b5dafb078dc5ad849439d94f39947b046992f6085b4c8f0520a48add994aa60
BLAKE2b-256 checksum
How to use checksums
211b206847a2eb5b37909e85b7fa72e2784f0dcc2ca4bb17ef0f5a7ccd682179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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