Overview
What is MCP Appium Server?
An MCP server implementation for mobile app automation using Appium. It provides a Model Context Protocol interface to control mobile devices (Android and iOS) through Appium, enabling automated testing and interaction with native apps.
How to use MCP Appium Server?
Install dependencies (npm install), start Appium server (appium), build the project (npm run build), then start the MCP server (npm run dev). Run tests with npm test. Configure device name, app path, or app package/activity in examples/appium-test.ts.
Key features of MCP Appium Server
- Find and interact with mobile UI elements (tap, type, scroll)
- Launch, close, reset apps; get current package/activity
- Control device orientation, keyboard, lock/unlock, take screenshots
- Switch between native and WebView contexts
- Perform file operations and custom gestures
- Retrieve battery info and device notifications
Use cases of MCP Appium Server
- Automate testing of Android and iOS mobile applications
- Perform UI regression testing with element locators and gestures
- Validate app behavior across different device orientations and states
- Manage app lifecycle and capture screenshots for reporting
- Interact with hybrid apps by switching between native and WebView contexts
FAQ from MCP Appium Server
What are the prerequisites to use this server?
Node.js v14+, JDK, Android SDK (for Android), Xcode (for iOS, macOS only), Appium Server installed globally, and a connected Android device/emulator or iOS device/simulator.
How do I configure the server for my own app instead of the Settings demo?
Edit examples/appium-test.ts: update deviceName, set app path to your APK, or specify appPackage and appActivity for an installed app. Common capabilities include platformName, automationName, and noReset.
What if my device is not found?
Run adb devices to confirm the device is connected. Ensure USB debugging is enabled. Try reconnecting the device or restarting the adb server.
Why can't Appium find elements in my app?
Use Appium Inspector to verify your selectors. Check that elements are visible on screen (not off-screen or covered). Try different locator strategies (e.g., XPath, accessibility id).
What causes connection issues with the MCP server?
Verify Appium server is running on the default port, check for port conflicts, and ensure the capabilities (deviceName, platformName) are correctly set in your test configuration.