lazy-mobile-mcp
Provides tools for automating Android devices via ADB, including screenshot, tap, swipe, input text, launch/stop apps, and performance telemetry.
Provides tools for automating iOS simulators and devices via Xcode tools and WebDriverAgent, including screenshot, tap, swipe, input text, launch/stop apps, and performance telemetry.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
lazy-mobile-mcp
Local Model Context Protocol (MCP) server for Android and iOS mobile automation with performance telemetry.
Control real devices and simulators using screenshot, tap, swipe, input_text, launch_app, dump_ui, press_key, open_url, and collect honest performance samples (cpu, memory) with session history in SQLite. Works with Codex, Claude Code, and other MCP clients over stdio.
Keywords: MCP server, mobile automation, Android ADB, iOS simulator, WebDriverAgent, devicectl, simctl, app performance telemetry.
Why This Project
Build a local MCP bridge for AI clients over
stdio.Automate Android via ADB and iOS via
simctl/devicectl/ WDA.Keep operations traceable with
trace_idin responses and logs.Persist sessions, samples, artifacts, and audit events in SQLite for reproducibility.
Related MCP server: mobile-mcp
Features
stdioMCP transport for local AI tooling.Single active device model (
select_device) with optional per-calldevice_id.Android adapter via ADB CLI (async process execution).
iOS adapter via Xcode tools with macOS guard and graceful degradation.
WDA endpoint auto-discovery (TTL-cached) for iOS interactive actions.
UI dump, key press, URL/deep-link, and foreground app helpers for agent workflows.
Risk-tiered approval policy for interactive actions.
JSON logging and unified error contract.
SQLite persistence for
sessions,perf_samples,artifacts,audit_logs(long-lived connection + indexes).
Tool Index
mobile.list_devicesmobile.select_devicemobile.get_capabilitiesmobile.screenshotmobile.tapmobile.swipemobile.input_textmobile.launch_appmobile.stop_appmobile.dump_uimobile.press_keymobile.open_urlmobile.get_foreground_appmobile.start_perf_sessionmobile.stop_perf_sessionmobile.get_perf_samplesmobile.list_sessions
Architecture
TypeScript MCP server + in-process async worker (tool contracts, validation, policy, trace ID)
Android adapter (
adb)iOS adapter (
simctl,devicectl, WDA viafetch)SQLite storage (
artifacts/mobile.dbby default; screenshots underARTIFACTS_DIR)
Prerequisites
Node.js 20+
Android:
adbinPATHiOS (optional): macOS +
xcrun(simctl/devicectl)For iOS interactive actions (
tap/swipe/input): reachable WebDriverAgent endpoint
Install
npm installInstall From npm
npm install lazy_mobile_mcpQuick Start (Codex)
Requires codex CLI in PATH.
Published package:
npx -y lazy_mobile_mcp@latest setup-codexVerify registration:
codex mcp get lazy-mobile-mcpThen open a new Codex session and call mobile.list_devices.
Current local checkout:
node bin/lazy-mobile-mcp.js setup-codex --local --name lazy-mobile-mcp-localCodex One-Command Setup (Advanced)
Optional overrides:
npx -y lazy_mobile_mcp@latest setup-codex \
--name lazy-mobile-mcp \
--sqlite-path "$HOME/.codex/mcp-data/lazy-mobile/mobile.db" \
--adb-bin adb \
--wda-base-url http://127.0.0.1:8100 \
--device-allowlist emulator-5554 \
--approval-policy highLocal checkout with the same overrides:
node bin/lazy-mobile-mcp.js setup-codex \
--local \
--name lazy-mobile-mcp-local \
--sqlite-path "$HOME/.codex/mcp-data/lazy-mobile/mobile.db" \
--adb-bin adbRun with npx:
npx -y lazy_mobile_mcp@latestGlobal install:
npm install -g lazy_mobile_mcp
lazy-mobile-mcpRun
Development:
npm run devProduction:
npm run build
npm startConfiguration
SQLITE_PATH(defaultartifacts/mobile.db)ARTIFACTS_DIR(default: parent directory ofSQLITE_PATH; screenshots live inscreenshots/)DEVICE_ALLOWLIST(comma-separated)MOBILE_APPROVAL_POLICY(off|high|medium, defaultoff)LOG_LEVEL(debug|info|warn|error)ADB_BIN(defaultadb)WDA_BASE_URL(optional override for iOS WDA endpoint)DEVICE_LIST_TTL_MS(default10000)WORKER_TIMEOUT_MS(default30000)
If WDA_BASE_URL is not set, the adapter probes common local endpoints (127.0.0.1 / localhost, ports 8100/8101/8200/8201 + local listening ports) and caches discoveries briefly.
Security Model
lazy-mobile-mcp is a local-first MCP server. It runs over stdio with the permissions of the local OS user that starts it; it is not a hardened OS or container sandbox.
Current runtime controls:
DEVICE_ALLOWLISTcan restrict operations to known device IDs.All tool inputs are schema-validated before adapter execution.
Tool attempts are recorded in SQLite
audit_logswithtrace_id, tool name, risk level, device ID, and result code.MOBILE_APPROVAL_POLICY=highrequiresconfirm=trueand a non-emptyreasonfor high-risk tools (tap,swipe,input_text,launch_app,stop_app,press_key,open_url).MOBILE_APPROVAL_POLICY=mediumalso requires confirmation for medium-risk tools (screenshot,dump_ui,start_perf_session).
The confirm / reason fields are caller confirmation fields. They do not prove a human approved the action unless the MCP host or caller enforces a human-in-the-loop approval flow.
iOS Capability Notes
Simulator: screenshot + launch/stop + open URL + WDA interactive actions (tap/swipe/input/dump_ui/press_key).
Physical device: launch/stop via
devicectl; screenshot and interactive actions via WDA.Continuous iOS cpu/memory sampling is not claimed; use one-shot
launch_msfromlaunch_appwall-clock timing only.Non-macOS host: iOS tools return
ERR_IOS_UNAVAILABLE_ON_HOST.
Testing
npm testRecommended local MCP smoke:
node dist/cli.js --help
node dist/cli.js setup-codex --helpRelated
lazy-desktop-mcp — desktop computer-use MCP
lazy-media-mcp — image/video prep for AI vision
session-collab-mcp — multi-session collaboration MCP
License
MIT © leaf76
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
remote debug iOS/Android/Unity/Godot/Flutter/RN/Web on real-device.ui-tree/screenshots/taps,tests.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Related MCP Servers
- AlicenseBqualityBmaintenanceA minimal, secure MCP server for AI-assisted mobile development, enabling build, install, interact, and inspect Android/iOS apps.53381 npm14Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for cross-platform mobile automation (iOS/Android) using accessibility trees and screenshots, enabling agents to interact with apps on simulators, emulators, and physical devices.7Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for mobile device testing with iOS simulators, Android emulators, and USB devices, managing Maestro flows, device diagnostics, screenshots, logs, and React Native/Expo development plumbing.13 npmMIT
- AlicenseNot gradedqualityCmaintenanceLocal MCP server for Android emulator control, exposing tools to get emulator status, inspect UI tree, capture screenshots, and open App settings via Appium and ADB.ISC