Skip to main content

espresso-mcp

An MCP Server for the Espresso Android Test Framework, crafted to improve testing capabilities and optimize development workflows.

Installation

  • Python 3.x
  • uv: pip install uv
# Run in stdio mode
uvx espresso-mcp

# Run in sse mode
uvx espresso-mcp --sse

Usage

  • On Github Copilot: Add below JSON config to the file .vscode/mcp.json
{
  "servers": {
    "espresso-mcp": {
      "command": "uvx",
      "args": ["espresso-mcp"],
      "env": {}
    }
  }
}
  • On Claude: Add below JSON config to the file claude_desktop_config.json
{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["espresso-mcp", "--timeout-ms", "30000"]
    }
  }
}

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.
  • clear_and_type_text: Clear all text and type new text on the connected Android device.
  • replace_text: Replace text by clearing current text and typing new 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.
  • dump_current_activity: Dump the current activity name of 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
# Install dependencies
uv sync
# OR
uv sync --frozen --all-extras --dev

# Run Server
uv run espresso-mcp

# Run in Dev Mode
uv run mcp dev src/espresso_mcp/server.py

Debugging

  • Use MCP Inspector
# Install MCP Inspector
yarn global add @modelcontextprotocol/inspector

# Test MCP Server
yarn run @modelcontextprotocol/inspector python server.py

Linting and Testing

# Lint
uv run ruff check

# Tests
uv run pytest

Publishing

# Build the package
uv build
uv build --wheel
uv build --no-sources

# Upload to PyPI
uv publish

Developement Notes

uv tool install espresso-mcp

# OR

uvx espresso-mcp


uv init espresso-mcp

uv add "mcp[cli]"

uv run mcp dev server.py


uv tool run espresso-mcp


uv run pre-commit install

pre-commit run --all-files

Metadata

Release files for espresso-mcp 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for espresso-mcp 0.1.6
File Size Uploaded
espresso_mcp-0.1.6.tar.gz 37.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for espresso-mcp 0.1.6
File Interpreter ABI Platform
espresso_mcp-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 45.6 kB

Release files / espresso_mcp-0.1.6.tar.gz

Download URL espresso_mcp-0.1.6.tar.gz
Size 37.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8934d3a9b0fda54eea1e9c76661e28c110eb020cfc360bb05a5ac27819683133
BLAKE2b-256 checksum
How to use checksums
2713ab87f4ddace937feb34edecd64707cf9b07faac98b31838d7a2c2a4db930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / espresso_mcp-0.1.6-py3-none-any.whl

Download URL espresso_mcp-0.1.6-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79518ee2fc4ab39b3c39f0cc2de0c5988e0cf452df0f7046969f745d0e843a3b
BLAKE2b-256 checksum
How to use checksums
1941f4deccc609a4e8c7ecb1f6ee9b8f44fef8fd221acf608c4cfb894728e389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page