home / mcp / espresso mcp server

Espresso MCP Server

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

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "vs4vijay-espresso-mcp": {
      "command": "uvx",
      "args": [
        "espresso-mcp"
      ]
    }
  }
}

You can run and manage the Espresso MCP Server to enhance Android testing workflows. This server exposes a set of tools that let you list, start, stop, and inspect Android Emulators and apps, capture device UI data, and simulate user actions from your MCP client. It is designed to integrate into your automation setup so you can orchestrate device actions alongside your tests.

How to use

To use the Espresso MCP Server, start it from your MCP client and connect your integration or editor tooling to the running server. The server is designed to run in stdio mode or in SSE mode for streaming capabilities. You can access the available actions to control emulators, install and launch apps, interact with the device UI, capture screenshots, and perform input gestures.

How to install

Prerequisites you need before installing and running the server are Python 3.x and the uv tool. You install uv with pip and then run the MCP server using the uvx CLI in either stdio or SSE mode.

# Install the uv runtime (Python-based MCP runner)
pip install uv

# Run in stdio mode
uvx espresso-mcp

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

Configuration for MCP clients

Configure your MCP clients to connect to the Espresso MCP Server by adding the following JSON configurations to their respective MCP configuration files.

{
  "servers": {
    "espresso-mcp": {
      "command": "uvx",
      "args": ["espresso-mcp"],
      "env": {}
    }
  }
}

Configuration for Claude / terminal integrations

If you want to integrate with Claude Desktop, add this JSON to the Claude config file to enable MCP access for the terminal integration.

{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["espresso-mcp", "--timeout-ms", "30000"]
    }
  }
}

Available tools

list_avds

Lists all available Android Virtual Devices (AVDs) that you can start for testing.

list_emulators

Lists all running Android Emulators to manage your test environment.

start_emulator

Starts an Android Emulator by its name, enabling you to boot and use a fresh device for tests.

kill_emulator

Terminates a specified Android Emulator process.

dump_ui_hierarchy

Dumps the UI hierarchy of the connected Android device to inspect view structure.

open_uri

Opens a given URI on the connected Android device to trigger deep links or app-specific actions.

list_apps

Lists all installed apps on the connected Android device for inventory and verification.

install_app

Installs an APK on the connected Android device to deploy a new version of an app.

start_app

Launches a specific app on the connected Android device to begin automated interactions.

stop_app

Stops a running app on the connected Android device to ensure clean test starts.

uninstall_app

Uninstalls an app from the connected Android device to remove test artifacts.

clear_app_data

Clears data for a specific app on the connected Android device to reset its state.

take_screenshot

Takes a screenshot of the connected Android device for visual verification.

record_screen

Records the device screen for a specified duration to capture UI interactions.

press_button

Simulates a physical or on-screen button press on the connected device.

type_text

Types text into the focused input on the connected device.

clear_and_type_text

Clears existing text and then types new text into the focused input.

replace_text

Replaces current text by clearing and typing new content.

tap

Performs a tap gesture at specific coordinates on the device screen.

swipe

Performs a swipe gesture in a chosen direction across the screen.

dump_current_activity

Dumps the current activity name running on the device for Context awareness.