$git clone https://github.com/appium/appium-mcpMCP Appium is an intelligent MCP (Model Context Protocol) server designed to empower AI assistants with a robust suite of tools for mobile automation. It streamlines mobile app testing by enabling natural language interactions, intelligent locator generation, and automated test c
| 1 | # MCP Appium - MCP server for Mobile Development and Automation | iOS, Android, Simulator, Emulator, and Real Devices |
| 2 | |
| 3 | [](https://npmjs.org/package/appium-mcp) |
| 4 | |
| 5 | [](https://opensource.org/licenses/Apache-2.0) |
| 6 | |
| 7 | MCP Appium is an intelligent MCP (Model Context Protocol) server designed to empower AI assistants with a robust suite of tools for mobile automation. It streamlines mobile app testing by enabling natural language interactions, intelligent locator generation, and automated test creation for both Android and iOS platforms. |
| 8 | |
| 9 | ## Table of Contents |
| 10 | |
| 11 | - [Features](#-features) |
| 12 | - [Prerequisites](#-prerequisites) |
| 13 | - [Installation](#️-installation) |
| 14 | - [Configuration](#️-configuration) |
| 15 | - [Available Tools](#-available-tools) |
| 16 | - [Plugin API](#-plugin-api) |
| 17 | - [Client Support](#-client-support) |
| 18 | - [Usage Examples](#-usage-examples) |
| 19 | - [Contributing](#-contributing) |
| 20 | - [License](#-license) |
| 21 | |
| 22 | ## 🚀 Features |
| 23 | |
| 24 | - **Cross-Platform Support**: Automate tests for both Android (UiAutomator2) and iOS (XCUITest). |
| 25 | - **AI-Powered Element Finding**: Locate UI elements using natural language descriptions powered by vision models - no need for complex XPath or selectors. |
| 26 | - **Intelligent Locator Generation**: AI-powered element identification using priority-based strategies. |
| 27 | - **Interactive Session Management**: Easily create and manage sessions on local mobile devices. |
| 28 | - **Smart Element Interactions**: Perform actions like clicks, text input, screenshots, and element finding. |
| 29 | - **Automated Test Generation**: Generate Java/TestNG test code from natural language descriptions. |
| 30 | - **Page Object Model Support**: Utilize built-in templates that follow industry best practices. |
| 31 | - **Flexible Configuration**: Customize capabilities and settings for different environments. |
| 32 | - **Multilingual Support**: Use your native language - AI handles all interactions naturally in any language (English, Spanish, Chinese, Japanese, Korean, etc.). |
| 33 | |
| 34 | ## 📋 Prerequisites |
| 35 | |
| 36 | Before you begin, ensure you have the following installed: |
| 37 | |
| 38 | ### System Requirements |
| 39 | |
| 40 | - **Node.js** (v22 or higher) |
| 41 | - **npm** or **yarn** |
| 42 | - **Java Development Kit (JDK)** (8 or higher) |
| 43 | - **Android SDK** (for Android testing) |
| 44 | - **Xcode** (for iOS testing on macOS) |
| 45 | |
| 46 | MCP Appium supports two driver modes: |
| 47 | |
| 48 | - **Embedded local drivers**: when `appium_session_management` creates an `android` or `ios` session without `remoteServerUrl`, MCP Appium uses the bundled `appium-uiautomator2-driver` or `appium-xcuitest-driver` dependency directly. You still need the platform toolchains below, but you do not need to install a global Appium server or run `appium driver install uiautomator2` / `appium driver install xcuitest` for this mode. |
| 49 | - **Remote WebDriver/Appium server**: when `remoteServerUrl` is provided to `action=create` or `action=attach`, MCP Appium uses the `webdriver` client to talk to that existing server. In this mode the remote server is responsible for its installed drivers, plugins, device access, and capability handling. Use this mode for `platform=general`; embedded local creation is available only for Android and iOS. |
| 50 | |
| 51 | ### Mobile Testing Setup for embedded local drivers |
| 52 | |
| 53 | #### Android |
| 54 | |
| 55 | 1. Install Android Studio and the Android SDK. |
| 56 | 2. Set the `ANDROID_HOME` environment variable. |
| 57 | 3. Add the Android SDK tools to your system's PATH. |
| 58 | 4. Enable USB debugging on your Android device. |
| 59 | 5. Install the Android platform tools/build tools and keep `adb` available on `PATH`. |
| 60 | |
| 61 | #### iOS (macOS only) |
| 62 | |
| 63 | 1. Install Xcode from the App Store. |
| 64 | 2. Install the Xcode Command Line Tools: `xcode-select --install`. |
| 65 | 3. Install iOS simulators through Xcode. |
| 66 | 4. For real device testing, enable Developer Mode on the device and sign in to your Apple ID in Xcode (Settings → Accounts). Use `appium_prepare_ios_real_device` to download and sign WebDriverAgent in a single call - it will guide you through provisioning profile sel |