DroidAgentKit
MCP server that provides AI coding agents real Android development tools—Gradle, adb, logcat, lint, crash triage—through a local, permissioned interface. Enables agents to inspect projects, run safe Gradle tasks, capture logs/screenshots, and triage crashes.
README
DroidAgentKit
Give your AI coding agent real Android tools — Gradle, adb, logcat, lint, crash triage — through a local, permissioned MCP server instead of raw shell access.
DroidAgentKit helps you work on Android projects with AI agents. It runs on your machine, talks to your Gradle tree and (when you allow it) your emulator or device, and gives agents structured answers instead of raw shell output.
Everything stays local. Commands go through allowlists. Output is redacted before it comes back to the agent. Artifacts land under build/droidagentkit by default.
What you get
Three pieces that work on their own or together:
MCP server — A Model Context Protocol server your agent can call. Inspect the project, run safe Gradle tasks, capture logs and screenshots, triage crashes, run lint, profile builds, and more. Optional groups add device diagnostics, bounded device control, Perfetto tracing, visual regression, read-only app storage inspection, and experimental emulator network capture.
Readiness auditor — Scores how agent-friendly your repo is, lists risks, and can generate AGENTS.md, a project skill file, and a starter .droidagentkit/config.yaml. Use --redact-public when you need a share-safe report.
Visual regression kit — Pixel-diff reports for Compose/UI captures, a Gradle plugin, and a JUnit rule. MCP tools can diff goldens, generate reports, and update goldens when you explicitly confirm.
MCP tools at a glance
The core group is on by default (15 tools): project inspect, allowlisted Gradle runs, device list, install/launch, logcat, screenshot, accessibility snapshot, report bundle, lint, crash triage, dependency check, build performance, test run, and build diagnose.
Turn on more by exposing tool groups when you start the server (see security model):
| Group | What it adds |
|---|---|
device_read |
Permission audit, dumpsys summaries, memory/battery, bugreport, streaming logcat jobs |
device_control |
Emulator control, app uninstall/clear, intents, permissions, tap/swipe/type, file push/pull, small action flows |
perfetto |
Trace capture and Trace Processor analysis (jank, CPU, contention, binder latency, …) |
visuals |
Pixel diff, visual report, golden updates |
storage |
Read-only SQLite, SharedPreferences, and file tree for debuggable apps |
network_experimental |
Emulator-only mitmproxy capture + redacted HAR query (requires your own debug CA) |
Dangerous actions (uninstall, clear data, proxy install, golden overwrite, …) need the right capability in config and confirmDestructive=true on the call. The capability is the real boundary — confirmDestructive guards against an accidental call, not a hostile one, since the agent supplies it. See the threat model.
Report bundles include a capability summary: which groups are exposed, which capabilities are enabled, and what you still need installed (adb, trace processor, mitmproxy, …). That summary is informational — it does not change your readiness score.
Full tool list and capability IDs: docs/security-and-permissions.md.
Quick start
Prerequisites: JDK 17+ on PATH, Node 18+ (install-time only for the launcher). Optional:
Android adb / platform-tools for device tools; set ANDROID_HOME or configure adbPath in the
user policy (~/.droidagentkit/policy.yaml).
The @droidagentkit/launcher npm package downloads and caches the matching droidagent-cli jar from
GitHub Releases the first time it runs,
verifying its SHA-256 before executing it. The launcher always runs serve-mcp — for init /
install-mcp / audit use java -jar on the downloaded jar or build from source.
npx -y @droidagentkit/launcher --version
Point your agent's MCP config at it directly, e.g. for Claude Code:
claude mcp add droidagentkit -- npx -y @droidagentkit/launcher
Building from source
If you're contributing, or want to run a version that isn't released yet:
./gradlew :cli:installDist
./cli/build/install/droidagent/bin/droidagent install-mcp
Register it once for your agent (Codex, Claude Code, Cursor, Zed, VS Code, Android Studio, …).
Preview without writing files with install-mcp --dry-run. For Android Studio across many
projects under one folder:
droidagent install-mcp --targets android-studio --projects-root ~/Developer/StudioProjects
Details and per-host config paths: docs/easy-mcp-installation.md.
Security model + full tool tables: docs/security-and-permissions.md.
CLI reference + troubleshooting: docs/cli-reference.md, docs/troubleshooting.md.
Try it in chat
After install-mcp, open an Android project and ask things like:
- "Inspect this Android project with DroidAgentKit."
- "Run the safe unit tests for the app module."
- "Audit this repo for agent readiness and write AGENTS.md."
- "Capture logcat and triage the crash."
- "What's in the app's SQLite schema?" (with
storage+app_data_readenabled) - "Capture a Perfetto trace and summarize frame jank." (with
perfettoenabled)
You describe the goal; the agent picks tools from the list it was given at startup.
How it works
- Your agent starts
droidagent serve-mcp --transport stdio --project auto(or talks to the localhost HTTP endpoint Android Studio uses on macOS). - MCP handshake (
initialize, thentools/list). - The agent calls
android_*tools viatools/call. You don't call them by hand. --project autoresolves the active project fromCLAUDE_PROJECT_DIR,CODEX_WORKSPACE/CODEX_PROJECT_DIR,GEMINI_PROJECT_DIR/GEMINI_WORKSPACE,CURSOR_PROJECT_DIR/CURSOR_WORKSPACE,PWD, then cwd — one user-wide install, many projects.
Optional resources and workflow prompts are available on non–Android Studio hosts. Tool listings include hints like readOnlyHint and destructiveHint where relevant.
CLI without an agent
droidagent inspect --project /path/to/android --format markdown
droidagent audit --project /path/to/android --write-agents
droidagent audit --project /path/to/android --redact-public
droidagent devices --format json
droidagent serve-mcp --transport stdio --project auto
Run droidagent --help or droidagent <command> --help for flags.
Generating a config file
droidagent init # interactive: six yes/no prompts explaining risk per area
droidagent init --profile device-control # non-interactive, for scripted setup
droidagent init --profile full # everything, including storage and network capture
droidagent init --list-profiles # see all profile names without writing anything
Only the core tool group (safe, read-only) is enabled by default. droidagent init is the fastest way to
turn on more without hand-writing .droidagentkit/config.yaml — see
docs/security-and-permissions.md for what each group and capability
actually grants an agent.
Configuration
Put .droidagentkit/config.yaml in your Android project root to tune Gradle allowlists, adb permissions, capability flags, redaction patterns, and report output paths. The auditor can seed a safe default when you run audit --write-agents.
Status
Alpha. MCP tool names and schemas are treated as stable, but behavior will tighten as we learn from real use. No telemetry. No cloud dependency for core workflows.
More docs
- Security and permissions — capabilities, tool groups, destructive ops
- Easy MCP installation — per-host setup
- CLAUDE.md — build commands and architecture notes for contributors
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。