scrcpy MCP Server
Provides tools for controlling Android devices via ADB and scrcpy, including device management, input injection, screen capture/recording, app management, clipboard operations, file transfer, and mirroring.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@scrcpy MCP Servertake a screenshot of my connected device"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
scrcpy MCP Server
Local MCP server that exposes Android device control via adb and scrcpy as 22 tools for MCP clients like Claude Code and Codex CLI.
Quick Start
One command — no prerequisites needed (the installer handles everything):
curl -fsSL https://raw.githubusercontent.com/charettep/scrcpy-mcp/main/install.sh | bashOr from a local clone:
git clone https://github.com/charettep/scrcpy-mcp.git && cd scrcpy-mcp
./install.shThe installer will:
Detect your OS and package manager (apt, dnf, pacman, brew)
Download the repo to
~/mcp/scrcpy-mcp(if running via curl)Check for
adb,scrcpy, anduv— install any that are missingFind Python 3.10+ and create an isolated venv with dependencies
Detect installed MCP clients (Claude Code, Codex CLI)
Ask where to register the server:
Global — injects config directly into
~/.claude.jsonand/or~/.codex/config.tomlProject — generates a local
.mcp.jsonfile
Re-running the installer is safe — it updates the existing install and overwrites old config entries.
Related MCP server: DeepADB
Prerequisites
Python 3.10+
adb(from Android SDK platform-tools)scrcpy(for mirroring/recording sessions)An Android device with USB debugging enabled
The installer handles all of the above automatically.
Manual Install
If you prefer not to use the installer:
uv venv .venv && uv pip install -r requirements.txtThen add to your project .mcp.json:
{
"mcpServers": {
"scrcpy": {
"command": "/path/to/.venv/bin/python",
"args": ["/absolute/path/to/scrcpy_mcp.py"],
"env": {
"SCRCPY_MCP_ADB_PATH": "/usr/bin/adb",
"SCRCPY_MCP_SCRCPY_PATH": "/usr/bin/scrcpy"
}
}
}
}The env block is optional — without it, adb and scrcpy are resolved from PATH.
Available Tools (22)
Device Management
Tool | Description |
| List connected devices with status |
| Get model, Android version, screen resolution, battery, IP |
| Connect/disconnect device via wireless ADB |
Input Injection
Tool | Description |
| Tap at x,y coordinates |
| Swipe from point A to B with duration |
| Send key event (BACK, HOME, POWER, etc.) |
| Type text string on device |
| Long press at coordinates |
Screen & Display
Tool | Description |
| Capture screenshot and save locally |
| Turn screen on/off/toggle |
| Get/set device rotation |
| Record screen to mp4 file |
App Management
Tool | Description |
| List installed packages |
| Launch app by package name |
| Force stop an app |
| Install APK file |
Clipboard
Tool | Description |
| Read device clipboard |
| Set device clipboard text |
File Transfer
Tool | Description |
| Push local file to device |
| Pull file from device |
Scrcpy Sessions
Tool | Description |
| Start scrcpy mirroring with full options |
| Stop a running scrcpy session |
Multi-device Support
All tools accept an optional serial parameter. If omitted, adb uses the only connected device (or fails if multiple are connected).
tap(x=500, y=1000, serial="ABCD1234")Environment Variables
Variable | Purpose | Default |
| Absolute path to |
|
| Absolute path to |
|
These are set automatically by install.sh via the MCP config env block.
Verify
python3 scrcpy_mcp.py # starts on stdio
python3 -c "from scrcpy_mcp import mcp; print(len(mcp._tool_manager._tools))" # should print 22This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/charettep/scrcpy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server