MCP Appium Server
A Model Context Protocol (MCP) server that enables mobile app automation using Appium, supporting various device interactions, element operations, and app management through a standardized protocol.
Tools
initialize-appium
Initialize an Appium driver session for mobile automation
save-ui-hierarchy
Save UI hierarchy XML to a file
close-appium
Close the current Appium driver session
appium-screenshot
Take a screenshot using Appium
tap-element
Tap on a UI element identified by a selector
send-keys
Send text input to a UI element
get-page-source
Get the XML representation of the current UI
swipe
Perform a swipe gesture on the screen
wait-for-element
Wait for an element to be visible on screen
extract-locators
Extract element locators from UI XML source
find-by-text
Generate XPath to find element by text
generate-test-script
Generate Appium test script from actions
install-app
Install an Android application APK
take-screenshot
Take a screenshot on an Android device
list-devices
List all connected Android devices
uninstall-app
Uninstall an Android application
list-installed-packages
List all installed packages on an Android device
launch-app
Launch an app on an Android device
execute-adb-command
Execute a custom ADB command
README
MCP Appium Server
A Model Context Protocol (MCP) server implementation for mobile app automation using Appium.
<a href="https://glama.ai/mcp/servers/@Rsec08/appium-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Rsec08/appium-mcp/badge" alt="Appium Server MCP server" /> </a>
Prerequisites
- Node.js (v14 or higher)
- Java Development Kit (JDK)
- Android SDK (for Android testing)
- Xcode (for iOS testing, macOS only)
- Appium Server
- Android device or emulator / iOS device or simulator
Setup
- Install dependencies:
npm install
- Install and start Appium server:
npm install -g appium
appium
- Set up Android device/emulator:
- Enable Developer Options on your Android device
- Enable USB Debugging
- Connect device via USB or start an emulator
- Verify device is connected using
adb devices
Running Tests
- Build the project:
npm run build
- Start the MCP server:
npm run dev
- In a new terminal, run the test:
npm test
Test Configuration
The example test uses the Android Settings app as a demo. To test your own app:
-
Edit
examples/appium-test.ts:- Update
deviceNameto match your device - Set
apppath to your APK file, or - Update
appPackageandappActivityfor an installed app
- Update
-
Common capabilities configuration:
const capabilities: AppiumCapabilities = {
platformName: 'Android',
deviceName: 'YOUR_DEVICE_NAME',
automationName: 'UiAutomator2',
// For installing and testing an APK:
app: './path/to/your/app.apk',
// OR for testing an installed app:
appPackage: 'your.app.package',
appActivity: '.MainActivity',
noReset: true
};
Available Actions
The MCP server supports various Appium actions:
-
Element Interactions:
- Find elements
- Tap/click
- Type text
- Scroll to element
- Long press
-
App Management:
- Launch/close app
- Reset app
- Get current package/activity
-
Device Controls:
- Screen orientation
- Keyboard handling
- Device lock/unlock
- Screenshots
- Battery info
-
Advanced Features:
- Context switching (Native/WebView)
- File operations
- Notifications
- Custom gestures
Troubleshooting
-
Device not found:
- Check
adb devicesoutput - Verify USB debugging is enabled
- Try reconnecting the device
- Check
-
App not installing:
- Verify APK path is correct
- Check device has enough storage
- Ensure app is signed for debug
-
Elements not found:
- Use Appium Inspector to verify selectors
- Check if elements are visible on screen
- Try different locator strategies
-
Connection issues:
- Verify Appium server is running
- Check port conflicts
- Ensure correct capabilities are set
Contributing
Feel free to submit issues and pull requests for additional features or bug fixes.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.