home / mcp / real-time android ui development with ai agents - mcp server
MCP server for AI-powered UI feedback across React Native, Flutter, and native Android development.
Configuration
View docs{
"mcpServers": {
"infiniv-android-ui-mcp": {
"command": "npx",
"args": [
"android-ui-assist-mcp"
]
}
}
}You run a Model Context Protocol (MCP) server that lets AI agents see and analyze your Android app’s UI in real time during development. This enables iterative UI refinement across Expo, React Native, Flutter, and native Android workflows, with instant visual feedback as you code and test.
You connect an AI agent to a running app and leverage real-time UI analysis to guide design and implementation. Start your development server (Expo, React Native, Flutter, or native Android), then configure your AI client to use this MCP server. As you make UI changes, ask your agent to analyze the current screen, suggest improvements, or help implement adjustments. The agent captures screenshots and provides contextual feedback to accelerate iteration and ensure UI quality across devices.
Typical usage patterns include: taking screenshots after each change to validate layouts, requesting accessibility checks with visual context, and iterating on spacing, color, and component composition with immediate AI-driven guidance. You can target multiple devices or emulators to compare layouts side by side and verify cross-device consistency.
Prerequisites you need before installation are clearly defined for a smooth setup.
1) Install Node.js (18.x or newer) and npm (included with Node.js). 2) Ensure ADB (Android Debug Bridge) is installed and available in your PATH. 3) Have Git installed if you plan to build from source.
Install the MCP server globally so you can run it from anywhere:
npm install -g android-ui-assist-mcpVerify the installation to confirm the MCP server is accessible:
android-ui-assist-mcp --version
```
If you installed via npm, you can also run:
```
npx android-ui-assist-mcp --versionIf you prefer compiling from source, use these steps to clone and build the project, then install dependencies and build the project before running:
git clone https://github.com/yourusername/android-ui-assist-mcp
cd android-ui-assist-mcp
npm install
npm run buildYou connect AI agents that support MCP to your running app. The following connection patterns are shown in examples and enable you to integrate various clients.
Claude Code client connection (CLI): use a direct CLI integration to connect the MCP server for local development.
Claude Desktop and GitHub Copilot (VS Code) connections: configure the respective clients to point to the MCP server using a standard stdio configuration.
Gemini CLI: connect the Gemini client to the MCP server with a standard stdio configuration.
Example stdio MCP configuration in clients (all use the same MCP binary and arguments, ensuring quick adoption across tools):
{"type": "stdio", "name": "android-ui_assist", "command": "npx", "args": ["android-ui-assist-mcp"], "timeout": 10000}During development, run your app with Expo, React Native, Flutter, or native Android. Then connect the MCP server to your preferred AI agent. The agent will take screenshots and provide UI refinement suggestions in real time, helping you iterate faster and maintain design consistency.
- Node.js 18.0+ - npm 8.0+ - ADB (Android SDK Platform Tools) - A running Android development environment (Expo, React Native, Flutter, or native Android)
Expo Development
1) Start your Expo development server
npx expo start
# or
npm start2) Open your app on a connected device or emulator 3) Ensure your device appears in adb devices 4) Your AI agent can now take screenshots during development
React Native Development
npx react-native start
```
```
npx react-native run-androidFlutter Development
flutter runNative Android Development
Open project in Android Studio and run the app with a connected device or emulator.You can deploy the MCP server in Docker to enable team collaboration and CI/CD.
Docker Compose
cd docker
docker-compose up --build -dConfigure a Docker-based MCP server command in your client configuration with a running container and the appropriate entry to execute the MCP server.
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-mcpTools exposed by the MCP server allow you to interact with the Android UI and manage devices.
- take_android_screenshot: captures a screenshot from a device or emulator - list_android_devices: lists connected devices with details
Real-time UI development: start your app, connect an AI agent, and request screenshots after each change to analyze layout and accessibility in real time.
ADB issues: ensure ADB is installed and in PATH, check device authorization, and verify the device shows up with adb devices.
Connection issues: confirm the MCP client is configured to connect to the server, restart ADB if needed, and check USB debugging permissions on the device.
Build commands you can use during development include linting, formatting, and tests:
npm run build # Production build
npm test # Run tests
npm run lint # Code linting
npm run format # Code formattingKey source files organize the MCP server and utilities.
src/ contains core server implementations and helpers, such as server.ts, types.ts, and utilities for adb, screenshots, and error handling.
The server focuses on efficient, secure stdio communication with timeout handling and in-memory screenshot processing to minimize latency.
MIT License - see LICENSE file for details.
Captures a screenshot from an Android device or emulator, optionally specifying a deviceId to target a specific device.
Lists all connected Android devices and emulators with detailed information.