airi-android
A MCP server that enables LLMs to control Android devices via ADB, supporting input, UI hierarchy, device management, and shell commands.
README
アイリ Android
A MCP server that allows airi all LLMs to control Android devices. This project is a child project of airi.
Features
Input Control
input_tap- Tap on the screen at given coordinatesinput_swipe- Swipe from one coordinate to anotherinput_text- Input text on the deviceinput_keyevent- Send a key event to the deviceinput_press- Press the current keyinput_roll- Roll the trackball
Device Information
wm_size- Get the physical screen sizewm_density- Get the display densitycpu_percent- Get CPU usage percentagecpu_count- Get the number of CPU coresbattery_level- Get battery levelbattery_stats- Get detailed battery statistics
UI & Activity
ui_get_hierarchy- Get UI hierarchy (XML)utils_top_activity- Get the top activityutils_top_activities- Get all top activitiesutils_package_version- Get package version info
Device Management
device_connect- Connect to a device at specified host and portdevice_reset- Reset device connectionshell_execute- Execute any shell command
Usage
Docker (Recommended)
docker run --rm -it -p 3000:3000 -e ADB_HOST=host.docker.internal ghcr.io/proj-airi/airi-android:v0.3.4
# or stdio mode
docker run --rm -i -e USE_STDIO=true -e ADB_HOST=host.docker.internal ghcr.io/proj-airi/airi-android:v0.3.4
For agents supporting MCP, you can use the following configuration:
// mcp.json
{
"mcpServers": {
// http mode
"airi-android-http": {
"url": "http://localhost:3000/mcp"
},
// stdio mode
"airi-android-stdio": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"USE_STDIO=true",
"-e",
"ADB_HOST",
"ghcr.io/proj-airi/airi-android:v0.3.4"
],
"env": {
"ADB_HOST": "host.docker.internal"
}
}
}
}
Run Directly
Requires Bun to be installed.
# Install dependencies
bun install
# Start server (HTTP mode, port 3000)
bun run start
# Or use stdio mode
USE_STDIO=true bun run start
Development Setup
Prerequisites
- Install Bun
- Install Android Platform Tools
- Connect an Android device (via USB or
adb connectfor emulators)
Commands
# Install dependencies
bun install
# Run tests
bun test
# Start development server
bun run dev
# Build binary
bun run build
# Lint code
bun run lint
# Type check
bun run typecheck
Contributing
See AGENTS.md for code guidelines.
Environment Variables
| Variable | Description | Default |
|---|---|---|
USE_STDIO |
Set to true to use stdio transport mode |
false |
ADB_HOST |
ADB server host address | localhost |
Tech Stack
- Bun - JavaScript runtime
- TypeScript - Type-safe JavaScript
- MCP SDK - Model Context Protocol SDK
- adbkit - ADB client library
- Hono - Web framework
- Zod - Schema validation
License
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.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.