mobile-device-mcp

by saranshbamania

Not rated
GitHub

About

MCP server for AI-powered mobile device control — 26 tools for screenshots, UI inspection, touch interaction, and AI visual analysis. Supports Anthropic Claude & Google Gemini.

Details

Author
saranshbamania
Categories
Developer Tools, Other, AI

Setup

Install mobile-device-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/saranshbamania/mobile-device-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

MCP server that gives AI coding assistants (Claude Code, Cursor, Windsurf) the ability tosee and interact with mobile devices. 49 tools for screenshots, UI inspection, touch interaction, AI-powered visual analysis, Flutter widget tree inspection, video recording, and test generation.

AI assistants can read your code but can't see your phone. This fixes that.

Web developers have browser DevTools, Playwright, and Puppeteer -- AI assistants can click around, take screenshots, and verify fixes. Mobile developers? They're stuck manually screenshotting, copying logs, and describing what's on screen. They'rehuman middlewarebetween the AI and the device.

Developer: "The login button doesn't work" Without this tool: With this tool: 1. Manually screenshot 1. AI calls take_screenshot -> sees the screen 2. Paste into AI chat 2. AI calls smart_tap("login button") -> taps it 3. AI guesses what's wrong 3. AI calls verify_screen("error message shown") -> sees result 4. Apply fix, rebuild 4. AI calls visual_diff -> confirms fix worked 5. Repeat 4-5 times 5. Done.

No global install needed. Runs directly via npx.

- Node.js 18+
- Android device/emulator connected via ADB
- ADB installed (Android SDK Platform Tools)
-

Get a Google AI key(free tier available):aistudio.google.com/apikey

{ "mcpServers": { "mobile-device": { "type": "stdio", "command": "npx", "args": ["-y", "mobile-device-mcp"], "env": { "GOOGLE_API_KEY": "your-google-api-key" } } } }
{ "mcpServers": { "mobile-device": { "type": "stdio", "command": "cmd", "args": ["/c", "npx", "-y", "mobile-device-mcp"], "env": { "GOOGLE_API_KEY": "your-google-api-key" } } } }

With Pro license key(afterpurchasing Pro):

{ "mcpServers": { "mobile-device": { "type": "stdio", "command": "npx", "args": ["-y", "mobile-device-mcp"], "env": { "GOOGLE_API_KEY": "your-google-api-key", "MOBILE_MCP_LICENSE_KEY": "MDMCP-XXXXX-XXXXX-XXXXX-XXXXX" } } } }
{ "mcpServers": { "mobile-device": { "type": "stdio", "command": "cmd", "args": ["/c", "npx", "-y", "mobile-device-mcp"], "env": { "GOOGLE_API_KEY": "your-google-api-key", "MOBILE_MCP_LICENSE_KEY": "MDMCP-XXXXX-XXXXX-XXXXX-XXXXX" } } } }

- Open your AI coding assistantfrom that directory. That's it.

The server starts and stops automatically -- you never run it manually. Your AI assistant manages it as a background process via the MCP protocol.

Claude Code:type/mcp-- you should seemobile-device: Connected

You: "Open my app, tap the login button, type test@email.com in the email field" AI: [takes screenshot -> sees the screen -> smart_tap("login button") -> smart_type("email field", "test@email.com")] You: "Find all the bugs on this screen" AI: [analyze_screen -> inspects layout, checks for overflow, missing labels, broken states] You: "Navigate to settings and verify dark mode works" AI: [smart_tap("settings") -> take_screenshot -> smart_tap("dark mode toggle") -> visual_diff -> reports result]

No test scripts. No manual screenshots. Just describe what you want in plain English.

All use the same JSON config -- just put it in the right file for your editor.

Copy.mcp.jsoninto any mobile project -- Flutter, React Native, Kotlin, Swift -- and your AI assistant gets device superpowers in that directory. No global install needed.

Free (14 tools) -- no license key needed

Get Pro License-- unlock all 49 tools. After payment, you'll receive your license key via email within 1 hour. Add it to your.mcp.json:

{ "mcpServers": { "mobile-device": { "type": "stdio", "command": "npx", "args": ["-y", "mobile-device-mcp"], "env": { "GOOGLE_API_KEY": "your-google-api-key", "MOBILE_MCP_LICENSE_KEY": "your-license-key" } } } }

Use AI vision (Claude or Gemini) to understand what's on screen.

Connect to running Flutter apps via Dart VM Service Protocol. Maps every widget to its source code location (file:line).

macOS only. Control iOS simulators viaxcrun simctl.

The server is optimized to minimize latency and AI token costs:

