Phone Mcp logo

Phone Mcp

Community
kengerlwl
phone-mcp

Android phone automation via CLI. Use when the user needs to control their Android phone, including tapping buttons, typing text, launching apps, taking screenshots, swiping, or any phone operation task. Trigger words: 操作手机、控制手机、手机截图、打开App、发消息、phone、android、手机自动化。

Overview

Publisherkengerlwl
RepositoryphoneMcp
Skill namephone-mcp
Stars
100
Forks
9
Bundled files
22
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 22 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by kengerlwl on GitHub. Read the source before you install it.

Installation

Install the Phone Mcp AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kengerlwl/phoneMcp/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kengerlwl/phoneMcp.git \
  .claude/skills/phone-mcp
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Phone Mcp in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Phone Mcp on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Phone Mcp is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Android Phone Automation with PhoneMCP

Control Android devices via ADB through a single CLI executable. No MCP server needed.

Prerequisites: Android device connected via USB or WiFi with USB debugging enabled.

Binary Path

The phone-mcp binary is in the same directory as this SKILL.md file. Determine the absolute path of this SKILL.md's parent directory and use it as the binary path. For example, if this file is at ~/.catpaw/skills/phone-mcp/SKILL.md, then the binary is ~/.catpaw/skills/phone-mcp/phone-mcp.

On Windows, the binary is phone-mcp.exe in the same directory.

Step 0: Always Check Device First

Before any phone operation, verify a device is connected:

bash
<BIN> run '{"action":"list_devices"}'

If "count": 0, tell the user to connect their Android phone via USB and enable USB debugging. Do not proceed without a connected device.

Core Workflow

Every phone automation follows this loop:

  1. Observe: get_ui_elements to see what's on screen (structured text data)
  2. Act: tap_element, type_text, swipe, etc.
  3. Re-observe: After any action that changes the screen, call get_ui_elements again
bash
# 1. Observe — see what's on screen
<BIN> run '{"action":"get_ui_elements"}'
# Output: list of elements with index, text, bounds, clickable status

# 2. Act — tap an element by its text
<BIN> run '{"action":"tap_element","text":"微信"}'

# 3. Re-observe — screen changed, get fresh elements
<BIN> run '{"action":"get_ui_elements"}'

When to use screenshot vs get_ui_elements

SituationUse
Need to decide what to tap/interact withget_ui_elements (structured, reliable)
Need to see the visual layout / verify resultscreenshot (returns image file path)
get_ui_elements returns very few elementsscreenshot + get_ui_elements with "mode":"ocr"
User asks "show me the screen"screenshot

Prefer get_ui_elements for decision-making. Use screenshot for visual verification or when you need spatial context.

Batch Execution

Pass a JSON array for sequential commands. Stops on first failure.

bash
<BIN> run '[{"action":"launch_app","name":"微信"},{"action":"wait","seconds":2},{"action":"get_ui_elements"}]'

Batch when you don't need intermediate output: launch_app + wait, tap + wait, type_text + key. Don't batch get_ui_elements or screenshot — you need their output to decide the next step.

Command Reference

Device Management

bash
<BIN> run '{"action":"list_devices"}'
<BIN> run '{"action":"connect","address":"192.168.1.100:5555"}'
<BIN> run '{"action":"disconnect"}'

Observe Screen

bash
# Structured element list (preferred for interaction)
<BIN> run '{"action":"get_ui_elements"}'
<BIN> run '{"action":"get_ui_elements","clickable_only":true}'
<BIN> run '{"action":"get_ui_elements","mode":"ocr"}'     # For WebView/games/Flutter

# Visual screenshot (saved to file, returns path)
<BIN> run '{"action":"screenshot"}'
<BIN> run '{"action":"screenshot","path":"/tmp/my-screenshot.jpg"}'

Interact with Elements (⭐ Preferred)

bash
<BIN> run '{"action":"tap_element","index":5}'              # By index from get_ui_elements
<BIN> run '{"action":"tap_element","text":"发送"}'           # By visible text (fuzzy match)
<BIN> run '{"action":"tap_element","resource_id":"send_btn"}' # By resource ID

Coordinate-Based Actions

bash
<BIN> run '{"action":"tap","x":540,"y":1200}'
<BIN> run '{"action":"double_tap","x":540,"y":1200}'
<BIN> run '{"action":"swipe","start_x":540,"start_y":1800,"end_x":540,"end_y":600}'  # Scroll down
<BIN> run '{"action":"swipe","start_x":540,"start_y":600,"end_x":540,"end_y":1800}'  # Scroll up

Text Input

bash
<BIN> run '{"action":"type_text","text":"Hello 你好"}'            # Type (clears input first by default)
<BIN> run '{"action":"type_text","text":"追加文本","clear_first":false}'  # Append without clearing
<BIN> run '{"action":"clear_text"}'

System Keys

bash
<BIN> run '{"action":"back"}'
<BIN> run '{"action":"home"}'
<BIN> run '{"action":"key","key":"enter"}'
<BIN> run '{"action":"key","key":"volume_up"}'

Key names: enter, delete, tab, space, volume_up, volume_down, power, camera, media_play_pause, media_next, media_previous, dpad_up, dpad_down, dpad_left, dpad_right.

App Control

bash
<BIN> run '{"action":"launch_app","name":"微信"}'            # By common name
<BIN> run '{"action":"launch_app","package":"com.tencent.mm"}'  # By package name
<BIN> run '{"action":"current_app"}'
<BIN> run '{"action":"search_apps","keyword":"tencent"}'     # Find package names

Wait

bash
<BIN> run '{"action":"wait","seconds":2}'

UI Element Detection Modes

ModeBest For
"xml" (default)Native Android apps — fast and structured
"ocr"WebView, games, Flutter, or when xml returns too few elements
"auto"Auto: tries xml first, falls back to ocr

Multi-Device

All commands accept optional "device_id" parameter:

bash
<BIN> run '{"action":"list_devices"}'
# → {"devices":[{"device_id":"R5CR1234","model":"SM-S9080"},...]}

<BIN> run '{"action":"screenshot","device_id":"R5CR1234"}'

Error Handling

All responses are JSON with "status": "success" or "status": "error".

ErrorSolution
Element not foundRun get_ui_elements to refresh, verify text/index
No devicesCheck USB, run list_devices
Few elements detectedSwitch to "mode":"ocr"
Screenshot failedDevice may be on secure screen, retry

Key Rules

  1. Always get_ui_elements before interacting — never guess coordinates or element names.
  2. Always re-observe after screen changes — tap, swipe, navigation all invalidate previous elements.
  3. Prefer tap_element over tap — text/index-based tapping is more reliable than coordinates.
  4. Add wait after launching apps — apps need 1-3 seconds to load.
  5. Don't hardcode UI flows — different phones have different UI. Always read get_ui_elements output and adapt.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Phone Mcp AI skill do?

Android phone automation via CLI. Use when the user needs to control their Android phone, including tapping buttons, typing text, launching apps, taking screenshots, swiping, or any phone operation task. Trigger words: 操作手机、控制手机、手机截图、打开App、发消息、phone、android、手机自动化。

Why use Phone Mcp on TypingMind?

Because you install it once and use it with any model. Phone Mcp is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Phone Mcp in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kengerlwl/phoneMcp/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Phone Mcp?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Phone Mcp?

As many as you like. As long as a model supports skills, you can use Phone Mcp with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Phone Mcp AI skill free?

It is published on GitHub by kengerlwl. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