MCP server for Android device control via ADB and scrcpy — gives AI agents vision and control over Android devices
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add scrcpy-mcp -- npx -y scrcpy-mcp{
"mcpServers": {
"scrcpy-mcp": {
"command": "npx",
"args": ["-y", "scrcpy-mcp"]
}
}
}Resumen de MCP Servers
# scrcpy-mcp
MCP server that gives AI agents full vision and control over Android devices via ADB and scrcpy.
Connect any MCP-compatible AI assistant (Claude Code, OpenCode, Cursor, VS Code Copilot, etc.) to your Android device. The AI can see the screen, tap, swipe, type, launch apps, inspect UI elements, transfer files, and run shell commands.
[](https://lobehub.com/mcp/juancf-scrcpy-mcp)
## Features
- **36 tools** covering screenshots, input, apps, UI automation, shell, files, clipboard, and video streaming
- **scrcpy-first**: uses scrcpy's binary control protocol for 10-50x faster input and near-instant screenshots (~33ms)
- **ADB fallback**: every tool works without scrcpy — slower but always available
- **Image-returning screenshots**: the AI actually sees the screen, not just a file path
- **UI element finding**: `ui_find_element` returns tap coordinates so the AI can act on what it sees
- **Clipboard that works on Android 10+**: scrcpy bypasses the restrictions that break ADB-only solutions
## Prerequisites
### Required
| Requirement | Install | Verify |
|-------------|---------|--------|
| **Node.js 24+** | [nodejs.org](https://nodejs.org) or `nvm install` (uses [`.nvmrc`](.nvmrc)) | `node --version` |
| **ADB** (Android Platform Tools) | [developer.android.com/tools/releases/platform-tools](https://developer.android.com/tools/releases/platform-tools) | `adb version` |
| **Android device** with USB debugging | Settings → Developer Options → USB Debugging | `adb devices` |
### Optional (for enhanced performance)
| Requirement | Install | Benefit |
|-------------|---------|---------|
| **scrcpy** | [github.com/Genymobile/scrcpy](https://github.com/Genymobile/scrcpy/releases) | 10-50x faster input, ~33ms screenshots |
| **ffmpeg** | `apt install ffmpeg` / `brew install ffmpeg` | Required for scrcpy video stream decoding |
### Device setup
1. Enable Developer Options: **Settings → About Phone → tap "Build Number" 7 times**
2. Enable USB Debugging: **Settings → Developer Options → USB Debugging**
3. Connect device via USB
4. Accept the RSA fingerprint prompt on the device
5. Verify: `adb devices` should show your device as `device` (not `unauthorized`)
## Installation
```bash
# Run directly with npx (no install needed)
npx scrcpy-mcp
# Or install globally
npm install -g scrcpy-mcp
```
## MCP Client Configuration
### Claude Code
```bash
claude mcp add android -- npx scrcpy-mcp
```
Or add to `.mcp.json` in your project root:
```json
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["scrcpy-mcp"]
}
}
}
```
### OpenCode
Add to `.mcp.json`:
```json
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["scrcpy-mcp"]
}
}
}
```
### Cursor
Settings → MCP → Add Server:
```json
{
"android": {
"command": "npx",
"args": ["scrcpy-mcp"]
}
}
```
### Claude Desktop
Edit `~/.config/Claude/claude_desktop_config.json` (Linux) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["scrcpy-mcp"]
}
}
}
```
### VS Code (GitHub Copilot)
Add to `.vscode/mcp.json`:
```json
{
"servers": {
"android": {
"command": "npx",
"args": ["scrcpy-mcp"]
}
}
}
```
### Customizing Environment Variables
If you need to configure custom options (such as pointing to a non-standard `scrcpy-server` path), you can add the `"env"` object to your server configuration. For example:
```json
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["scrcpy-mcp"],
"env": {
"SCRCPY_SERVER_PATH": "C:\\path\\to\\scrcpy-server"
}
}
}
}
```
*Note: only set `SCRCPY_SERVER_VERSION` if version auto-detection fails — it overrides detection, so a stale value causes the version mismatch described in [Troubleshooting](#troubleshooting). Match it to your installed scrcpy (`scrcpy --version`).*
*Note: On Windows, remember to double-escape backslashes (`\\`) in your configuration paths.*
> **OpenCode users:** OpenCode uses `"environment"` instead of `"env"` for passing environment variables to MCP servers. Replace `"env"` with `"environment"` in the example above if you're configuring scrcpy-mcp in `opencode.json`.
## Tool Reference
### Session Management
| Tool | Description |
|------|-------------|
| `start_session` | Start a scrcpy session. When active, input and screenshots use the fast path (10-50x faster). |
| `stop_session` | Stop the scrcpy session. Tools fall back to ADB. |
### Video Streaming
| Tool | Description |
|------|-------------|
| `start_video_stream` | Start an HTTP MJPEG video stream and open an ffplay viewer window. Auto-starts a scrcpy session if needed. |
| `stop_video_stream` | Stop the video stream and close the viewer window. |
### Device Management
| Tool | Description |
|------|-------------|
| `device_list` | List all connected devices with serial, state, and model |
| `device_info` | Get model, Android version, screen size, SDK level, battery |
| `screen_on` | Wake the device screen |
| `screen_off` | Turn the screen off |
| `rotate_device` | Rotate the screen (requires active session) |
| `expand_notifications` | Pull down the notification panel (requires active session) |
| `expand_settings` | Pull down the quick settings panel (requires active session) |
| `collapse_panels` | Collapse notification/settings panels (requires active session) |
### Vision
| Tool | Description |
|------|-------------|
| `screenshot` | Capture the screen and return it as an image. ~33ms with scrcpy, ~500ms via ADB. |
| `screen_record_start` | Start recording the screen to a file on the device |
| `screen_record_stop` | Stop recording and optionally pull the file to the host |
### Input Control
All input tools use scrcpy (~5-10ms) when a session is active, otherwise fall back to ADB (~100-300ms).
| Tool | Description |
|------|-------------|
| `tap` | Tap at screen coordinates |
| `swipe` | Swipe from one point to another |
| `long_press` | Long press at coordinates |
| `drag_drop` | Drag from one point to another |
| `input_text` | Type a text string into the focused field |
| `key_event` | Send a key event: HOME, BACK, ENTER, VOLUME_UP, VOLUME_DOWN, POWER, etc. |
| `scroll` | Scroll at a position (dx=horizontal, dy=vertical) |
### App Management
| Tool | Description |
|------|-------------|
| `app_start` | Launch an app by package name. Prefix with `+` to force-stop before launch. |
| `app_stop` | Force-stop an app |
| `app_install` | Install an APK from the host machine |
| `app_uninstall` | Uninstall an app |
| `app_list` | List installed packages, optionally filter by name or system/third-party |
| `app_current` | Get the current foreground app and activity |
### UI Automation
| Tool | Description |
|------|-------------|
| `ui_dump` | Dump the full UI hierarchy as XML |
| `ui_find_element` | Find elements by text, resource ID, class name, or content description. Returns tap coordinates. |
### Shell & Files
| Tool | Description |
|------|-------------|
| `shell_exec` | Execute an arbitrary ADB shell command and return the output |
| `file_push` | Push a file from the host machine to the device |
| `file_pull` | Pull a file from the device to the host machine |
| `file_list` | List directory contents on the device |
### Clipboard
| Tool | Description |
|------|-------------|
| `clipboard_get` | Get clipboard content. Uses scrcpy to bypass Android 10+ restrictions. |
| `clipboard_set` | Set clipboard content. Pass `paste: true` to also paste immediately. |
## Performance
| Operation | scrcpy (session active) | ADB fallback |
|-----------|------------------------|--------------|
| Screenshot | ~33ms | ~500ms |
| Tap / Swipe | ~5-10ms | ~100-300ms |
| Text input | ~5ms | ~100-300ms |
| Clipboard | ~10ms | unreliable on Android 10+ |
Start a session once at the beginning to unlock the fast path:
```
start_session → take screenshots → tap → swipe → ...
```
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `ADB_PATH` | `adb` | Path to the ADB binary |
| `ANDROID_SERIAL` | (none) | Default device serial, overrides auto-detection |
| `SCRCPY_SERVER_PATH` | (auto) | Path to the scrcpy-server binary |
| `SCRCPY_SERVER_VERSION` | (auto) | Version of the scrcpy-server binary |
| `FFMPEG_PATH` | `ffmpeg` | Path to the ffmpeg binary |
| `FFPLAY_PATH` | `ffplay` | Path to the ffplay binary (for the video stream viewer) |
When only one device is connected, tools auto-detect it. With multiple devices, pass the `serial` parameter explicitly or set `ANDROID_SERIAL`.
## Troubleshooting
**`adb devices` shows `unauthorized`**
Accept the RSA fingerprint prompt on the device. If the prompt doesn't appear, revoke USB debugging authorizations in Developer Options and reconnect.
**`start_session` fails**
Make sure scrcpy is installed and the `scrcpy-server` binary is accessible. On Windows, add the folder containing both `scrcpy.exe` and `scrcpy-server` to your PATH, or set `SCRCPY_SERVER_PATH` to the full path of the `scrcpy-server` file.
* **File vs Directory**: Ensure `SCRCPY_SERVER_PATH` points directly to the `scrcpy-server` **file** itself (e.g. `C:\path\to\scrcpy-server`), NOT to its parent folder.
* **Android Directory Conflict**: If you previously pushed a directory to the server path, `/data/local/tmp/scrcpy-server.jar` on the Android device might have been created as a folder. Run `adb shell rm -rf /data/local/tmp/scrcpy-server.jar` to delete it.
* **Version Mismatch**: The client must send the exact version of the `scrcpy-server` file it pushes. To guarantee that, the server and the version are never resolved separately — one scrcpy install is resolved as a pair, and the version comes from the client belonging to that same install. The install is found in this order: Lo que la gente pregunta sobre scrcpy-mcp
¿Qué es JuanCF/scrcpy-mcp?
+
JuanCF/scrcpy-mcp es mcp servers para el ecosistema de Claude AI. MCP server for Android device control via ADB and scrcpy — gives AI agents vision and control over Android devices Tiene 81 estrellas en GitHub y su última actualización registrada es del 2026-08-21.
¿Cómo se instala scrcpy-mcp?
+
Puedes instalar scrcpy-mcp clonando el repositorio (https://github.com/JuanCF/scrcpy-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar JuanCF/scrcpy-mcp?
+
Nuestro agente de seguridad ha analizado JuanCF/scrcpy-mcp y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene JuanCF/scrcpy-mcp?
+
JuanCF/scrcpy-mcp es mantenido por JuanCF. La última actividad registrada en GitHub es del 2026-08-21, con 0 issues abiertos.
¿Hay alternativas a scrcpy-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega scrcpy-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/juancf-scrcpy-mcp)<a href="https://claudewave.com/repo/juancf-scrcpy-mcp"><img src="https://claudewave.com/api/badge/juancf-scrcpy-mcp" alt="Featured on ClaudeWave: JuanCF/scrcpy-mcp" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!