Android Studio MCP
Offers tools for Android development: build APK/AAB, manage emulators and devices, install apps, capture logs and screenshots, analyze APKs, and handle SDK components.
Provides tools for operating Android Studio: open projects, inspect code, format, run IDE actions, and manage the live IDE via HTTP bridge and UI automation.
Allows control over Gradle builds: run tasks for assembling, testing, linting, dependency analysis, and signing reports with structured results.
Enables headless IDE operations using JetBrains IntelliJ engine: code inspection, formatting, and diff via Android Studio's CLI tools.
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 Studio MCPBuild and run the app on a Pixel 6 emulator"
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 Studio MCP
Let Claude operate Android Studio and the entire Android toolchain — not just talk about it.
A professional Model Context Protocol server that turns Claude (Claude Code / Claude Desktop) into a real Android operator: build, test, lint, run on devices & emulators, analyse APKs, scaffold projects, inspect code headlessly, and drive the live IDE.
Why this exists
Android Studio is an IntelliJ‑based IDE. The reliable way to operate it programmatically is not to pixel‑click the GUI — it's to drive the same tools the IDE drives. This server is built stable‑first: the bulk of the power comes from the rock‑solid command‑line toolchain, with the live‑IDE bridge and UI automation as additional layers that degrade gracefully.
Layer | Mechanism | Covers | Robustness |
1. Build / SDK CLI |
| build, test, lint, deps, signing, devices, emulators, APK/AAB analysis | ★★★★★ headless, deterministic |
2. Headless IDE CLI |
| full code inspection reports, reformat, navigation | ★★★★☆ |
3. Live IDE | built‑in HTTP server ( | open‑in‑IDE, IDE state, IDE actions — while the IDE runs | ★★★☆☆ |
4. UI fallback | native Win32 focus + SendKeys + screenshot | any action via "Find Action", visual verification | ★★☆☆☆ |
Everything in layers 1–2 works whether or not the IDE is open and needs no plugins.
Related MCP server: Enhanced ADB MCP Server
Highlights
🟢 One‑shot "Run" button —
as_run_app: build → install → launch → capture logs → detect crashes → screenshot, in a single call.🔨 Full Gradle control — assemble APK/AAB, unit & instrumented tests, lint, dependencies, signing report — with structured findings (lint XML & JUnit XML parsed into file/line/severity).
🩺 Self‑healing builds — failing builds return a
remediationlist mapping the error to the exact next tool to call (license → accept, missing platform → install, no device → start emulator).📱 Devices & emulators — list/create/start/stop AVDs, install/uninstall, streaming logcat you can poll, screenshots, screen recording, input injection.
🏗️ Project scaffolding — generate a real, buildable Views or Compose project (bundled Gradle wrapper, correct AGP/Kotlin/SDK levels).
🔍 Headless code inspection — run the IDE's offline "Inspect Code" engine and get structured problems back.
📦 APK / AAB analysis — package/version/permissions, method counts, sizes, signature verification, APK diff, AAB → installable APK set.
🔒 Safety‑first — workspace path allow‑list, confirmation gating for destructive actions, automatic backups, secret redaction, hardened device‑shell.
🧪 Tested — 73 tools, real APK built end‑to‑end, 15 parser unit tests, security‑gate regression, adversarial multi‑agent code review.
Requirements
Windows (the server is Windows‑targeted; paths and process control use Win32).
Android Studio (tested against build
AI‑261, 2026.1.x) — autodiscovered atC:\Program Files\Android\Android Studio.Android SDK with command‑line tools, platform‑tools, emulator and build‑tools — autodiscovered at
%LOCALAPPDATA%\Android\Sdk.Python ≥ 3.10 and uv.
All paths are autodiscovered but can be overridden (see Configuration).
Install
git clone https://github.com/MauricePutinas/Android-Studio-MCP-Claude-Code.git
cd Android-Studio-MCP-Claude-Code
uv sync
# sanity checks
uv run python -m android_studio_mcp --selfcheck # resolved paths + tool count
uv run python -m android_studio_mcp --list-tools # all 73 tools
uv run python scripts/smoke_test.py # 17/17 functional checks
uv run pytest tests -q # 15 parser unit testsWire into Claude
Claude Desktop — %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"android-studio": {
"command": "C:\\Users\\<you>\\AppData\\Local\\hermes\\bin\\uv.exe",
"args": ["--directory", "C:\\path\\to\\Android-Studio-MCP-Claude-Code", "run", "python", "-m", "android_studio_mcp"]
}
}
}Claude Code (CLI):
claude mcp add android-studio --scope user -- uv --directory "C:\path\to\Android-Studio-MCP-Claude-Code" run python -m android_studio_mcpOne‑click bundle: build a .mcpb with powershell -File scripts\build_mcpb.ps1 and install it via Claude Desktop → Settings → Extensions → Install extension. See docs/CLAUDE_SETUP.md and docs/PACKAGING.md.
Note: the committed
manifest.json/ example configs are pre‑filled for the author's machine. Adjust the two absolute paths (project dir,uv.exe) to your setup.
Tool catalogue (73 tools)
All tools are prefixed
as_and return JSON with astatus(ok|error|confirmation_required) and a humansummary. Destructive tools requireconfirm=true.
as_status · as_is_running · as_launch · as_close · as_restart · as_open_project · as_open_file · as_diff
as_run_app (build→install→launch→logs→crash→screenshot) · as_logcat_watch_start / as_logcat_watch_read / as_logcat_watch_stop · as_proc_list / as_proc_stop
as_gradle_tasks · as_gradle_assemble · as_gradle_bundle · as_gradle_test (structured JUnit) · as_gradle_lint (structured findings) · as_gradle_clean · as_gradle_dependencies · as_gradle_signing_report · as_gradle_run_task · as_gradle_stop
as_sdk_list · as_sdk_install · as_sdk_accept_licenses
as_avd_list · as_avd_create · as_avd_delete · as_avd_start · as_avd_stop
as_adb_devices · as_adb_install · as_adb_uninstall · as_adb_logcat · as_adb_logcat_clear · as_adb_shell (guarded) · as_adb_screenshot · as_adb_input · as_adb_start_app · as_adb_stop_app · as_adb_pull · as_adb_push
as_project_create (real Views/Compose scaffold) · as_project_info (incl. version catalog) · as_project_validate · as_project_backup · as_project_list_recent
as_apk_info · as_apk_methods · as_apk_filesize · as_apk_verify_signature · as_apk_compare · as_aab_build_apks · as_aab_install
as_inspect_code (offline "Inspect Code" → structured problems) · as_format_code (reformat in place, backups first)
as_retrace (de‑obfuscate R8/ProGuard stack traces) · as_screenrecord (record device screen → mp4)
as_ide_status · as_ide_list_mcp_tools · as_ide_call_mcp_tool
as_ui_screenshot · as_ui_focus · as_ui_send_keys · as_ui_invoke_action (any IDE action via "Find Action")
as_report_health · as_logs_ide · as_logs_mcp · as_config · as_backup_file · as_restore_backup
Resources: asmcp://config · asmcp://idea-log · asmcp://projects/recent
Prompts: run_app · diagnose_build
Safety model
Path allow‑list — write/delete operations must target a path inside a configured workspace root (default:
E:\Projekte+ home). Override withASMCP_WORKSPACE_ROOTS.Confirmation gating — destructive tools (
as_close --force,as_adb_uninstall,as_avd_delete,as_format_code,as_sdk_install,as_restore_backup, …) returnconfirmation_requiredunless called withconfirm=true.Backups first — files are backed up before being reformatted/overwritten; projects can be zipped with
as_project_backup.Guarded device shell —
as_adb_shellruns recognised read‑only commands freely but requiresconfirm=truefor anything containing shell operators (;,|,&&,$(), …) or destructive markers.Secret redaction — keystore/store/key passwords and tokens are masked in all captured output and logs.
stdio‑safe logging — all logs go to stderr + a rotating file, never stdout.
Configuration
Resolution order for every setting: env var → config.json → autodiscovery → default.
Setting | Env var | Default |
Android Studio home |
|
|
Android SDK |
|
|
Workspace roots (allow‑list) |
|
|
Built‑in server port |
|
|
bundletool jar |
| auto‑downloaded on first use |
See config.example.json.
Architecture
src/android_studio_mcp/
├── app.py FastMCP instance
├── config.py toolchain autodiscovery + settings
├── runner.py safe subprocess execution (env, .bat, timeouts, redaction)
├── safety.py path allow‑list, confirmation gating, backups
├── procregistry.py background process registry (logcat watch, …)
├── parsers.py Gradle / ADB / AVD / SDK / aapt output parsers
├── report_parsers.py lint XML, JUnit XML, version catalog
├── diagnostics.py build‑failure → remediation rules
├── scaffold.py project templates (Views / Compose)
├── ide_http.py built‑in IDE server (:63342) client
├── mcp_bridge.py stdioMcpServer bridge
├── winauto.py native Win32 UI automation
└── tools/ 73 @mcp.tool definitions, grouped by domainTesting
Suite | What | Result |
| env checks, gating, path allow‑list, scaffold round‑trip | 17/17 |
| real | BUILD SUCCESSFUL |
| adb‑shell injection/chaining gate | 6/6 |
| pure parser functions | 15/15 |
| 10 read‑only eval Q&A (mcp‑builder format) | — |
A full capability/risk matrix is in docs/QUALITY.md.
Limitations
The official live‑IDE MCP (
stdioMcpServer) needs the MCP Server plugin (com.intellij.mcpServer). On a stock Android Studio it may not be installed —as_ide_statustells you, and the CLI tools cover everything regardless.Headless
inspectindexes the project first, so it can take minutes; don't run it while the same project is open in a running IDE (config‑dir contention).UI automation (SendKeys) is best‑effort and English‑keymap oriented; always verify via the returned screenshot.
The server is Windows‑only by design.
License
MIT © Maurice Putinas — see LICENSE.
Built with FastMCP. Not affiliated with Google or JetBrains. "Android" and "Android Studio" are trademarks of Google LLC.
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
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/MauricePutinas/Android-Studio-MCP-Claude-Code'
If you have feedback or need assistance with the MCP directory API, please join our Discord server