Skip to main content
Glama
noahchalifour

emulator-hub

A lease-based pool of self-hosted Android emulators for agents and humans.

Check out a phone, tablet, or TV over MCP or HTTP, use it exclusively for a bounded lease, then release it back to the pool.

Demo

Related MCP server: Emulator MCP Server

Install

Berth runs on Kubernetes: the hub server starts one emulator Pod per lease.

docker pull ghcr.io/noahchalifour/emulator-hub:v0.1.1

Deployment manifests live in home-lab-infrastructure. Set HUB_API_TOKEN, HUB_EMULATOR_IMAGE, and HUB_SLOT_IPS on the hub.

Quickstart

Point an MCP client at the machine port (8081) and let the agent lease a device:

claude mcp add --transport http berth http://localhost:8081/mcp \
  --header "Authorization: Bearer $HUB_API_TOKEN"

Ask the agent to call acquire with a profile such as phone. The grant returns the lease id, the adb address to adb connect to, and expires_at. Call release when you finish, or let the lease expire.

Leases over MCP or HTTP

  • MCP tools: list_profiles, acquire, heartbeat, release, and status over streamable HTTP at /mcp.

  • Bounded leases: Each lease has a TTL, extends with heartbeat, and hits a hard stop after four hours.

  • REST API: Manage leases and profiles at /api/leases and /api/profiles.

  • Metrics: Scrape Prometheus metrics at /metrics and probe /healthz.

Live view and takeover

Watch any active session in the browser and take over with touch, keyboard, and the Back, Home, Recents, volume, and power buttons.

Profiles and history

  • Form factors: Phone, tablet, and Android TV profiles ship by default.

  • Editable profiles: Choose the system image, device, RAM (1024 to 4096 MB), and cores (1 to 4) per profile.

  • Lease history: Review the last 100 leases with holder, duration, and how each ended.

Android TV adb key

android-tv images only trust the key the emulator pushes at boot. Give the hub one key pair for every emulator:

adb keygen adbkey
kubectl -n emulator-hub create secret generic emulator-hub-adb-key \
  --from-file=adbkey --from-file=adbkey.pub

Mount the Secret into the hub and set HUB_ADB_KEY_DIR to the mount path. Agents fetch the key from GET /adbkey on the machine port. Anyone with the API token can then reach any leased device over adb.

License

MIT. See CONTRIBUTING.md to develop or run the tests.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server for managing local Android Virtual Devices (AVDs) and their lifecycles using Android SDK tools. It enables users to create, start, and stop emulators, while providing control over virtual sensors like the accelerometer and gyroscope.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Controls Android emulators from any MCP-capable client via ADB and emulator CLI, supporting AVD management, APK operations, screen interactions, and device diagnostics.
    1
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Local MCP server for Android emulator control, exposing tools to get emulator status, inspect UI tree, capture screenshots, and open App settings via Appium and ADB.
    ISC