An MCP (Model Context Protocol) server for mobile and desktop application testing using Appium WebDriver.
This MCP server provides tools for:
- Session Management: Start and end Appium testing sessions
- Element Interaction: Find, click, and type into elements
- Information Retrieval: Get element text and page source
- Screenshots: Capture screenshots during testing
- Gestures: Perform swipe gestures
- Multi-platform: Supports Android, iOS, Windows, and Mac testing
Before using this MCP server, you need:
- Node.js (v18 or higher)
- Appium Server running locally or remotely
- Platform-specific requirements:
- Android: Android SDK, Android emulator or real device
- iOS: Xcode, iOS Simulator or real device (macOS only)
- Windows/Mac: Applications to test on desktop platforms
The project comes with Appium 3.x. Install drivers using:
npx appium driver install uiautomator2 # For Android
npx appium driver install xcuitest # For iOS
npx appium driver install mac2 # For macOS desktop appsThen start the Appium server:
npx appiumThe server will run on http://localhost:4723 by default.
npm install
npm run buildThis package includes three specialized agents for Appium testing that integrate with GitHub Copilot:
- Test Executor: Execute manual test cases step-by-step with validation
- Test Generator: Generate automated test code from test plans or requirements
- Test Healer: Debug and fix failing Appium tests
To use these agents in your repository with GitHub Copilot, run:
npx appiumium seed --loop=copilotThis will copy the agent files to your repository's .github/chatmodes/ directory, making them available for GitHub Copilot to use when assisting with Appium testing tasks.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"appiumium": {
"command": "node",
"args": ["/absolute/path/to/appiumium/build/index.js"]
}
}
}npx @modelcontextprotocol/inspector node build/index.jsInitialize a new Appium session with capabilities.
Parameters:
platformName(required): Android, iOS, Windows, or MacdeviceName(optional): Device name for mobile testingapp(optional): Path to app or app package/bundle IDautomationName(optional): Automation framework (UiAutomator2, XCUITest)udid(optional): Device UDID for real devicesappiumServerUrl(optional): Appium server URL (default: http://localhost:4723)
Example:
{
"platformName": "Android",
"deviceName": "Pixel_5_API_31",
"app": "/path/to/app.apk",
"automationName": "UiAutomator2"
}Find an element using various selector strategies.
Parameters:
strategy: id, xpath, accessibility id, class name, android uiautomator, ios predicate stringselector: Element selector string
Click on an element.
Parameters:
selector: Element selector (XPath, ID, etc.)
Type text into an element.
Parameters:
selector: Element selectortext: Text to type
Get the text content of an element.
Parameters:
selector: Element selector
Capture a screenshot of the current screen.
Perform a swipe gesture.
Parameters:
startX: Start X coordinatestartY: Start Y coordinateendX: End X coordinateendY: End Y coordinateduration: Swipe duration in milliseconds (default: 500)
Get the XML page source of the current screen.
End the current Appium session and close the app.
- Start session:
Use the start_session tool with platformName: Android, app: /path/to/app.apk
- Find and interact with elements:
Use find_element to locate a button
Use click_element to click it
Use send_keys to enter text in a field
- Verify and capture:
Use get_element_text to verify text
Use take_screenshot to capture the screen
- End session:
Use end_session to close the app
Use start_session with platformName: iOS, app: /path/to/app.app, automationName: XCUITest
Ensure Appium server is running:
appiumInstall the required driver:
appium driver install uiautomator2 # Android
appium driver install xcuitest # iOS- For Android: Check
adb devices - For iOS: Check Xcode Simulator list
- Use correct
deviceNameorudidparameter
Check Appium logs for detailed error messages. Common issues:
- App path is incorrect
- Device/emulator is not available
- Capabilities are misconfigured
npm run buildnpm run watchMIT