MCP-ADB
MCP (Model Context Protocol) Server to control Android TV
isseikz
README
MCP-ADB
A Model Context Protocol (MCP) server that provides integration with Android Debug Bridge (ADB) for AI assistants to interact with Android devices.
Features
- Screenshot Capture: Take screenshots of connected Android devices with automatic resizing
- Base64 Image Data: Receive screenshot data directly as base64-encoded strings
- Key Event Control: Send key events to Android devices (navigation, back, home)
- Multiple Device Support: Target specific devices when multiple devices are connected
- Device Listing: List all connected Android devices as resources
- Resource Access: Access screenshots and device information via resource URIs
Prerequisites
- Node.js (v16 or higher recommended)
- Android Debug Bridge (ADB) installed and available in PATH or configured via ADB_PATH environment variable
- Connected Android device(s) with USB debugging enabled
Installation
# Clone the repository
git clone https://github.com/isseikz/mcp-adb.git
cd mcp-adb
# Install dependencies
npm install
# Build the project
npm run build
Usage
Using with Claude Desktop
To use this MCP server with Claude Desktop add mcp-adb into claude_desktop_config.json, which can be found in the Claude Desktop installation directory or Claude - Settings - Developer - Edit Config
Here is an example of how to configure the claude_desktop_config.json
file:
{
"mcpServers": {
"mcp-adb": {
"command": "node",
"args": ["/path/to/mcp-adb/build/index.js"],
"env": {
"ADB_PATH": "/path/to/adb"
}
}
}
}
```json
{
"mcpServers": {
"mcp-adb": {
"command": "node",
"args": ["/path/to/mcp-adb/build/index.js"],
"env": {
"ADB_PATH": "/path/to/adb"
}
}
}
}
Available Tools
Screenshot Tool
Captures a screenshot from a connected Android device and automatically resizes it to 640px width.
Parameters:
deviceId
(optional): Target a specific device when multiple devices are connected
Response:
- Base64-encoded image data (PNG format) directly in the response
Example:
{
"name": "screenshot",
"arguments": {
"deviceId": "emulator-5554"
}
}
Press Key Tool
Sends a key event to a connected Android device.
Parameters:
keycode
: The Android key code to send (see list below)deviceId
(optional): Target a specific device when multiple devices are connected
Available keycodes:
KEYCODE_DPAD_CENTER
- Center/OK buttonKEYCODE_DPAD_DOWN
- Down navigationKEYCODE_DPAD_UP
- Up navigationKEYCODE_DPAD_LEFT
- Left navigationKEYCODE_DPAD_RIGHT
- Right navigationKEYCODE_DPAD_UP_LEFT
- Diagonal up-leftKEYCODE_DPAD_UP_RIGHT
- Diagonal up-rightKEYCODE_DPAD_DOWN_LEFT
- Diagonal down-leftKEYCODE_DPAD_DOWN_RIGHT
- Diagonal down-rightKEYCODE_BACK
- Back buttonKEYCODE_HOME
- Home button
Example:
{
"name": "pressKey",
"arguments": {
"keycode": "KEYCODE_DPAD_DOWN",
"deviceId": "emulator-5554"
}
}
Resources
Connected Devices
List all connected Android devices:
adb://devices
Response:
- A list of connected device IDs
Screenshots
Access a specific screenshot by filename:
adb://screenshots/{filename}
For example:
adb://screenshots/screenshot-2025-04-10T16-30-48-931Z.png
Development
Project Structure
mcp-adb/
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript files
├── temp/ # Temporary directory for screenshots
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configuration
Building
npm run build
This will compile the TypeScript code to JavaScript in the build
directory.
Requirements
This project uses the following dependencies:
@modelcontextprotocol/sdk
: MCP server implementationfs-extra
: Enhanced file system methodssips
: Used for image resizing (built into macOS) to reduce context comsumption
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.