MCP server with useful Android development tools: SVG conversion, Logcat management, and Device automation (dump UI, screenshot, input).
npm install android-mcp-toolkitSmall MCP server with three tools:
- Fast SVG → Android VectorDrawable conversion (cached, file or inline).
- adb logcat reader with package/pid/tag filters for quick crash triage.
- Translation length difference estimator to flag risky length deltas before layout breaks.
While the AI ecosystem flourishes with web-first tools, Android development often feels left behind. This MCP server is my answer to that gap—a dedicated bridge connecting AI Agents directly to the Android toolchain.
⚡ Zero-Friction Asset Conversion: Convert SVGs to VectorDrawables instantly without the overhead of launching Android Studio.
🔍 Direct Diagnostic Access: Empower agents to pull, filter, and analyze adb logcat streams (by package, PID, or tag) in real-time.
🤖 Agent-Native Architecture: Deliver structured, scriptable outputs that LLMs can parse and act upon efficiently.
🚀 Built for Extensibility: A solid foundation designed to grow, paving the way for future utilities like bitmap helpers and asset validation.
convert-svg-to-android-drawable to get XML for Android resources.read-adb-logcat with package name or tag to capture crashes and filtered logs without leaving the MCP client.ADB logcat tool
- Crash capture prompt (inputs + filters)
!Crash logcat prompt
- Response preview (summarized logcat)
!Response gap prompt
convert-svg-to-android-drawablesvg (inline) or svgPath (file path). Optional: outputPath, floatPrecision (default 2), fillBlack (default false), xmlTag (default false), tint, cache (default true).outputPath is provided.vendor/svg2vectordrawable with fixes for rgb()/rgba(), hsl()/hsla(), and named colors. Upstream license: vendor/svg2vectordrawable/LICENSE (MIT).- read-adb-logcat
- Inputs: packageName (resolve pid via adb shell pidof -s), pid (explicit), tag, priority (V|D|I|W|E|F|S, default V), maxLines (tail count, default 200, max 2000), timeoutMs (default 5000, max 15000).
- Behavior: Runs adb logcat -d -t with optional --pid= and -s tag:priority.
- Output: Returns the logcat text; if no lines are returned, responds with a short message.
- Notes: Requires adb available in PATH and a connected device/emulator. Provide at least one of packageName, pid, or tag to scope logs.
- get-pid-by-package
- Inputs: packageName (required), timeoutMs (default 5000, max 15000).
- Behavior: Resolves pid via adb shell pidof -s .
- Notes: Use this first, then pass pid to other logcat tools for noise-free filtering.
- get-current-activity
- Inputs: timeoutMs (default 5000, max 15000).
- Behavior: Parses adb shell dumpsys window for mCurrentFocus / mFocusedApp to reveal the currently focused window (useful even in single-activity setups to confirm top window).
- fetch-crash-stacktrace
- Inputs: packageName (optional, resolves pid), maxLines (default 400, max 2000), timeoutMs (default 5000, max 15000).
- Behavior: Pulls crash buffer via adb logcat -b crash -d -t ; filters by --pid when package is provided.
- check-anr-state
- Inputs: maxLines (default 400, max 2000), timeoutMs (default 5000, max 15000).
- Behavior: Fetches ActivityManager:E *:S (recent ANR logs) and best-effort reads /data/anr/traces.txt (stat + tail 200 lines). May require root/debuggable.
- clear-logcat-buffer
- Inputs: timeoutMs (default 5000, max 15000).
- Behavior: Runs adb logcat -c to clear buffers before a new scenario.
- estimate-text-length-difference
- Inputs: sourceText (original), translatedText (to compare), tolerancePercent (default 30, max 500).
- Behavior: Measures grapheme length of both strings, computes percent change, and reports whether it exceeds the tolerance (useful to catch translation length blowups that could break layouts).
npm installnpm run buildnode dist/index.js (stdio MCP server)npx android-mcp-toolkitjson
{
"mcpServers": {
"figma-desktop": {
"url": "http://127.0.0.1:3845/mcp"
},
"android-mcp-toolkit": {
"command": "npx",
"args": [
"-y",
"android-mcp-toolkit"
]
}
}
}
`
The npx call downloads the published package; no local path required.Quick install via Cursor deep link:
-
cursor://anysphere.cursor-deeplink/mcp/install?name=android-mcp-toolkit&config=eyJjb21tYW5kIjoibnB4IC15IGFuZHJvaWQtbWNwLXRvb2xraXQifQ%3D%3DExamples
- Input SVG: sample_svg.svg
- Output VectorDrawable: examples/sample_svg.xmlNotes
- Transport: stdio via @modelcontextprotocol/sdk`.