Android Builder MCP Server
Provides tools for building, deploying, and testing Android applications, including project creation, compilation, emulator management, APK installation, and debugging.
Allows executing Gradle build tasks such as assembleDebug and assembleRelease with timeout safeguards and daemon control.
Enables creating new Android projects using the Jetpack Compose template for modern UI development.
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., "@Android Builder MCP Servercreate a new Jetpack Compose project named DemoApp"
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.
Android Builder MCP Server
An advanced Model Context Protocol (MCP) server that empowers AI coding agents (like Claude or Antigravity) to act as fully capable local Android developers.
By exposing compilation, emulator, asset management, and diagnostics capabilities directly to the agent, the MCP enables a closed-loop build cycle where the agent can build, run, visually inspect, debug, and sign release-ready Android applications.
🚀 Key Features
Project Initialization: Spin up templates (Empty Activity or Jetpack Compose) out-of-the-box.
Safe Gradle Runner: Execute build tasks (e.g.
assembleDebug,assembleRelease) in a secure, non-hanging execution wrapper with automatic timeout safeguards and disabled background compilation daemons (preventing thread deadlocks).Live Visual Inspection: Capture screenshots of the running emulator screen directly to your host's artifacts directory so vision-based AI models can inspect the UI layout.
Logcat Diagnostics: Stream filtered logs from active devices to diagnose app crashes.
Android Resource Importer: Automatically sanitizes asset names to comply with Android's strict naming rules (
[a-z0-9_]) and places files in the correct moduleres/folders.Manifest & Build Editors: Safely inject manifest permissions, set app names in XML resources, and update Gradle build versions without breaking formatting.
Signing Pipeline: Generate JKS keystores and run zip alignments (
zipalign) followed by private key signing (apksigner) to produce Play Store-ready APKs.
Related MCP server: agent-droid-bridge
🛠️ Prerequisites
To run this MCP server, the host machine must have the following tools installed and configured:
Python 3.10 to 3.12
Install Python and ensure it is added to your environment
PATH.
Node.js
Required if you are running the server via the Javascript launcher bridge.
Android SDK
Ensure the Android SDK is installed (typically installed with Android Studio).
Set the
ANDROID_HOMEorANDROID_SDK_ROOTenvironment variable pointing to your SDK folder (e.g.,C:\Users\<YourUser>\AppData\Local\Android\Sdk).
Java Development Kit (JDK 17 or 21)
Ensure a compatible JDK is installed (e.g. OpenLogic JDK or OpenJDK).
Set the
JAVA_HOMEenvironment variable pointing to your JDK folder.
📦 Setup & Installation
Clone the repository to your local machine (e.g. at
C:\Android-Builder-MCP).Install Python dependencies: Open a terminal in the project directory and run:
pip install -r requirements.txtNote: If you encounter a
TypeError: cannot specify both default and default_factorywhen importingfastmcp, ensure Pydantic is downgraded to2.11.xby running:pip install "pydantic<2.12.0"
⚙️ Client Integration (Claude Desktop Configuration)
To connect this MCP server to Claude Desktop, open your configuration file (%APPDATA%\Claude\claude_desktop_config.json) and add the server inside the mcpServers object.
Choose one of the following launcher options:
Option 1: Direct CMD Execution (Recommended for Windows Store Python)
This bypasses Node.js entirely and executes Python 3.12 inside a command shell context, which is required to resolve Windows Store execution aliases:
{
"mcpServers": {
"android-builder": {
"command": "cmd.exe",
"args": [
"/c",
"C:\\Users\\admin\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\python.exe",
"-u",
"C:/Android-Builder-MCP/server.py"
]
}
}
}(Make sure to adjust the path to your specific Python 3.12 executable if it differs).
Option 2: JS Launcher Bridge
Uses Node.js to launch the script wrapper, which routes commands through a shell context automatically:
{
"mcpServers": {
"android-builder": {
"command": "node",
"args": [
"C:/Android-Builder-MCP/mcp_launcher.js"
],
"env": {
"MCP_PYTHON_PATH": "C:\\Users\\admin\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\python.exe"
}
}
}
}(You can omit the MCP_PYTHON_PATH environment variable if your default system python command already maps to the Python environment where mcp is installed).
📖 MCP Tool Reference
Tool Name | Type | Description |
|
| Inspects and reports SDK, JDK, and build tool configurations. |
|
| Lists all Android projects created inside the workspace directory. |
|
| Initializes a new project from templates ( |
|
| Compiles your project using local Gradle configurations. |
|
| Lists virtual device definitions (AVDs) and their current state. |
|
| Launches an AVD and blocks until the Android boot cycle finishes. |
|
| Lists all active device interfaces connected to ADB. |
|
| Installs a built APK file onto a target running emulator or device. |
|
| Sanity-checks image names and copies them to drawing/mipmap resource folders. |
|
| Captures the emulator screen and saves it as a local PNG in the artifacts folder. |
|
| Streams filtered logcat outputs from active emulators to inspect app crashes. |
|
| Injects security permissions (e.g. Internet) safely into |
|
| Safely updates the app's user-facing display label in |
|
| Adjusts numeric version codes and semantic strings in build files. |
|
| Generates JKS keystore files non-interactively using JDK's |
|
| Performs zip boundary alignment and signs the APK using a generated keystore. |
🤖 Closed-Loop Visual UI Development Workflow
With this MCP installed, you can upload screenshots of app screens or mockups directly into your chat with Claude and say:
"Build me an Android application that looks like this mockup image."
Claude will proceed to:
Analyze the mockup image using visual model reasoning.
Create a Compose project using
create_project.Implement the screens in Kotlin.
Compile the APK using
build_project.Start the emulator and install the APK (
start_emulator->install_apk).Take a screenshot of the running app using
capture_screenshot.Review the screenshot visually, compare it to your design, and automatically patch the code to fix layout discrepancies, repeating the loop until it matches perfectly!
This 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/rahulbalhotra/Android-Builder-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server