devilge
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., "@devilgebuild, install, launch app and dump UI"
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.
devilge
Model Context Protocol (MCP) server that lets an AI assistant — typically Claude — develop, drive, and observe an Android / KMM app end-to-end.
devilge exposes 33 tools that cover the full inner loop: read the project, build it, install it, launch it, drive its UI, capture errors and network traffic, run tests. Anything an LLM coding agent would otherwise have to ask the user to do manually.
What's inside
Category | Tools | Purpose |
Device read (8) |
| Observe device + project state |
Project static (3) |
| Inspect Gradle/KMM project + run any Gradle task |
Device drive (7) |
| Manipulate the running app |
Locators + waits (6) |
| Semantic UI navigation, no coordinate magic |
Lifecycle (5) |
| Cold-start app, run Espresso tests, fast install |
Maestro flows (optional) (3) |
| Reusable YAML flows for recurring navigation |
Composition (1) |
| Chain multiple devilge tools in one round trip |
215 unit tests in Vitest, all green. Strict TypeScript (strict, noUncheckedIndexedAccess).
Batching for fewer permission prompts
Hosts that confirm every tool call (Claude Desktop, Cowork) can become noisy when the agent walks through multi-step UI flows. devilge_batch collapses a sequence into a single MCP call so the user approves once for the whole sequence.
// Tap "Settings", wait, screenshot, tap a row, screenshot — one approval.
{
"actions": [
{ "name": "devilge_tap_text", "input": { "text": "Settings" } },
{ "name": "devilge_wait_for_idle", "input": { "timeoutMs": 5000 } },
{ "name": "devilge_take_screenshot" },
{ "name": "devilge_tap_text", "input": { "text": "Wallpaper & style" } },
{ "name": "devilge_take_screenshot" }
]
}Rules: capped at 20 actions per call; cannot be nested; cannot include destructive tools (devilge_clear_app_data, devilge_install_apk) — those always require their own dedicated prompt; stops on the first error and reports which step failed.
All tools also expose MCP annotations (readOnlyHint, idempotentHint, destructiveHint, openWorldHint). Hosts that respect annotations can auto-approve safe reads and prompt only on state-changing tools.
Related MCP server: Android-MCP
Architecture
Clean / hexagonal layering, every concern replaceable in isolation:
src/
├── config/ # Config loading, structured logger, typed errors
├── domain/
│ ├── entities/ # Pure data types
│ └── ports/ # Interfaces the application talks to
├── application/ # Use cases — orchestrate ports, no IO of their own
├── infrastructure/
│ ├── adb/ # AdbAdapter, AdbAppController, runners, parsers
│ ├── build/ # Gradle adapter + parsers (compile errors, JUnit, Lint)
│ ├── maestro/ # Optional Maestro adapter + YAML validator
│ ├── network/ # Ktor logcat parser + header sanitizer
│ ├── scanners/ # ComposePreviewScanner, ProjectScanner, FileWalker
│ └── security/ # PathValidator, CommandSanitizer
└── presentation/
└── tools/ # MCP tool definitions (Zod schemas + handlers)src/server.ts is the composition root: it constructs every concrete dependency and wires them into an McpServer. Nothing else in the codebase performs construction.
Security model
devilge runs on a developer's machine, exposes mutating tools to an LLM, and shells out to ADB and (optionally) Gradle / Maestro. It assumes the operator connects only to a dev emulator or wiped test device, never a personal device with logged-in apps.
Project sandbox. All filesystem reads/writes resolve, after symlink resolution, to paths inside
DEVILGE_ANDROID_PROJECT_ROOTor the configured outputs / flows roots. Any escape throwsSecurityError.No shell. Every external process (
adb,gradlew,maestro) is spawned withshell: falseand an argv array. Arguments are never concatenated into strings.Strict argument allowlists. Device serials, logcat tags, package names, activity names, deep links, Gradle tasks, Maestro flow names and env-var keys all pass through
CommandSanitizerregex allowlists before reaching argv.Resource caps. Logcat capped (5000 line ceiling), ADB stdout cap 8 MiB, Gradle output cap 256 KiB ring buffer, file scans bounded, screenshot timeout 15 s, instrumented-test timeout 30 min default cap.
Symlinks ignored. Walkers never follow symlinks.
Logs go to stderr only. Stdout is reserved for the MCP JSON-RPC transport.
Errors are sanitized. Only
DevilgeErrorsubclasses surface their messages. Unexpected exceptions become an opaqueINTERNAL_ERROR.Header redaction.
Authorization,Cookie,Set-Cookie,X-API-Keyand other well-known sensitive headers are redacted fromget_network_callsoutput.Maestro
runScript:denied by default. YAML flows containingrunScript:blocks (which execute JS) are rejected unless the operator explicitly setsDEVILGE_ALLOW_FLOW_SCRIPTS=true.No frontmost-app check. devilge does NOT verify that the targeted package matches the device's foreground app. That check is a deployment concern — keep your dev device clean.
The MVP does include write tools (input automation, app install, data wipe, force-stop). These are gated to a dev-only device by operator policy, not by server logic.
Setup
cd devilge
npm install
cp .env.example .env
# edit .env with your project's absolute path
npm run buildRun the tests:
npm testVerify the build:
npm run typecheck # static type-check (no emit)
npm run build # emit dist/
npm run lint # eslintConnecting to Claude Desktop
Add an entry to your claude_desktop_config.json (path varies by OS):
{
"mcpServers": {
"devilge": {
"command": "node",
"args": ["/absolute/path/to/devilge/dist/index.js"],
"env": {
"DEVILGE_ANDROID_PROJECT_ROOT": "/absolute/path/to/your/android/project",
"DEVILGE_KTOR_LOG_TAG": "HttpClient"
}
}
}
}Restart Claude Desktop. The 33 tools should appear in the tool picker.
Local smoke test (MCP Inspector)
DEVILGE_ANDROID_PROJECT_ROOT=/absolute/path/to/your/android/project \
DEVILGE_KTOR_LOG_TAG=HttpClient \
npx --yes @modelcontextprotocol/inspector \
node dist/index.jsConfiguration reference
Variable | Required | Default | Description |
| ✅ | — | Absolute path to the Android/KMM project. All file reads are sandboxed under this directory. |
|
| Absolute path to the | |
| — | Default | |
|
| Default cap for | |
|
| One of | |
|
| Logcat tag the HTTP-client logger writes under. Use | |
|
| Which parser(s) to apply. | |
|
| Where screenshots / UI dumps land. Add to | |
|
| Where Maestro YAML flows live. | |
| auto-detected from PATH | Absolute path to the | |
|
| Set to |
Optional integrations
Maestro (flows)
Maestro is optional. Without it installed, every other devilge tool keeps working. The three flow tools (run_maestro_flow, list_maestro_flows, validate_maestro_flow) register unconditionally and return MAESTRO_NOT_INSTALLED when the binary isn't found.
To enable:
brew tap mobile-dev-inc/tap
brew install maestro
# or
curl -Ls "https://get.maestro.mobile.dev" | bashRestart the inspector. Flows go in <project>/devilge-flows/<name>.yaml. Example:
appId: com.example.your.app
---
- launchApp:
clearState: true
- tapOn: "Email"
- inputText: ${EMAIL}
- tapOn: "Password"
- inputText: ${PASSWORD}
- tapOn: "Sign in"
- assertVisible: "Home"Then:
{
"name": "login_flow",
"params": { "EMAIL": "user@example.com", "PASSWORD": "..." }
}MAESTRO_DISABLE_ANALYTICS=true is injected automatically. runScript: blocks are denied unless you opt in.
Headless Compose preview rendering (recipe, no devilge tool)
You can render @Preview Composables to PNG without launching the full app. devilge does NOT add a dedicated tool for this — the existing run_gradle_task plus the official Google plugin cover it cleanly, and adding a wrapper would make us depend on Gradle conventions that vary by project.
This is completely optional: if you don't add the plugin, devilge runs unchanged. You only lose this specific workflow.
To enable in your project, add to your Compose module's build.gradle.kts:
plugins {
// existing plugins...
id("com.android.compose.screenshot") version "0.0.1-alpha10"
}
android {
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}And in gradle/libs.versions.toml:
[plugins]
composeScreenshot = { id = "com.android.compose.screenshot", version = "0.0.1-alpha10" }Once the plugin is in place, render previews from the LLM via the existing tool:
devilge_run_gradle_task {
"task": ":composeApp:validateDebugScreenshotTest"
}The PNGs land under composeApp/build/outputs/screenshotTest/.... Claude can then read them via its Read tool to verify visual output without installing the app.
Recommended inner-loop workflow
1. run_gradle_task ":composeApp:assembleDebug" # build once at start
2. install_apk { "module": ":composeApp" } # ~5-8 s vs Gradle's 30-60 s
3. launch_app { "packageName": "...", "clean": true }
4. tap_text / set_text / wait_for_text # navigate to the screen
5. take_screenshot # confirm visual state
6. get_app_errors { "followMs": 10000 } # capture errors as they happen
7. get_network_calls # verify HTTP requests
8. on bug → edit code → back to step 1 (Gradle is incremental, fast)For recurring navigation paths (login, search, etc.), capture once as a Maestro flow and replay with one tool call.
Backlog (not committed, lowest priority)
Compose Live Edit MCP — true HMR for Android Compose. Major project (~2-3 months MVP, JVMTI agent + bytecode transformation + protocol). Waiting for JetBrains' Compose Hot Reload to land for Android first; the wrapper would be ~1-2 weeks.
pull_room_database— pull Room SQLite from device, expose readonly queries. Useful for inspecting cached state.pull_anr_traces+deobfuscate_stacktrace— diagnose runtime hangs and ProGuard-mapped release crashes.dumpsys_meminfo/dumpsys_gfxinfo/measure_cold_start— runtime performance metrics.describe_compose_codebase— structural map of the project (data classes, XML resources, color literal frequencies, composables) so the LLM doesn't have to grep at session start. Considered, deferred until proven necessary in real use.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables comprehensive control of Android devices via ADB for Flutter development, UI testing, and visual QA workflows. Provides 60+ tools for device management, UI inspection, app testing, performance profiling, and debugging through natural language.Last updated77MIT
- Alicense-qualityDmaintenanceEnables AI agents to control Android devices and emulators through direct UI interaction, allowing app navigation, automated testing, and real-world task execution via ADB without computer vision or scripts.Last updated1MIT
- AlicenseAqualityCmaintenanceEnables AI agents to build, test, debug, and interact with Kotlin Multiplatform Mobile (Android/iOS) applications through automated build pipelines, UI automation, crash analysis, and app state inspection.Last updated1591MIT

Argentofficial
AlicenseAqualityAmaintenanceEnables AI assistants to interact with iOS Simulators and Android Emulators, allowing autonomous app development, UI interaction, profiling, and debugging through natural language.Last updated4731,828Apache 2.0
Related MCP Connectors
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Yercko/devilge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server