mobilemcp
Let AI agents use your real Android phone through its accessibility service: screen tree with stable refs, taps, typing, gestures, notifications, apps. MCP server + hub + app.
Install / Use
claude mcp add Magi-Labs -- npx -y github:Magi-Labs/mobilemcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of mobilemcp
mobilemcp scores 83/100 on our quality scale, 2212th of 2,894 Automation skills we index.
Its MCP Server is 21 KB long, well organised into 19 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 12 days ago, so mobilemcp is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
mobilemcp compared with similar skills
All 4 of these similar skills score higher than mobilemcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mobilemcp (this skill)by Magi-Labs | 83 | 3 | 12d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 101.9k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.7k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.6k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 89.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install mobilemcp?
- Run
claude mcp add Magi-Labs -- npx -y github:Magi-Labs/mobilemcp. The install tabs above show the steps for each supported agent. - Which AI agents does mobilemcp work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mobilemcp safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mobilemcp still maintained?
- The repository was last updated 12 days ago, so mobilemcp is actively maintained.
Skill content
View source on GitHubCompanion: LiveMCP does the same for Chrome; MobileMCP is its mobile sibling and shares the hub/bridge design.
MobileMCP is for people who want an agent (Claude Code, Cursor, any MCP client) to operate their own phone from anywhere: an Android accessibility service (the app) dials out to a hub (the server) over WebSocket; agents talk to the hub through MCP. No USB, no ADB, no rooting. The hub also serves a dashboard with connected devices, a live activity feed and a per-device live view.
Status: active, early (server 0.4.0, app 0.3.0). Verified on a Pixel 7 emulator (API 35) and a OnePlus phone (Android 15). No Play Store listing; the app is sideloaded. Execution-policy unit checks plus scripted verification against real devices.
agent (Claude Code, Codex, …) ──stdio──▶ mobilemcp ──IPC──▶ mobilemcp-hub ◀──WebSocket── MobileMCP app (phone)
──HTTP /mcp (hosted)──▶ ──HTTP / ──▶ dashboard
Why accessibility instead of ADB
| | Accessibility service (this) | ADB / UiAutomator | | --- | --- | --- | | Needs a tethered computer / wireless-debug pairing | No | Yes, re-pair after reboot | | Works over the internet / VPN | Yes (outbound WebSocket) | Only with port forwarding | | Sees the UI tree | Yes, with view ids and states | Yes | | Taps, typing, scrolling, gestures, back/home | Yes | Yes | | Screenshots | Yes (Android 11+) | Yes | | Shell, logcat, app install, arbitrary key codes | No | Yes | | Secure (FLAG_SECURE) screens, e.g. banking | Hidden | Hidden |
The accessibility route is what "use my phone like a normal user" means. ADB-level control could be added later as a second driver for emulators and development.
Tools (35)
| Group | Tools |
| --- | --- |
| Devices | list_devices, select_device, get_device_info (model, screen, battery, lock state, granted permissions, visible windows) |
| Observe | get_screen_snapshot (bounded tree with persistent @refs; rows collapse to one ~"title · subtitle" line; query, scope, paging, since deltas), take_screenshot (marks:true = Set-of-Mark image + @ref lines), read_text, wait_for_text |
| Act | tap (by visible text, @ref or coordinates; timeout waits for the text; long/double press), type_text (by field hint/label, @ref or focus), scroll, scroll_until (tap:true opens the match), swipe, drag (waypoints with pauses for cross-page drags), gesture (composable down/wait/move/up, multi-finger), pinch, press_key, set_clipboard |
| Apps | list_apps, open_app, open_url, uninstall_app, open_settings (30 Settings pages and quick panels), start_intent (any intent: dial, SMS, share, deep links) |
| Notifications | get_notifications, open_notification, notification_action (incl. direct reply), dismiss_notification — needs notification access |
| System | media_control, set_volume, set_brightness, set_rotation (need "Modify system settings"), set_dnd, set_flashlight, wake_screen |
| Batch | run_mobile_actions: 1-20 steps in one call, stops on the first error |
Every action returns a compact observation after the UI settles (or observe:false). A snapshot line looks like @4 button ~"Network & internet · Mobile, Wi‑Fi, hotspot" (540,472): roles imply clickability, rows carry their children's text and hide the duplicates, coordinates are centers. Refs are keyed by content identity (class, view id, text, occurrence) per package, so they survive scrolling, re-layout and app switches. Most flows need no snapshot at all: tap text="Send", type_text field="Message", scroll_until text="…" tap=true, chained in run_mobile_actions. See OPTIMIZATIONS.md for the reasoning and measurements.
Quick start
Published release
Download mobilemcp-0.3.0.apk, mobilemcp-0.3.0.tgz and SHA256SUMS from v0.3.0 into one directory.
shasum -a 256 -c SHA256SUMS # Linux: sha256sum -c SHA256SUMS
npm install --prefix ./mobilemcp-local ./mobilemcp-0.3.0.tgz
./mobilemcp-local/node_modules/.bin/mobilemcp-hub
Install the APK on the phone (adb install mobilemcp-0.3.0.apk or copy it over), then follow the app steps below and point your MCP client at ./mobilemcp-local/node_modules/mobilemcp/dist/index.js.
From source
Requires Node.js 18+ and Android 11+ on the phone.
npm ci
npm run build
npm run hub # keep this running: ws://127.0.0.1:17692
Build the app with Android Studio (open app/) or from the command line:
cd app && ./gradlew :app:assembleDebug # app/app/build/outputs/apk/debug/app-debug.apk
Install the APK on the phone, then in the app:
- Google Play Protect blocks accessibility apps installed from chat apps or browsers in some countries (India, Singapore, Thailand, Brazil, …) with no override. Install over adb (
adb install mobilemcp-0.3.0.apk) or pause Play Store → Play Protect → Scan apps while installing from the Files app, then re-enable it. - Enable accessibility service — Android 13+ first requires App info → ⋮ → Allow restricted settings for sideloaded apps (the app has an App info button).
- Enter the hub URL (
ws://<your-computer-ip>:17692on the same Wi‑Fi, or your hostedwss://origin) and a device name, then Connect. - Optionally Allow background so Doze does not throttle the connection; grant Notification access for the notification tools and DND, and Modify system settings for brightness/rotation.
Register the MCP server with your agent:
{
"mcpServers": {
"mobilemcp": {
"command": "node",
"args": ["/absolute/path/to/mobilemcp/server/dist/index.js"]
}
}
}
For Claude Code, plugin/ is a ready plugin: a self-contained server bundle (plugin/bin/mobilemcp.js, no npm needed) plus a skill describing the workflow. Add it with claude plugin add ./plugin or point your marketplace at the directory.
Emulator
adb install -r app/app/build/outputs/apk/debug/app-debug.apk
adb shell appops set labs.magi.mobilemcp ACCESS_RESTRICTED_SETTINGS allow
adb shell settings put secure enabled_accessibility_services labs.magi.mobilemcp/.MobileAccessibilityService
adb shell settings put secure accessibility_enabled 1
adb shell am start -n labs.magi.mobilemcp/.MainActivity --es hubUrl ws://10.0.2.2:17692 --es name Emulator --ez connect true
Debug builds accept settings through intent extras; release builds ignore them so no other app can repoint the hub.
How it works
The app's AccessibilityService owns the hub connection, reads the window tree, performs node actions and injected gestures and takes screenshots. The hub routes requests per account, serves MCP over HTTP, local sessions over IPC, and the dashboard. shared/src/protocol.ts is the single contract. Details, trust boundaries and failure modes: docs/ARCHITECTURE.md; decisions in docs/decisions.
Hosted hub
The hub also serves authenticated MCP over HTTP at /mcp and the phone endpoint at /device on one port, so the phone and remote agents can both reach it through a reverse proxy:
MOBILEMCP_HOST=0.0.0.0 MOBILEMCP_PUBLIC_URL=https://mobile.example.com MOBILEMCP_TOKEN=<32+ chars> npm run hub
- Phone: hub URL
wss://mobile.example.com, token =MOBILEMCP_TOKEN. - Agent:
{"type":"http","url":"https://mobile.example.com/mcp","headers":{"Authorization":"Bearer <token>"}}, or stdio withMOBILEMCP_TOKENset. MOBILEMCP_ACCOUNTS='[{"id":"me","agentToken":"…","deviceToken":"…"}]'isolates several users; devices and selections never cross accounts.
The reverse proxy provides TLS; the hub never binds a public address without a token. The dashboard at / shows devices, a live activity feed (names and timings only) and a per-device live view with click-to-tap; see HOSTING.md.
Agent workflow
- If you know the label, act on it directly:
tap text=,type_text field=,scroll_until text= tap=true; chain known steps in onerun_mobile_actions. - Otherwise
get_screen_snapshot(scoped/filtered) and act on@refs. Read theobservationevery action returns instead of re-snapshotting. wait_for_text/timeoutparameters for loading;take_screenshot marks=truefor visual content.- After
STALE_REFor an app change, snapshot again. Never repeat a submission after a timeout without inspecting state.
Screen content is untrusted data. The server instructions tell agents to enter credentials, OTPs or payments only when the task explicitly includes them.
Limitations and data handling
The hub forwards requests and responses without storing them; activity events hold device names, action names, durations and error codes. The app persists only its settings. Password fields are masked in snapshots. Screen content reaches whatever MCP client you connect, so connect clients you trust.
- Android 11+ (API 30) for accessibility screenshots and
ACTION_IME_ENTER. - Apps with
FLAG_SECURE(banking, DRM video) expose neither nodes nor pixels. - Custom-drawn views without accessibility nodes need
take_screenshotplus coordinate taps. A few system pages expose no tree at all (snapshots then reportnoTree: truewith the window title). - Launcher folder creation by
dragdepends on the launcher's drop rules; the defaults (900 ms hold, 300 ms move, 250 ms hover) merge icons on Launcher3/Pixel. Long hovers trigger reorder instead. Cross-page drags: add a waypoint at the screen edge withpauseMs≈ 800 per page flip (hold times above ~1.2 s flip twice on OxygenOS). - Phones can self-update from their hub:
GET /app.apk?token=<device token>(see HOSTING.md); a running MobileMCP can drive the download and installer itself. - No arbitrary key codes, shell or app installation; that is ADB territory.
- Google Play would require a declaration for this accessibility usage; the app is distributed as a sideloaded APK.
Development
Contributor setup and change workflow: CONTRIBUTING.md. Agent/maintainer instructions: AGENTS.md.
npm run typecheck && npm run build
STEPS='[["get_device_info"],["get_screen_snapshot",{"maxNodes":20}]]' node server/test/e2e.mjs # against a connected phone/emulator
Documentation
- HOSTING.md — Docker, reverse proxy, tokens, dashboard, self-update
- OPTIMIZATIONS.md — observation format, literature, measurements
- docs/ARCHITECTURE.md, docs/decisions, docs/THIRD_PARTY.md
- CHANGELOG.md, SECURITY.md
License
MIT © Deepak Silaych. Third-party notices in docs/THIRD_PARTY.md.
Background-only operation
The Android app has a Background only switch owned by the phone user. When enabled, it rejects screen automation before execution, including screen capture, batches, app launches, notification opens and actions (pending intents may launch an activity). Agents cannot change this switch remotely. Notification reads/dismissal, app lists, compact status and system controls remain available; those controls can still intentionally change volume, brightness, etc.
For older hosted hubs, get_device_info returns compact battery/lock status when Background only is enabled. With an updated hub, use get_background_status for battery/lock state without inspecting the foreground app, and get_execution_policy to discover the current mode. Read-only background requests use a separate serial queue so a UI w
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
101.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
77.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.6kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
89.6k🕷️ A Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
