Skip to main content
Glama

Android UI Assist MCP Server

by infiniV

Android UI Assist MCP Server

npm version License: MIT TypeScript Node.js

Model Context Protocol server for capturing Android device screenshots and device management for AI analysis. Supports Claude Desktop, Gemini CLI, and GitHub Copilot integration.

Features

  • Screenshot capture from Android devices and emulators

  • Connected device listing and management

  • MCP protocol integration with major AI platforms

  • Docker deployment support

  • Comprehensive error handling with timeout management

  • Secure stdio communication

Table of Contents

Prerequisites

Component

Version

Installation

Node.js

18.0+

Download

npm

8.0+

Included with Node.js

ADB

Latest

Android SDK Platform Tools

Android Device Setup

  1. Enable Developer Options: Settings > About Phone > Tap "Build Number" 7 times

  2. Enable USB Debugging: Settings > Developer Options > USB Debugging

  3. Verify connection: adb devices

Installation

NPM Installation

npm install -g android-ui-assist-mcp

From Source

git clone https://github.com/yourusername/android-ui-assist-mcp cd android-ui-assist-mcp npm install && npm run build

AI Agent Configuration

Claude Desktop

Create or edit %APPDATA%\Claude\claude_desktop_config.json:

{ "mcpServers": { "android-ui-assist": { "command": "npx", "args": ["android-ui-assist-mcp"], "timeout": 10000 } } }

For local development:

{ "mcpServers": { "android-ui-assist": { "command": "node", "args": ["d:\\projects\\android-ui-assist-mcp\\dist\\index.js"], "timeout": 10000 } } }

Restart Claude Desktop to apply configuration.

Gemini CLI

Install and configure:

npm install -g @google/generative-ai-cli gemini auth login

Method 1: Command Line Configuration

# For NPM installation gemini mcp add android-ui-assist npx android-ui-assist-mcp # For local development gemini mcp add android-ui-assist node "/path/to/android-ui-assist-mcp/dist/index.js"

Method 2: Configuration File

Create ~/.gemini/settings.json (Windows: %USERPROFILE%\.gemini\settings.json):

{ "mcpServers": { "android-ui-assist": { "command": "npx", "args": ["android-ui-assist-mcp"] } } }

For local development:

{ "mcpServers": { "android-ui-assist": { "command": "node", "args": ["/path/to/android-ui-assist-mcp/dist/index.js"] } } }

Verify: gemini mcp list

GitHub Copilot (VS Code)

Create .vscode/settings.json in your project:

{ "github.copilot.enable": { "*": true }, "mcp.servers": { "android-ui-assist": { "command": "npx", "args": ["android-ui-assist-mcp"], "timeout": 10000 } } }

Docker Deployment

Docker Compose

cd docker docker-compose up --build -d

Configure AI platform for Docker:

{ "mcpServers": { "android-ui-assist": { "command": "docker", "args": ["exec", "android-ui-assist-mcp", "node", "/app/dist/index.js"], "timeout": 15000 } } }

Manual Docker Build

docker build -t android-ui-assist-mcp . docker run -it --rm --privileged -v /dev/bus/usb:/dev/bus/usb android-ui-assist-mcp

Available Tools

Tool

Description

Parameters

take_android_screenshot

Captures device screenshot

deviceId

(optional)

list_android_devices

Lists connected devices

None

Tool Schemas

take_android_screenshot

{ "name": "take_android_screenshot", "description": "Capture a screenshot from an Android device or emulator", "inputSchema": { "type": "object", "properties": { "deviceId": { "type": "string", "description": "Optional device ID. If not provided, uses the first available device" } } } }

list_android_devices

{ "name": "list_android_devices", "description": "List all connected Android devices and emulators with detailed information", "inputSchema": { "type": "object", "properties": {} } }

Usage

Request screenshots or device information through your AI agent:

  • "Take a screenshot of my Android device"

  • "List connected Android devices"

  • "Capture screen from device emulator-5554"

Troubleshooting

ADB Issues

  • ADB not found: Verify ADB is installed and in PATH

  • No devices: Check USB connection and debugging authorization

  • Device unauthorized: Disconnect/reconnect USB, check device authorization prompt

  • Screenshot failed: Ensure device is unlocked and properly connected

Connection Issues

  • Verify adb devices shows your device as "device" status

  • Restart ADB server: adb kill-server && adb start-server

  • Check USB debugging permissions on device

Development

Build Commands

npm run build # Production build npm test # Run tests npm run lint # Code linting npm run format # Code formatting

Project Structure

src/ ├── server.ts # MCP server implementation ├── types.ts # Type definitions ├── utils/ │ ├── adb.ts # ADB command utilities │ ├── screenshot.ts # Screenshot processing │ └── error.ts # Error handling └── index.ts # Entry point

Performance

  • 5-second timeout on ADB operations

  • In-memory screenshot processing

  • Stdio communication for security

  • Minimal privilege execution

License

MIT License - see LICENSE file for details.

Deploy Server
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables AI agents to capture screenshots from Android devices and emulators, and manage connected devices for UI analysis and testing. Supports device listing, screenshot capture, and integrates with Claude Desktop, Gemini CLI, and GitHub Copilot.

  1. Features
    1. Table of Contents
      1. Prerequisites
        1. Android Device Setup
      2. Installation
        1. NPM Installation
        2. From Source
      3. AI Agent Configuration
        1. Claude Desktop
        2. Gemini CLI
        3. GitHub Copilot (VS Code)
      4. Docker Deployment
        1. Docker Compose
        2. Manual Docker Build
      5. Available Tools
        1. Tool Schemas
      6. Usage
        1. Troubleshooting
          1. ADB Issues
          2. Connection Issues
        2. Development
          1. Build Commands
          2. Project Structure
        3. Performance
          1. License

            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/infiniV/Android-Ui-MCP'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server