The espresso-mcp server is an MCP (Model Context Protocol) server that automates and enhances Android testing workflows using the Espresso framework.
Android Device and Emulator Management: List available Android Virtual Devices (AVDs), list running emulators, start emulators by name, and kill specific emulators.
UI Interaction and Testing: Dump UI hierarchy, open URIs, simulate taps at specific coordinates, perform swipe gestures with optional duration, and simulate various button presses on connected Android devices.
Text Input: Type text or clear existing text and type new text on the connected Android device.
Application Control: List installed applications, install APKs, start/stop apps, uninstall apps, and clear app data.
Screen Capture: Take screenshots and record screen for specified durations.
Additional Utilities: Fetch weather data for cities, retrieve static app configuration, and get personalized greetings via resources.
Provides integration with the Espresso Android Test Framework, enhancing Android app testing capabilities and streamlining test automation workflows.
espresso-mcp
A MCP Server for the Espresso Android Test Framework, designed to enhance testing capabilities and streamline development workflows.
Installation
- Python 3.x
- uv:
pip install uv
Usage
- On Claude: Add below JSON config to the file
claude_desktop_config.json
Available Tools
The following tools are available in the espresso-mcp
project:
- list_avds: List all available Android Virtual Devices (AVDs).
- list_emulators: List all running Android Emulators.
- start_emulator: Start an Android Emulator by name.
- kill_emulator: Kill a specific Android Emulator.
- dump_ui_hierarchy: Dump the UI hierarchy of the connected Android device.
- open_uri: Open a URI on the connected Android device.
- list_apps: List all installed apps on the connected Android device.
- install_app: Install an APK on the connected Android device.
- start_app: Start a specific app on the connected Android device.
- stop_app: Stop a specific app on the connected Android device.
- uninstall_app: Uninstall an app from the connected Android device.
- clear_app_data: Clear app data for a specific app on the connected Android device.
- take_screenshot: Take a screenshot of the connected Android device.
- record_screen: Record the screen of the connected Android device for a specified duration.
- press_button: Simulate a button press on the connected Android device.
- type_text: Type text on the connected Android device.
- tap: Simulate a tap on the connected Android device at specific coordinates.
- swipe: Perform a swipe gesture in a specific direction on the connected Android device.
Resources
The following resources are available:
- config://app: Retrieve static configuration data.
- greeting://{name}: Get a personalized greeting.
Local Setup
- Python 3.x
- uv:
pip install uv
Debugging
- Use MCP Inspector
Testing and Linting
Publishing
Developement Notes
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
espresso-mcp
Related MCP Servers
- AsecurityFlicenseAqualityA server that enables browser automation using Playwright, allowing interaction with web pages, capturing screenshots, and executing JavaScript in a browser environment through LLMs.Last updated -128,2801
- MIT License
- MIT License
- MIT License