- 4-tier element search: companion app (instant) -> local text match (<1ms) -> cached AI -> fresh AI.smart_tapis35x fasterthan naive AI calls (205ms vs 7.6s).
- Companion app: AccessibilityService-based Android app provides UI tree in 105ms (23x faster than UIAutomator's 2448ms). Auto-installs on first use.
- Screenshot compression: AI tools auto-compress to JPEG q=60, 400w --89% smaller(251KB -> 28KB) with zero AI quality loss.
- Parallel capture: Screenshot + UI tree fetched simultaneously viaPromise.all().
- TTL caching: 5-second cache avoids redundant ADB calls for rapid-fire tool usage.

src/ |-- index.ts # CLI entry point (auto-discovery, env config) |-- server.ts # MCP server factory |-- license.ts # License validation and tier gating |-- types.ts # Shared interfaces |-- drivers/android/ # ADB driver (DeviceDriver implementation) | |-- adb.ts # Low-level ADB command wrapper | |-- companion-client.ts # TCP client for companion app | +-- index.ts # AndroidDriver class (4-strategy UI element retrieval) |-- drivers/flutter/ # Dart VM Service driver | |-- index.ts # FlutterDriver (discovery, inspection, source mapping, hot reload) | +-- vm-service.ts # JSON-RPC 2.0 WebSocket client (DDS redirect handling) |-- drivers/ios/ # iOS Simulator driver (macOS only) | |-- index.ts # IOSSimulatorDriver via xcrun simctl | +-- simctl.ts # Low-level simctl command wrapper |-- tools/ # MCP tool registrations (free + pro gating) | |-- device-tools.ts # Device management | |-- screen-tools.ts # Screenshots & UI inspection | |-- interaction-tools.ts # Touch, type, keys | |-- app-tools.ts # App management | |-- log-tools.ts # Logcat | |-- ai-tools.ts # AI-powered tools | |-- flutter-tools.ts # Flutter widget inspection | |-- ios-tools.ts # iOS simulator tools | |-- video-tools.ts # Screen recording | +-- recording-tools.ts # Test generation |-- recording/ # Test script generation | |-- recorder.ts # ActionRecorder (records MCP tool calls) | +-- generator.ts # TestGenerator (TypeScript/Python/JSON output) |-- ai/ # AI visual analysis engine | |-- client.ts # Multi-provider client (Anthropic + Google) | |-- prompts.ts # System prompts & UI element summarizer | |-- analyzer.ts # ScreenAnalyzer orchestrator (caching, parallel capture) | +-- element-search.ts # Local element search (text/alias matching, no AI needed) +-- utils/ |-- discovery.ts # ADB auto-discovery +-- image.ts # PNG parsing, JPEG compression, bilinear resize companion-app/ # Android companion app (Kotlin) # AccessibilityService + TCP JSON-RPC for fast UI tree

- iOS physical device support
- Multi-device orchestration
- CI/CD integration
- Cloud device farm support

- Devices: Pixel 8 (Android 16), Samsung Galaxy series, Android emulators
- Apps: Telegram, Instagram, Spotify, WhatsApp, YouTube, Chrome, Settings, and Flutter apps
- AI Providers: Google Gemini 2.5 Flash, Anthropic Claude
- Platforms: Windows 11, macOS (iOS simulators)
- Connection: USB and wireless ADB

- Free for individuals and non-commercial use
- Commercial use requires a paid license
- Converts to Apache 2.0 on March 23, 2030

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Universal tool adapter — @tool decorator exports Python functions to OpenAI, Claude, Gemini, MCP, JSON Schema. Audit token costs.

Standing review layer for coding agents: Claude, GPT and Gemini debate each answer and return one recommendation plus the strongest dissent.

Lets your coding agent (such as Claude, Cursor, Copilot, Gemini or Codex) search package registries across multiple ecosystems (npm, PyPI, RubyGems, Crates.io, Packagist, Hex) and fetch package context (README, downloads, GitHub info, usage snippets)

Secure audio transcription meets AI. Connect Alice recordings to Claude, ChatGPT, Gemini, and more.

Access GPT-5, Claude, Gemini and other models through a single MCP connection. Save development time and money on subscriptions.

Aivie helps users search CRM contacts, campaigns, reports, segments, themes, emails, and Instagram posts, then inspect details, manage segment membership and publication state, create and update private Aivie records, or prepare and publish Meta ad promotions through ChatGPT, Claude, Gemini, Copilot, etc..

One MCP server for Claude, ChatGPT & Gemini — wraps your ERPs, CRMs, APIs and knowledge base into a single governed endpoint.

Read-only bank access for your AI agent. Hosted MCP server giving Claude, ChatGPT, Cursor, Gemini, and Codex access to bank accounts, transactions, and investment holdings via Plaid. 12 tools. $5/mo per bank.

Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, and Hermes Agent — fewer tokens, fewer tool calls, 100% local

Competitive intelligence platform with 24 tools — monitor competitor pricing, content, positioning, tech stacks, and how ChatGPT, Claude, and Gemini rank your brand.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.