📱 Appium MCP (Mobile Automation)
Priority: P1 (HIGH)
[!IMPORTANT]
Tier 0 (Infrastructure): Session creation, device farm connectivity, basic OS interactions.
Tier 1 (Core Gestures): Taps, swipes, text input for native mobile elements.
Tier 2 (Flutter/Single-Canvas): Visual-first automation via screenshot + coordinate taps.
🔌 Activation
Triggers: appium, appium-mcp, appium doctor, mobile verify, android verify, ios verify, lambdatest, real device cloud, flutter widget tap.
🪜 Driver Ladder
sh scripts/preflight.sh — prints MODE: local | local,remote | remote | none; exit 0 usable, 2 not.
- Local:
select_device (Android) or prepare_ios_simulator (iOS), embedded drivers. Needs Node 22+, JDK 8+ / Xcode.
- Cloud:
remoteServerUrl (LambdaTest/BrowserStack). URL must match REMOTE_SERVER_URL_ALLOW_REGEX.
- Neither: ask for exported screenshots or cloud video link; label
human-provided.
- Nothing exported: return
BLOCKED (driver: appium), continue other lanes.
NO_UI=true default; AI_VISION_ENABLED=true only for Flutter/canvas. Local single-user or trusted CI only. generate_locators / appium_generate_tests feed test-loop step 4. Full table: driver-ladder.
🛠 Core Workflow (Goal-Oriented)
| Step |
Tool |
Purpose |
| 0 |
select_device / prepare_ios_simulator |
Pick target per ladder rung; cloud skips this. |
| 1 |
appium_session_management (create) |
Open session with explicit reset semantics (fullReset for clean install; noReset only for migration/resumed sessions). noReset re-attaching an installed package installs nothing — run the in-place install and verify the installed build before creating the session. |
| 2 |
appium_get_window_size |
Scale coordinates for high-density displays. |
| 3 |
appium_screenshot |
Capture visual state for Semantic Reasoning. |
| 4 |
appium_gesture / appium_set_value |
Interact. Self-Healing: Re-scan hierarchy if UUID stale. |
| 5 |
appium_session_management (delete) |
MANDATORY Cleanup. |
💡 AI-Driven Methodologies
- Semantic Intent: Find element in hierarchy (e.g., "Login button") instead of raw coordinates. Resilient to layout shifts.
- Dynamic Handling: Unexpected system alert? Dismiss if unrelated; NEVER dismiss or auto-grant the permission dialog under test.
- Visual Anchors: Find stable "Anchor" (e.g., Header) and derive coordinates relative to it.
🚫 Anti-Patterns (Zero-Tolerance)
- Hardcoded XPaths: Use
accessibility id or uiautomator. XPath flaky.
- Implicit Wait-Only: Never assume page loaded. Poll for "Source of Truth" element.
- Ignoring QoS: Audit CPU/Memory via
appium_mobile_performance_data. Prevent lag/crashes.
- Orphaned Sessions: Teardown mandatory. Call
delete in cleanup block.
- Silent Reset Flipping: Never switch from
fullReset to noReset to mask clean-install/upgrade failures.
- Interruption Suppression: Never auto-dismiss or bypass permission dialogs being tested.
- Mock Substitution: Never claim native device verification from browser emulation or component mocks.
📁 Evidence
.appium-mcp/<session>/: <AC|step>-<before|after>.png (nav shots at maxWidth budget, verdict full-res), <label>.source.xml from appium_get_page_source, perf.json, video.url. Walkthrough records driver: + evidence_dir:.
✅ Evaluation Criteria
- Cleanup Rate: 100% session closure.
- Visual Accuracy: Coordinate-based taps land within 5% of target center.
- Security: No secrets in tool arguments or logs.
🔗 References
- Visual Testing: common-mobile-visual-testing — Methodology for what to verify.
- Driver Ladder: driver-ladder — prerequisites per rung, server env, canonical tools.
- Setup: setup — install, MCP registration snippet, security, alternatives not adopted.
- LambdaTest Setup: lambdatest-cloud-setup — RDC configuration.
- Tool Cheatsheet: tool-cheatsheet — Fast copy-paste args.
- Project Context: project-context — Project-specific overlays/macros.
1---2name: quality-engineering-appium-mcp3description: Drives iOS/Android mobile devices via Appium MCP. Runs a preflight, picks local emulator/simulator/USB or a device cloud, captures screenshots/page source into a named evidence dir. Use for verifying mobile bugs, E2E tests, and navigating real device clouds (LambdaTest/BrowserStack).4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/quality-engineering-appium-mcp6 triggers:7 keywords:8 - appium9 - appium-mcp10 - appium doctor11 - android emulator12 - ios simulator13 - select_device14 - mobile verify15 - android verify16 - ios verify17 - lambdatest18 - real device cloud19 - flutter widget tap20---2122# 📱 Appium MCP (Mobile Automation)2324## **Priority: P1 (HIGH)**2526> [!IMPORTANT]27> **Tier 0 (Infrastructure)**: Session creation, device farm connectivity, basic OS interactions.28> **Tier 1 (Core Gestures)**: Taps, swipes, text input for native mobile elements.29> **Tier 2 (Flutter/Single-Canvas)**: Visual-first automation via screenshot + coordinate taps.3031## 🔌 Activation3233**Triggers**: `appium`, `appium-mcp`, `appium doctor`, `mobile verify`, `android verify`, `ios verify`, `lambdatest`, `real device cloud`, `flutter widget tap`.3435## 🪜 Driver Ladder36371. `sh scripts/preflight.sh` — prints `MODE: local | local,remote | remote | none`; exit 0 usable, 2 not.382. Local: `select_device` (Android) or `prepare_ios_simulator` (iOS), embedded drivers. Needs Node 22+, JDK 8+ / Xcode.393. Cloud: `remoteServerUrl` (LambdaTest/BrowserStack). URL must match `REMOTE_SERVER_URL_ALLOW_REGEX`.404. Neither: ask for exported screenshots or cloud video link; label `human-provided`.415. Nothing exported: return `BLOCKED (driver: appium)`, continue other lanes.4243`NO_UI=true` default; `AI_VISION_ENABLED=true` only for Flutter/canvas. Local single-user or trusted CI only. `generate_locators` / `appium_generate_tests` feed `test-loop` step 4. Full table: [driver-ladder](references/driver-ladder.md).4445## 🛠 Core Workflow (Goal-Oriented)4647| Step | Tool | Purpose |48| :--- | :--- | :--- |49| 0 | `select_device` / `prepare_ios_simulator` | Pick target per ladder rung; cloud skips this. |50| 1 | `appium_session_management` (`create`) | Open session with explicit reset semantics (`fullReset` for clean install; `noReset` only for migration/resumed sessions). `noReset` re-attaching an installed package installs nothing — run the in-place install and verify the installed build before creating the session. |51| 2 | `appium_get_window_size` | Scale coordinates for high-density displays. |52| 3 | `appium_screenshot` | Capture visual state for **Semantic Reasoning**. |53| 4 | `appium_gesture` / `appium_set_value` | Interact. **Self-Healing**: Re-scan hierarchy if UUID stale. |54| 5 | `appium_session_management` (`delete`) | **MANDATORY Cleanup**. |5556## 💡 AI-Driven Methodologies57- **Semantic Intent**: Find element in hierarchy (e.g., "Login button") instead of raw coordinates. Resilient to layout shifts.58- **Dynamic Handling**: Unexpected system alert? Dismiss if unrelated; NEVER dismiss or auto-grant the permission dialog under test.59- **Visual Anchors**: Find stable "Anchor" (e.g., Header) and derive coordinates relative to it.6061## 🚫 Anti-Patterns (Zero-Tolerance)6263- **Hardcoded XPaths**: Use `accessibility id` or `uiautomator`. XPath flaky.64- **Implicit Wait-Only**: Never assume page loaded. Poll for "Source of Truth" element.65- **Ignoring QoS**: Audit CPU/Memory via `appium_mobile_performance_data`. Prevent lag/crashes.66- **Orphaned Sessions**: Teardown mandatory. Call `delete` in cleanup block.67- **Silent Reset Flipping**: Never switch from `fullReset` to `noReset` to mask clean-install/upgrade failures.68- **Interruption Suppression**: Never auto-dismiss or bypass permission dialogs being tested.69- **Mock Substitution**: Never claim native device verification from browser emulation or component mocks.70## 📁 Evidence7172`.appium-mcp/<session>/`: `<AC|step>-<before|after>.png` (nav shots at `maxWidth` budget, verdict full-res), `<label>.source.xml` from `appium_get_page_source`, `perf.json`, `video.url`. Walkthrough records `driver:` + `evidence_dir:`.7374## ✅ Evaluation Criteria7576- **Cleanup Rate**: 100% session closure.77- **Visual Accuracy**: Coordinate-based taps land within 5% of target center.78- **Security**: No secrets in tool arguments or logs.7980## 🔗 References8182- **Visual Testing**: [common-mobile-visual-testing](../../common/common-mobile-visual-testing/SKILL.md) — Methodology for what to verify.83- **Driver Ladder**: [driver-ladder](references/driver-ladder.md) — prerequisites per rung, server env, canonical tools.84- **Setup**: [setup](references/setup.md) — install, MCP registration snippet, security, alternatives not adopted.85- **LambdaTest Setup**: [lambdatest-cloud-setup](references/lambdatest-cloud-setup.md) — RDC configuration.86- **Tool Cheatsheet**: [tool-cheatsheet](references/tool-cheatsheet.md) — Fast copy-paste args.87- **Project Context**: [project-context](references/project-context.md) — Project-specific overlays/macros.