phone-eye
Provides tools for AI agents to view and operate a real Android phone via ADB, including taking screenshots, answering visual questions about the screen, tapping, swiping, and typing text.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@phone-eyeWhat's on screen, and tap the login button?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Phone-Eye ๐ฑ๐๏ธ
English | ็ฎไฝไธญๆ
Your AI agent can finally see and operate a real Android phone.
phone_look("what's on screen, where is the login button?")
โ "Login button at (540, 1830) โ a green 'Sign in' โฆ"
phone_tap(540, 1830)
phone_look("did the next page load?")Works with any MCP client โ Claude Code, Codex, Cursor, dsh, and friends.
What you need (plain words)
You provide | One-time or every time? | How hard? |
An Android phone with USB debugging on | one-time, ~60 seconds (tap "Build number" 7ร โ enable USB debugging) | easy, step-by-step below |
Plug the USB cable once | one-time โ after that the tool switches the phone to Wi-Fi and you never need the cable again (unless the phone factory-resets) | trivial |
A computer with Python 3.10+ and git (or just Docker โ see step 3) | โ | n/a |
A vision model | one-time setup โ bring any one of these:โข an OpenAI API key (or any OpenAI-compatible: GLM, DeepSeek, local llama.cpp/Ollamaโฆ)โข an existing MCP vision server | one env var, most people already have a key |
That's everything. No app to install on the phone. No root. No extra server.
Related MCP server: scrcpy-mcp
What it can and can't do (honest table)
โ Stable | โ ๏ธ Works but with caveats | โ Not possible (any tool, not just us) |
See the screen (screenshot + read it) | Locked screens can be read but not operated | Fully control a brand-new phone before you enable USB debugging yourself |
Tap / swipe / type | Typing is ASCII (Chinese input needs a clipboard trick โ known adb limit) | The very first "allow USB debugging?" popup on a new computer key โ that one tap is yours |
Survive Wi-Fi adb drops (auto-reconnect) | Some vendor ROMs restrict input on lock screens (e.g. MIUI) | iOS โ different universe |
Run 24/7 unattended; unexpected popups get read & handled by your agent | Vision quality depends on the model you bring | |
Multiple phones (one phone-eye process per phone, set |
The 60-second rule: every Android requires one human moment โ enable debugging + authorize once. After that, the phone belongs to your agent, even over Wi-Fi, even after reboots of the computer.
Setup (3 steps)
1. Enable USB debugging (once per phone)
Settings โ About phone โ tap Build number 7ร (unlocks Developer options) โ Developer options โ USB debugging ON. (Got stuck? Tell us your phone model in Discussions โ we'll walk you through it. MIUI/HyperOS may also ask you to sign into a Xiaomi account first.)
2. Install adb (if you don't have it), plug USB once, then go wireless
# macOS: brew install android-platform-tools ยท Ubuntu/Debian: sudo apt install adb
# Windows: scoop install adb (or download Android platform-tools)
adb devices # phone shows up? tap "Allow" on its popup โ check "always allow"
adb shell ip route # โ note the phone's Wi-Fi IP (e.g. 192.168.1.23) while still plugged
adb tcpip 5555 # switch to Wi-Fi mode (adb restarts; the USB entry disappears โ normal)
adb connect 192.168.1.23:5555 # use the IP from above; then unplug the cable, foreverSettings โ Wi-Fi โ your network โ details shows the IP; or adb shell ip addr show wlan0 | grep inet.
3. Start phone-eye
git clone https://github.com/boheastill/phone-eye && cd phone-eye
pip install -r requirements.txt
# your eyes โ pick ONE:
export PHONE_EYE_VISION_API_KEY=<key> # OpenAI / GLM / any compatible
# (optional: PHONE_EYE_VISION_BASE_URL, PHONE_EYE_VISION_MODEL)
# local & offline: ..._API_KEY=sk-noauth ..._BASE_URL=http://<host>:8080/v1 ..._MODEL=<your qwen-vl>
python server.py # stdio MCP server โ wire into your client:Wire it into your client โ pick yours:
# Claude Code (easiest):
claude mcp add phone-eye -- python /path/to/phone-eye/server.py
# Codex:
codex mcp add phone-eye --url stdio://python /path/to/phone-eye/server.py # or see codex docs// any MCP client (generic stdio shape):
{ "mcpServers": { "phone-eye": { "command": "python", "args": ["/path/to/phone-eye/server.py"] } } }Docker (optional โ no Python needed on the host)
The repo ships a Dockerfile (Python 3.12 + adb):
podman build -t phone-eye . # or: docker build -t phone-eye .
# smoke: a JSON-RPC initialize reply on stdout means it boots:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}\n' \
| podman run --rm -i phone-eyeUse --network host so adb reaches a Wi-Fi phone and your vision endpoint:
"phone-eye": { "command": "podman", "args": ["run","--rm","-i","--network","host",
"-e","ANDROID_SERIAL=192.168.1.23:5555","-e","PHONE_EYE_VISION_API_KEY=<key>","phone-eye"] }Recommended vision models (any vision-capable chat model works): gpt-4o-mini (default),
GLM glm-4.6v-flash (cheap), or run a local Qwen-VL via llama.cpp for fully-offline โ
screenshots then never leave your LAN.
What happens when something breaks
"No Android device reachable" โ the tool already tried reconnecting; run
adb connect <ip>:5555, or replug USB."No vision server reachable" โ you haven't set a key; the error message tells you the exact two fixes.
Phone rebooted โ Wi-Fi adb survives phone reboots on most ROMs; if not, one
adb connectagain.Still stuck? Open a discussion โ we answer, and we'll debug your setup with you. Bug reports and "it works on my X" notes are equally welcome.
Tools
Tool | What it does |
| Ask a vision model about the live screen; fuses a UI-tree dump for exact text/button bounds |
| Tap |
| Swipe |
| Type ASCII text |
| Press a hardware key โ |
| Open any screen by Android intent (deep settings pages, app pages) without coordinates |
| Save screenshot to disk, return path |
Examples
Mobile web QA loop โ the agent verifies its own work on a real screen
Surviving an OEM setup wizard โ vision handles whatever pops up
Unattended sentinel โ your agent on night watch: wake โ unlock โ intent โ look โ screenshot
Curious how it works โ or want to modify it? Read the whitepaper (architecture, failure-classification decision tree, security model, how to add a verb). Running it as an always-on HTTP service behind your own fleet? docs/fleet.md.
Why "see", isn't this just adb?
UI-tree-only tools are blind to game canvases, images, and anything the accessibility tree can't show. Vision-only tools drift on coordinates. phone_look fuses both: the model answers what is this, the UI tree supplies exactly where. The day we dogfooded it, it discovered a USB-debugging popup on its own screen, read the buttons, and tapped "Allow" by itself โ the story.
License
MIT. Verified on Redmi K40 Gaming / Android 13 โ add your device to the table via PR.
Author: Bohea โ independent industrial software engineer (Shenzhen). Operator HMIs ยท device integration ยท machine data into your customer's ERP. More runnable demos & engineering notes on the site.
This server cannot be deployed
Maintenance
Related MCP Connectors
Control real Android and iOS devices with LLM agents โ tap, swipe, type, automate flows.
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.
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.
Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables full Android control from any AI agent via 7 MCP tools, including screen capture, touch interaction, app management, and system control.MIT
- AlicenseAqualityAmaintenanceMCP server that gives AI agents full vision and control over Android devices via ADB and scrcpy. Supports screenshots, input, apps, UI automation, shell, files, and clipboard.38302 npm96MIT
- AlicenseBqualityDmaintenanceAn MCP server that allows AI agents to drive real Android devices via adb, capturing screenshots, reading the live UI tree, and performing actions like tap, swipe, and type.139 npm1Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for Android device control via ADB and scrcpy, enabling AI agents to see and interact with Android devices.46302 npmMIT