Sponsored by Deepsite.site

Android Mcp Toolkit

Created By
Nam01019 days ago
A growing collection of MCP tools for Android Development. Currently features a deterministic Figma-SVG-to-Android-XML converter, with plans for Gradle analysis, Resource management, and ADB integration tools.
Content

Android MCP Toolkit for AI Agents

Small MCP server with two tools:

  • Fast SVG → Android VectorDrawable conversion (cached, file or inline).
  • adb logcat reader with package/pid/tag filters for quick crash triage.

Why this exists

The Mission: Bringing Native Android to the AI Agent Era

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.

Pairing ideas

  • Figma MCP: grab SVGs from designs, feed to convert-svg-to-android-drawable to get XML for Android resources.
  • Debugging: while running the app, call read-adb-logcat with package name or tag to capture crashes and filtered logs without leaving the MCP client.

Previews

SVG to VectorDrawable

  • Figma request → SVG extraction
    Figma request via MCP
  • Flag conversion preview (single)
    Flag conversion preview
  • Batch flag review (side-by-side)
    Batch flag review
  • Batch run via MCP (console)
    Batch run via MCP

ADB logcat tool

  • Crash capture prompt (inputs + filters)
    Crash logcat prompt
  • Response preview (summarized logcat)
    Response gap prompt

Current tools

  • convert-svg-to-android-drawable

    • Inputs: svg (inline) or svgPath (file path). Optional: outputPath, floatPrecision (default 2), fillBlack (default false), xmlTag (default false), tint, cache (default true).
    • Output: VectorDrawable XML text; also writes to disk when outputPath is provided.
    • Performance: LRU cache (32 entries) keyed by SVG + options plus fast reuse in-session.
    • Converter: vendored fork in 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 <maxLines> with optional --pid=<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 <package>.
    • 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 <maxLines>; 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.

Roadmap (planned)

  • Additional MCP tools for Android assets (e.g., batch conversions, validations, optimizers).
  • Optional resource prompts for common Android drawables/templates.
  • Upcoming MCP utilities (planned):
    • Logcat reader: stream and filter Android logcat output via MCP.
    • Asset checkers: flag common drawable issues (size, alpha, color profile).
    • Batch conversions: multi-SVG to VectorDrawable with consistent options.
    • Template prompts: quick-start drawable/XML snippets for common patterns.

Quick start

  • npm install
  • npm run build
  • node dist/index.js (stdio MCP server)

Run via npx

  • Global: npx android-mcp-toolkit

Use in Cursor (MCP config)

Add to your Cursor settings JSON:

{
  "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%3D

Examples

  • Input SVG: sample_svg.svg
  • Output VectorDrawable: examples/sample_svg.xml

Notes

  • Transport: stdio via @modelcontextprotocol/sdk.
  • Base deps kept minimal; everything needed to convert SVGs is vendored/included.

Contact

Server Config

{
  "mcpServers": {
    "android-mcp-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "android-mcp-toolkit"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
WindsurfThe new purpose-built IDE to harness magic
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp