Enables mobile test automation for Android apps using UiAutomator2, supporting element discovery, interactions, screen navigation, session management, and automated test generation for both emulators and real devices.
Integrates with Android SDK for Android device testing setup and configuration.
Provides comprehensive mobile automation capabilities through Appium, including cross-platform test creation, intelligent element locator generation, context switching for webviews, and Java/TestNG test code generation following Page Object Model best practices.
Enables mobile test automation for iOS apps using XCUITest, supporting simulator boot, WebDriverAgent setup, element interactions, screen navigation, session management, and automated test generation for both simulators and real devices.
Integrates with Xcode and iOS simulators for iOS device testing, including WebDriverAgent installation and configuration for real device testing with provisioning profiles.
MCP Appium - MCP server for Mobile Development and Automation | iOS, Android, Simulator, Emulator, and Real Devices
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.
Table of Contents
🚀 Features
Cross-Platform Support: Automate tests for both Android (UiAutomator2) and iOS (XCUITest).
Intelligent Locator Generation: AI-powered element identification using priority-based strategies.
Interactive Session Management: Easily create and manage sessions on local mobile devices.
Smart Element Interactions: Perform actions like clicks, text input, screenshots, and element finding.
Automated Test Generation: Generate Java/TestNG test code from natural language descriptions.
Page Object Model Support: Utilize built-in templates that follow industry best practices.
Flexible Configuration: Customize capabilities and settings for different environments.
📋 Prerequisites
Before you begin, ensure you have the following installed:
System Requirements
Node.js (v22 or higher)
npm or yarn
Java Development Kit (JDK) (8 or higher)
Android SDK (for Android testing)
Xcode (for iOS testing on macOS)
Mobile Testing Setup
Android
Install Android Studio and the Android SDK.
Set the
ANDROID_HOMEenvironment variable.Add the Android SDK tools to your system's PATH.
Enable USB debugging on your Android device.
Install the Appium UiAutomator2 driver dependencies.
iOS (macOS only)
Install Xcode from the App Store.
Install the Xcode Command Line Tools:
xcode-select --install.Install iOS simulators through Xcode.
For real device testing, configure your provisioning profiles.
🛠️ Installation
Standard config works in most of the tools::
In Cursor IDE
The easiest way to install MCP Appium in Cursor IDE is using the one-click install button:
This will automatically configure the MCP server in your Cursor IDE settings. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
Or install manually:
Go to Cursor Settings → MCP → Add new MCP Server. Name it to your liking, use command type with the command npx -y appium-mcp@latest. You can also verify config or add command arguments via clicking Edit.
Here is the recommended configuration:
Note: Make sure to update the ANDROID_HOME path to match your Android SDK installation path.
With Gemini CLI
Use the Gemini CLI to add the MCP Appium server:
This will automatically configure the MCP server for use with Gemini. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
With Claude Code CLI
Use the Claude Code CLI to add the MCP Appium server:
This will automatically configure the MCP server for use with Claude Code. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
⚙️ Configuration
Capabilities
Create a capabilities.json file to define your device capabilities:
Set the CAPABILITIES_CONFIG environment variable to point to your configuration file.
Screenshots
Set the SCREENSHOTS_DIR environment variable to specify where screenshots are saved. If not set, screenshots are saved to the current working directory. Supports both absolute and relative paths (relative paths are resolved from the current working directory). The directory is created automatically if it doesn't exist.
🎯 Available Tools
MCP Appium provides a comprehensive set of tools organized into the following categories:
Platform & Device Setup
Tool | Description |
| REQUIRED FIRST: Ask user to choose between Android or iOS platform |
| Select a specific device when multiple devices are available |
| Boot an iOS simulator and wait for it to be ready (iOS only) |
| Download and setup prebuilt WebDriverAgent for iOS simulators (iOS only) |
| Install and launch WebDriverAgent on a booted iOS simulator (iOS only) |
Session Management
Tool | Description |
| Create a new mobile automation session for Android or iOS |
| Delete the current mobile session and clean up resources |
Context Management
Tool | Description |
| Get all available contexts in the current Appium session. Returns a list of context names including NATIVE_APP and any webview contexts (e.g., WEBVIEW_ or WEBVIEW_ ). |
| Switch to a specific context in the Appium session. Use this to switch between native app context (NATIVE_APP) and webview contexts (WEBVIEW_ or WEBVIEW_ ). Use appium_get_contexts to see available contexts first. |
Element Discovery & Interaction
Tool | Description |
| Find a specific element using various locator strategies (xpath, id, accessibility id, etc.) |
| Click on an element |
| Perform double tap on an element |
| Perform a long press (press and hold) gesture on an element |
| Perform a drag and drop gesture from a source location to a target location (supports element-to-element, element-to-coordinates, coordinates-to-element, and coordinates-to-coordinates) |
| Enter text into an input field |
| Get text content from an element |
Screen & Navigation
Tool | Description |
| Take a screenshot of the current screen and save as PNG |
| Scroll the screen vertically (up or down) |
| Scroll until a specific element becomes visible |
| Swipe the screen in a direction (left, right, up, down) or between custom coordinates |
| Get the page source (XML) from the current screen |
App Management
Tool | Description |
| Activate (launch/bring to foreground) a specified app by bundle ID |
| Install an app on the device from a file path |
| Uninstall an app from the device by bundle ID |
| Terminate (close) a specified app |
| List all installed apps on the device (Android only) |
Test Generation & Documentation
Tool | Description |
| Generate intelligent locators for all interactive elements on the current screen |
| Generate automated test code from natural language scenarios |
| Query Appium documentation using RAG for help and guidance |
🤖 Client Support
MCP Appium is designed to be compatible with any MCP-compliant client.
📚 Usage Examples
Amazon Mobile App Checkout Flow
Here's an example prompt to test the Amazon mobile app checkout process:
This example demonstrates a complete e-commerce checkout flow that can be automated using MCP Appium's intelligent locator generation and test creation capabilities.
🙌 Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss any changes.
📄 License
This project is licensed under the Apache-2.0. See the LICENSE file for details.