home / mcp / appium mcp server
MCP Appium provides cross-platform mobile automation with intelligent locators, session management, and test generation.
Configuration
View docs{
"mcpServers": {
"appium-appium-mcp": {
"command": "npx",
"args": [
"appium-mcp@latest"
],
"env": {
"ANDROID_HOME": "/path/to/android/sdk",
"CAPABILITIES_CONFIG": "/path/to/your/capabilities.json"
}
}
}
}MCP Appium is a server that lets you automate mobile testing with natural language prompts, intelligent element locating, session management, and automated test generation for Android and iOS. It unifies device interaction and test creation so you can build robust mobile automation workflows quickly across real devices, emulators, and simulators.
Start by launching the MCP Appium server through your MCP client. Create or attach to a session for the target device and platform (Android or iOS). Use the available tools to find elements, interact with them, capture screenshots, and navigate through screens. When you describe a mobile test scenario in natural language, MCP Appium can generate locator strategies, produce automated test code, and document your flow. You can also generate locators for all interactive elements on a screen and generate TestNG-compatible Java tests from your descriptions. Manage multiple sessions or contexts as needed, and use the platform-specific tools to boot simulators, install apps, or switch contexts between native and web views.
1. Ensure prerequisites are met (Node.js, JDK, Android SDK, Xcode for iOS, and any required devices or simulators). 2. Start MCP Appium via your MCP client configuration. 3. Create a session for the device you want to automate. 4. Use element discovery tools to locate UI elements and perform actions like clicks, text entry, or scrolling. 5. Generate automated tests from natural language scenarios and export them in your preferred language and framework. 6. Take screenshots, obtain page sources, and manage contexts to support hybrid app testing.
- Begin with platform selection to ensure you target Android or iOS. - Create a session to establish a live automation context on a device or simulator. - Use locator generation to obtain robust selectors that adapt to UI changes. - Generate tests automatically from descriptive scenarios and integrate them into your test suite. - Use page object templates to organize your interactions and maintain test code.
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)
Create a new mobile automation session for Android or iOS
Delete the current mobile session and clean up resources
Get all available contexts in the current Appium session, including NATIVE_APP and WEBVIEW contexts
Switch to a specific context in the Appium session, e.g., NATIVE_APP or WEBVIEW_ contexts
Find an element using locator strategies such as xpath, id, accessibility id, etc.
Click on a targeted element
Perform a double tap on an element
Enter text into an input field
Retrieve text content from an element
Capture a screenshot and save as PNG
Scroll the screen vertically (up or down)
Scroll until a specific element becomes visible
Swipe the screen in a direction or between coordinates
Obtain the page source (XML) of the current screen
Activate (launch/bring to foreground) an 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)
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