home / mcp / scrcpy mcp server
Provides full Android device control and visualization for AI agents via ADB and scrcpy.
Configuration
View docs{
"mcpServers": {
"juancf-scrcpy-mcp": {
"command": "npx",
"args": [
"scrcpy-mcp"
],
"env": {
"ADB_PATH": "adb",
"FFMPEG_PATH": "ffmpeg",
"ANDROID_SERIAL": "emulator-5554",
"SCRCPY_SERVER_PATH": "/usr/local/bin/scrcpy-server",
"SCRCPY_SERVER_VERSION": "1.28"
}
}
}
}You can connect AI assistants to an Android device to see the screen, interact via taps and swipes, launch apps, inspect UI elements, transfer files, and run shell commands. This MCP server enables full vision and control over Android devices through ADB and scrcpy, delivering fast interactions and robust capabilities for automation and remote control.
To use this MCP server, start by launching it through your preferred MCP client. When a session is active, you gain access to rapid input and near-instantaneous screenshots, enabling you to perform tasks such as tapping, swiping, typing, launching apps, and inspecting the UI. You can also pull down notifications, access settings, and navigate the device using specialized tools that map to practical actions. Start a session once to unlock the fast input path, then continue issuing commands to interact with the device.
Prerequisites you need before installation:
Install and run the MCP server using one of the following approaches.
# Run directly with npx (no install needed)
npx scrcpy-mcp
# Or install globally
npm install -g scrcpy-mcpDevice setup steps you should complete on the Android device: enable Developer Options, enable USB debugging, connect via USB, accept the RSA fingerprint prompt, and verify the device is recognized by ADB.
To connect from a client, use the following command pattern in your client configuration. The client will start an MCP server session and route commands through the local MCP instance.
# Example client configuration (Claude Code, OpenCode, Cursor, etc.)
# Start the MCP server via npx
npx scrcpy-mcpStart a scrcpy session. When active, input and screenshots use the fast path (10-50x faster).
Stop the scrcpy session. Tools fall back to ADB.
List all connected devices with serial, state, and model.
Get model, Android version, screen size, SDK level, battery.
Wake the device screen.
Turn the screen off.
Rotate the screen (requires active session).
Pull down the notification panel (requires active session).
Pull down the quick settings panel (requires active session).
Collapse notification/settings panels (requires active session).
Capture the screen and return it as an image. ~33ms with scrcpy, ~500ms via ADB.
Start recording the screen to a file on the device.
Stop recording and optionally pull the file to the host.
Tap at screen coordinates.
Swipe from one point to another.
Long press at coordinates.
Drag from one point to another.
Type a text string into the focused field.
Send a key event: HOME, BACK, ENTER, VOLUME_UP, VOLUME_DOWN, POWER, etc.
Scroll at a position.
Launch an app by package name. Prefix with + to force-stop before launch.
Force-stop an app.
Install an APK from the host machine.
Uninstall an app.
List installed packages, optionally filter by name or system/third-party.
Get the current foreground app and activity.
Dump the full UI hierarchy as XML.
Find elements by text, resource ID, class name, or content description. Returns tap coordinates.
Execute an arbitrary ADB shell command and return the output.
Push a file from the host machine to the device.
Pull a file from the device to the host machine.
List directory contents on the device.
Get clipboard content. Uses scrcpy to bypass Android 10+ restrictions.
Set clipboard content. Pass paste: true to also paste immediately.