espresso-mcp
浓缩咖啡-MCP
Espresso Android 测试框架的 MCP 服务器,旨在增强测试能力并简化开发工作流程。
安装
Python 3.x
紫外线:
pip install uv
uv tool install espresso-mcpRelated MCP server: android-mcp
用法
在 Claude 上:将以下 JSON 配置添加到文件
claude_desktop_config.json
{
"mcpServers": {
"terminal": {
"command": "uv",
"args": ["pip", "run", "espresso-mcp", "--timeout-ms", "30000"]
}
}
}可用工具
espresso-mcp项目中提供了以下工具:
list_avds :列出所有可用的 Android 虚拟设备 (AVD)。
list_emulators :列出所有正在运行的 Android 模拟器。
start_emulator :按名称启动 Android 模拟器。
kill_emulator :杀死特定的 Android 模拟器。
dump_ui_hierarchy :转储已连接的 Android 设备的 UI 层次结构。
open_uri :在已连接的 Android 设备上打开 URI。
list_apps :列出连接的 Android 设备上安装的所有应用程序。
install_app :在连接的 Android 设备上安装 APK。
start_app :在连接的 Android 设备上启动特定的应用程序。
stop_app :停止已连接的 Android 设备上的特定应用程序。
uninstall_app :从连接的 Android 设备上卸载应用程序。
clear_app_data :清除所连接的 Android 设备上特定应用的应用数据。
take_screenshot :截取已连接的 Android 设备的屏幕截图。
record_screen :在指定的时间内记录所连接的 Android 设备的屏幕。
press_button :模拟按下所连接的 Android 设备上的按钮。
type_text :在连接的 Android 设备上输入文本。
tap :模拟在特定坐标处点击连接的 Android 设备。
滑动:在连接的 Android 设备上朝特定方向执行滑动手势。
资源
可用的资源如下:
config://app :检索静态配置数据。
Greeting://{name} :获取个性化问候。
本地设置
Python 3.x
紫外线:
pip install uv
# Install
uv install
# Run Dev Mode
uv run mcp dev server.py调试
使用 MCP 检查器
# Install MCP Inspector
yarn global add @modelcontextprotocol/inspector
# Test MCP Server
yarn run @modelcontextprotocol/inspector python server.py测试
uv run pytest出版
# Build the package
uv build
# Upload to PyPI
uv publish开发说明
uv init espresso-mcp
uv add "mcp[cli]"
uv run mcp dev server.py
Available Tools
22 toolsclear_and_type_textC
Clear all text and type new text on the connected Android device
Inputs: text (required).
clear_app_dataC
Clear app data for a specific app on the connected Android device
Inputs: package_name (required).
dump_current_activityA
Dump the current activity name of the connected Android device
Inputs: no named parameters.
dump_ui_hierarchyB
Dump the UI hierarchy of the connected Android device
Inputs: no named parameters.
fetch_weatherB
Fetch current weather for a city
Inputs: city (required).
install_appB
Install an App APK on the connected Android device
Inputs: app_path (required).
kill_emulatorC
Kill a specific Android Emulator
Inputs: emulator_name (required).
list_appsA
List all installed apps on the connected Android device
Inputs: no named parameters.
list_avdsC
List all available Android Virtual Devices (AVDs)
Inputs: no named parameters.
list_emulatorsA
List all running Android Emulators
Inputs: no named parameters.
open_uriC
Open a URI on the connected Android device
Inputs: uri (required).
press_buttonC
Simulate a button press on the connected Android device using an Enum button
Inputs: button (required).
record_screenC
Record the screen of the connected Android device for a specified duration
Inputs: output_path (required), duration (required).
replace_textB
Replace text on the connected Android device by clearing current text and typing new text
Inputs: text (required).
start_appC
Start an app on the connected Android device
Inputs: package_name (required).
start_emulatorC
Start an Android Emulator by name
Inputs: emulator_name (required).
stop_appC
Stop an app on the connected Android device
Inputs: package_name (required).
swipeC
Perform a swipe gesture in a specific direction on the connected Android device
Inputs: direction (required), duration.
take_screenshotC
Take a screenshot of the connected Android device
Inputs: output_path (required).
tapB
Simulate a tap on the connected Android device at the specified coordinates
Inputs: x (required), y (required).
type_textC
Type text on the connected Android device. Handles spaces correctly.
Inputs: text (required).
uninstall_appC
Uninstall an app from the connected Android device
Inputs: package_name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools are clearly separated by resource and action, but clear_and_type_text and replace_text describe essentially the same operation, which creates real ambiguity. The unrelated fetch_weather tool also muddies the tool surface.
The overwhelming majority of tools follow a clear verb_noun snake_case pattern (list_apps, start_emulator, take_screenshot). Minor deviations include short gesture verbs like tap and swipe, plus the redundant clear_and_type_text vs replace_text naming.
22 tools is on the heavy side but mostly justifiable for Android emulator/device automation. The count feels inflated by the duplicate text-replacement tools and the off-topic weather tool, which could be trimmed.
Core emulator and app lifecycle operations are covered well, along with common UI interactions. Obvious gaps include no AVD creation/deletion, no device/serial selection, and no test-running or assertion tools despite the espresso name.
Maintenance
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP Server for an Agent Task Marketplace
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseBqualityDmaintenanceA server that enables browser automation using Playwright, allowing interaction with web pages, capturing screenshots, and executing JavaScript in a browser environment through LLMs.1215,256 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server for Android operating system automation. This server provides tools to interact directly with Android devices and app interaction with control3-
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to build, test, and debug Android applications by interacting directly with the Android development environment. It provides tools for managing emulators, executing Gradle tasks, running ADB commands, and performing UI automation via accessibility trees.1480 npm20MIT
- FlicenseAqualityDmaintenanceAn MCP server designed for Android development, enabling AI assistants to directly control Android devices for screenshots, UI analysis, app management, and more.19-