# Pilotdroid

> Pilotdroid is an open-source MCP server for mobile apps. MCP server giving AI agents fast tap, swipe and screen control over Android devices. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows, Self-hosted
- **Repository:** https://github.com/mofanx/pilotdroid
- **MCP Registry name:** io.github.mofanx/pilotdroid
- **Categories:** [mobile apps](https://ai-powered.com/categories/mobile-apps)
- **Listing updated:** 2026-11-23

## About

Pilotdroid is a Rust-built automation stack for Android devices that runs a resident on-device agent and talks to it over a persistent binary protocol, so scripted UI steps avoid the per-call HTTP round trips that slow down uiautomator2. Batched operations and on-device waits let several steps run in one exchange, and the project reports large wall-clock gains over uiautomator2 on the same test scripts.

The same device backend is reachable three ways: a command-line tool for one-off operations, a stdio MCP server exposing 27 tools to AI clients, and a Rust library facade. A Python shim mirrors much of the uiautomator2 API so existing scripts can run with little change, though XPath selectors are deliberately unsupported.

It suits developers building AI agents that drive real Android phones, and QA or automation engineers who want lower latency than uiautomator2 offers. Each device should be served by a single client at a time, since a second connection displaces the first.

## Features

- **Persistent binary protocol:** Keeps a single open channel to the device agent so commands avoid repeated HTTP round trips.
- **On-device batch execution:** Runs sequences of taps, waits and conditional steps inside the device in one exchange.
- **MCP server with 27 tools:** Exposes device actions such as tap, swipe, selectors and screen streaming to MCP clients over stdio.
- **Live frame streaming:** Streams screen frames as MJPEG for browser viewing or reads them through MCP.
- **uiautomator2-compatible shim:** Python layer that runs many uiautomator2 calls with little or no script change.
- **Popup watcher:** Detects and dismisses matching on-screen elements automatically on the device.

## Good for

- Letting an AI agent navigate and test Android apps through MCP
- Speeding up existing uiautomator2 test scripts on physical devices
- Automating repetitive taps and text entry on Android phones over USB or Wi-Fi ADB
- Dismissing unexpected dialogs automatically during long automation runs
- Capturing live screen output from a device for monitoring or debugging

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add pilotdroid -- uvx pilotdroid
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add pilotdroid -- uvx pilotdroid
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.pilotdroid]
command = "uvx"
args = ["pilotdroid"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user pilotdroid uvx -- pilotdroid

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pilotdroid": {
      "command": "uvx",
      "args": [
        "pilotdroid"
      ]
    }
  }
}
```

## FAQ

### How do I connect Pilotdroid to an MCP client?

Install the pilotdroid-cli binary and add a server entry to the client's mcpServers config with the command pilotdroid-cli and the argument serve. For multiple devices, pass the serial with -s.

### Does Pilotdroid support XPath selectors?

No. XPath is explicitly out of scope; the Python shim rejects it with a ValueError, while text, resource ID, description, class name and similar selectors are supported.

### Can I run Pilotdroid on Windows?

A Windows binary is published, but it has only been compiled and checked in CI, not yet run on a real Windows machine.

### Is Pilotdroid open source?

The repository is released under the MIT license.

### Is Pilotdroid free?

Yes. Pilotdroid is open source, so you can use and self-host it for free.

### How do I add Pilotdroid to Claude Code?

Run this command in your terminal: claude mcp add pilotdroid -- uvx pilotdroid

### What are the best alternatives to Pilotdroid?

The closest alternatives to Pilotdroid are Phone Harness, Mobile Device MCP, MCP Android, Android Puppeteer MCP and droidsight.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Phone Harness](https://ai-powered.com/mcp/phone-harness): Phone Harness is an open-source MCP server for mobile apps.
- [Mobile Device MCP](https://ai-powered.com/mcp/mobile-device-mcp-2): Mobile Device MCP is an open-source MCP server for mobile apps.
- [MCP Android](https://ai-powered.com/mcp/mcp-android): MCP Android is an open-source MCP server for mobile apps.
- [Android Puppeteer MCP](https://ai-powered.com/mcp/android-puppeteer-mcp): Android Puppeteer MCP is an open-source MCP server for browser automation.
- [droidsight](https://ai-powered.com/mcp/droidsight): droidsight is an open-source MCP server for mobile apps.
- [Droid Agent](https://ai-powered.com/mcp/droid-agent): Droid Agent is an open-source MCP server for browser automation.
- [android-use](https://ai-powered.com/mcp/android-use): android-use is an open-source MCP server for developer tools.
- [Turbo Android MCP](https://ai-powered.com/mcp/turbo-android-mcp): Turbo Android MCP is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/pilotdroid
