Sponsored by Deepsite.site

Dev Tools For Android (dta) Mcp

Created By
yamsergeya month ago
Expose Android's app runtime data to coding agents for efficient navigation, debugging, network monitoring, network mocking/interceptions and a bit more.
Overview

Development Tools for Android (DTA)

Maven Central JetBrains Marketplace Snyk Security

A toolkit that gives AI assistants direct access to Android devices through the Model Context Protocol. Your coding agent can see the screen, read network traffic, inspect layout trees, mock responses, and interact with the app — from Android Studio, the terminal, or any MCP client.

Video overview

Article: Debugging Android Apps with AI

Quick Start

Option A: Android Studio Plugin

Install from JetBrains Marketplace

Or: Settings → Plugins → Marketplace → search "DTA"

The plugin embeds the daemon, auto-injects sidekick into debug builds, and provides a 4-tab inspector (Layout, Network, WebSocket, MCP) — no CLI or manual setup needed.

Option B: CLI

brew tap yamsergey/packages
brew install dta-cli

Requirements: Java 21+

No project changes needed. Use the CLI or the MCP run_app tool to build and launch your app with sidekick injected automatically:

dta-cli run --project /path/to/your/android/project

This runs Gradle with an init script that adds dta-sidekick as a debugImplementation dependency, builds the APK, installs it on the device, and launches the main activity. Your AI assistant can do the same via the run_app MCP tool.

Manual (alternative)

If you prefer to add sidekick to your build files directly:

dependencies {
    debugImplementation 'io.github.yamsergey:dta-sidekick:0.9.36'
}

Sidekick auto-initializes via AndroidX Startup — no code changes beyond the dependency.

Connect your AI assistant

With the AS plugin: open the MCP tab, enable the server, pick your agent from the dropdown — it shows the exact config snippet to copy-paste. Works with Claude Code, Cursor, Android Studio Gemini, Claude Desktop, VS Code, and others.

Without the plugin (CLI only):

Claude Code

claude mcp add dta -- dta-cli mcp

Cursor

Add DTA to Cursor

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "dta": {
      "command": "dta-cli",
      "args": ["mcp"]
    }
  }
}

What Can Your Agent Do?

Screen Analysis

DTA returns the real UI hierarchy — view classes, bounds, positions, layout parameters, Compose-specific data (composable names, recomposition counts), and DOM trees from WebViews and Chrome Custom Tabs. Unlike adb shell uiautomator dump which gives a semantic accessibility tree, your agent gets the full picture.

Network Analysis

Sidekick auto-records from app launch — HTTP requests (OkHttp), WebSocket connections, Chrome Custom Tab traffic, and WebView network requests. No "start recording" button, no missed requests. Your agent can query the full history at any point.

Mocking

Create mock rules for HTTP and WebSocket from captured data or from scratch. Plug in custom adapters for programmatic control:

Sidekick.configure(
    SidekickConfig.builder()
        .httpMockAdapter { transaction, proposedResponse ->
            proposedResponse.withBody("""{"message": "mocked"}""")
        }
        .build()
)

Build & Launch

The run_app tool builds an APK with sidekick auto-injected, installs it, and launches the main activity — all from a single MCP call. No manual Gradle setup. If the tool is blocked by your environment's sandbox, it returns the exact shell commands as a fallback.

Verification

The agent can tap, swipe, input text, and press keys — then check the screen state and network traffic to confirm behavior. A full inspect-mock-interact-verify loop without leaving the conversation.

Android Studio Plugin

The DTA Inspector tool window provides four tabs:

TabFeatures
LayoutUI tree + device screenshot with hover highlighting, click-to-select, bidirectional selection sync
NetworkHTTP request table with headers, bodies, timing; Custom Tab + WebView traffic
WebSocketConnection list → message list → message detail
MCPEnable HTTP server, pick port, per-agent config snippets with copy-to-clipboard

The plugin auto-injects dta-sidekick into debug builds via a Gradle init script — no changes to your project files.

Inspector Web Interface

dta-cli inspector-web

Open http://localhost:8080 for visual inspection with the same capabilities — layout tree, network, WebSocket, mock rule editor.

The web inspector enables bidirectional communication between developer and agent — select elements with a click instead of describing them in words.

MCP Transports

TransportCommandUse case
stdiodta-cli mcpClaude Desktop, Cursor, any stdio MCP client
HTTPdta-cli mcp serve --http --port 12321AS Gemini, Claude Code HTTP, any Streamable HTTP client
PluginEnable in MCP tabHTTP server embedded in AS, no CLI needed

Modules

ModuleDescription
dta-pluginAndroid Studio plugin (4-tab inspector + embedded daemon + MCP server)
dta-cliCLI interface (mcp, inspector-web, run, inspect commands)
dta-mcpMCP server (stdio + HTTP transport, tool definitions)
dta-daemonJavalin HTTP daemon (sidekick connection, CDP watcher, layout enrichment)
dta-sidekickIn-app inspection library (Android AAR, auto-init via AndroidX Startup)
tools-androidCore Gradle Tooling API integration
workspace-kotlinworkspace.json converter for Kotlin Language Server

CLI Reference

dta-cli --help
dta-cli <command> --help

License

Apache License 2.0 — see LICENSE.txt

Server Config

{
  "mcpServers": {
    "dta-cli": {
      "command": "dta-cli",
      "args": [
        "mcp"
      ]
    },
    "dta-android-studio-http": {
      "type": "http",
      "url": "http://localhost:12321/mcp"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
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"
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
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.
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.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Tavily Mcp
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。