Skip to content
Conduit

mcp server

mcp-memu

๐Ÿค– MCP server for AI-powered MEmu Android Emulator control โ€” 69 tools, 7 prompt templates, 8 resources for VM lifecycle, app testing, UI automation, GPS spoofing, and more

devbysatyam/mcp-memucommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-memu": {
      "command": "uvx",
      "args": [
        "mcp-memu"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 26, 2026

๐ŸŒŸ What is MCP-MEmu?

MCP-MEmu is a Model Context Protocol (MCP) server that gives AI agents complete control over MEmu Android Emulator. It wraps the MEMUC CLI through PyMEMUC and exposes 69 tools, 8 resources, and 7 prompt templates for seamless AI-driven Android automation.

Connect it to Claude Desktop, Antigravity, Cursor, or any MCP-compatible client โ€” and your AI can boot VMs, install apps, automate UI, take screenshots, spoof GPS, transfer files, and much more.


โœจ Features

๐ŸŽฎ 69 Automation Tools

CategoryCountHighlights
๐Ÿ”„ Lifecycle15Create, clone, start, stop, reboot, delete, export/import VMs
โš™๏ธ Configuration8CPU, RAM, resolution, GPS, IMEI, device fingerprint randomization
๐Ÿ“ฑ App Management7Install APK, launch, stop, uninstall, clear data, list packages
๐Ÿ‘† UI Interaction14Tap, swipe, long press, text input, keys, scroll, rotate, zoom, shake
๐Ÿ“ธ Screenshot3Save to file, base64 for AI vision, get screen dimensions
๐ŸŒ Network & Sensors6Connect/disconnect, GPS spoofing, accelerometer, public IP
๐Ÿ’ป Shell & Advanced8Shell commands, ADB passthrough, file push/pull, clipboard
๐Ÿš€ Compound8Boot & ready, fresh start app, batch install, monkey test, snapshots

๐Ÿ“š 8 MCP Resources (LLM Context)

ResourceDescription
memu://guideComprehensive getting started guide with anti-hallucination rules
memu://toolsComplete tool reference with all args and descriptions
memu://workflowsStep-by-step automation recipes
memu://config-keysAll VM configuration keys with valid values
memu://vmsLive VM list with status (dynamic)
memu://vm/{index}/statusIndividual VM status (dynamic)
memu://securitySecurity model documentation

๐Ÿ’ก 7 Prompt Templates (Guided Workflows)

PromptDescription
automate_app_testingFull app testing workflow with screenshot-first rules
setup_new_vmCreate โ†’ configure โ†’ boot from scratch
ui_automation_guideScreen coordinate system, swipe directions, input reference
batch_device_farmSet up multiple VMs with diverse configs
debug_vm_issuesDiagnostic flowchart with error โ†’ fix mapping
gps_spoofing_guide10 city presets with verification steps
file_transfer_guidePush/pull files with VM path reference

๐Ÿ›ก๏ธ Security

  • Protected VM Registry โ€” Pre-existing VMs cannot be deleted/stopped/renamed
  • Input Validation โ€” VM index validation, dangerous command blocklist
  • Audit Logging โ€” All destructive operations logged with timestamps
  • Command Blocklist โ€” Blocks rm -rf /, mkfs, dd, reboot, shutdown, format, wipe

๐Ÿš€ Quick Start

Prerequisites

RequirementDetails
OSWindows 10/11
MEmu PlayerDownload (installed & working)
Python3.10 or higher
uvInstall โ€” Python package manager
Admin PrivilegesRequired by MEMUC CLI

Installation

# Clone the repository
git clone https://github.com/devbysatyam/mcp-memu.git
cd mcp-memu

# Install dependencies
uv sync

Run the Server

# Start the MCP server (stdio transport)
python server.py

# Or test with MCP Inspector (opens browser UI)
mcp dev server.py

Connect to Claude Desktop

Add to %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "memu": {
      "command": "uv",
      "args": ["run", "--directory", "C:\\path\\to\\mcp-memu", "python", "server.py"]
    }
  }
}

Connect to Antigravity / Gemini

Add to your MCP server settings:

{
  "memu": {
    "command": "uv",
    "args": ["run", "--directory", "C:\\path\\to\\mcp-memu", "python", "server.py"]
  }
}

๐Ÿ“– Use Cases

1. ๐Ÿ“ฑ Automated App Testing

"Install my APK, launch it, go through the onboarding flow, and take screenshots at each step."

The AI agent will:

  1. Boot the VM and wait for Android to fully load
  2. Install your APK via install_apk
  3. Launch the app and take a screenshot to see the screen
  4. Navigate through UI using tap, swipe, input_text
  5. Capture screenshots at each step for visual verification
Tools used: boot_and_ready โ†’ install_apk โ†’ launch_app โ†’ screenshot_base64 โ†’ tap โ†’ input_text โ†’ take_screenshot

2. ๐ŸŒ GPS-Based Testing

"Set the location to San Francisco and check if the app shows nearby restaurants."

Tools used: set_gps_location(lat=37.7749, lng=-122.4194) โ†’ launch_app โ†’ screenshot_base64

3. ๐Ÿญ Device Farm Setup

"Create 3 VMs with different resolutions and device fingerprints for compatibility testing."

The AI agent will:

  1. Create 3 new Android 9 VMs
  2. Configure each with different CPU, RAM, resolution
  3. Randomize device fingerprints so each looks unique
  4. Boot all VMs and verify they're working
Tools used: create_vm (x3) โ†’ set_vm_cpu โ†’ set_vm_memory โ†’ set_vm_resolution โ†’ randomize_vm_device โ†’ boot_and_ready

4. ๐Ÿ”„ CI/CD Integration

"Run a monkey test on the app and capture the results."

Tools used: boot_and_ready โ†’ install_apk โ†’ run_monkey_test โ†’ take_screenshot โ†’ pull_file (logs)

5. ๐Ÿ“‹ Clipboard & File Transfer

"Push a config file to the VM, read back the app's output log."

Tools used: push_file โ†’ launch_app โ†’ pull_file โ†’ set_clipboard โ†’ get_clipboard

6. ๐Ÿ”ง VM Configuration Management

"Read current config, change to 4 CPU cores and 4GB RAM, then reboot."

Tools used: get_all_vm_config โ†’ stop_vm โ†’ set_vm_cpu(cores=4) โ†’ set_vm_memory(mb=4096) โ†’ boot_and_ready

๐Ÿ”ง Tool Reference

Lifecycle Management

ToolDescriptionKey Args
list_vmsList all VMs with statusโ€”
get_vm_statusCheck running/stoppedvm_index
start_vmBoot a VMvm_index
stop_vmGraceful shutdownvm_index
reboot_vmRestart a VMvm_index
create_vmCreate new VMvm_version (76=Android 7, 96=Android 9)
delete_vmPermanently deletevm_index
clone_vmClone existing VMvm_index, new_name
rename_vmRename a VMvm_index, new_name
export_vmExport to .ovavm_index, output_path
import_vmImport from .ovaova_path
compress_vmCompress diskvm_index
sort_out_all_vmsRe-tile windowsโ€”
stop_all_vmsStop all non-protectedโ€”
check_task_statusAsync task statustask_id

Configuration

ToolDescriptionKey Args
get_all_vm_configRead all common settingsvm_index
get_vm_configRead single settingvm_index, key
set_vm_configWrite single settingvm_index, key, value
set_vm_cpuSet CPU coresvm_index, cores (1/2/4/8)
set_vm_memorySet RAMvm_index, mb
set_vm_resolutionSet displayvm_index, width, height, dpi
set_vm_gpsSet GPSvm_index, lat, lng
randomize_vm_deviceRandom fingerprintvm_index

App Management

ToolDescriptionKey Args
list_appsInstalled packagesvm_index
install_apkInstall APK filevm_index, apk_path
uninstall_appRemove appvm_index, package
launch_appStart appvm_index, package
stop_appForce stopvm_index, package
clear_app_dataWipe app datavm_index, package
create_app_shortcutDesktop shortcutvm_index, package

UI Interaction

ToolDescriptionKey Args
tapTap coordinatesvm_index, x, y
swipeSwipe gesturevm_index, x1, y1, x2, y2, duration_ms
long_pressLong pressvm_index, x, y, duration_ms
input_textType textvm_index, text
send_keySend key eventvm_index, key (home/back/menu/volumeup/volumedown)
press_enterEnter keyvm_index
press_backBack buttonvm_index
press_homeHome buttonvm_index
shake_deviceShake gesturevm_index
rotate_screenToggle orientationvm_index
zoom_in / zoom_outPinch zoomvm_index
scroll_up / scroll_downScrollvm_index, x

Screenshot & Capture

ToolDescriptionKey Args
take_screenshotSave to filevm_index, save_path
screenshot_base64Base64 PNG for AI visionvm_index
get_screen_sizeCurrent resolutionvm_index

Network & Sensors

ToolDescriptionKey Args
connect_networkEnable internetvm_index
disconnect_networkDisable internetvm_index
get_public_ipGet public IPvm_index
set_gps_locationSpoof GPSvm_index, lat, lng
set_accelerometerSet sensorvm_index, x, y, z
get_adb_connection_infoGet ADB addressvm_index

Shell & Advanced

ToolDescriptionKey Args
execute_shellRun shell commandvm_index, command
send_adbRaw ADB commandvm_index, command
get_device_infoModel/version/CPUvm_index
get_running_appsRunning processesvm_index
pull_fileVM โ†’ Hostvm_index, remote_path, local_path
push_fileHost โ†’ VMvm_index, local_path, remote_path
set_clipboardSet clipboardvm_index, text
get_clipboardRead clipboardvm_index

Compound (Multi-Step)

ToolDescription
wait_for_bootPoll until Android is fully booted
boot_and_readyStart VM + wait for boot
fresh_start_appStop โ†’ clear data โ†’ relaunch
install_and_launchInstall APK + launch
clone_and_configureClone + set CPU/RAM/resolution
batch_installInstall multiple APKs (;-separated)
full_vm_snapshotStop โ†’ export โ†’ restart
run_monkey_testRandom UI stress test

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   MCP Client                        โ”‚
โ”‚   (Claude Desktop / Antigravity / Cursor / etc.)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚ JSON-RPC (stdio)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  MCP-MEmu Server                     โ”‚
โ”‚                   server.py                          โ”‚
โ”‚                                                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚  Tools   โ”‚  โ”‚Resources โ”‚  โ”‚    Prompts        โ”‚   โ”‚
โ”‚  โ”‚  (69)    โ”‚  โ”‚  (8)     โ”‚  โ”‚    (7 templates)  โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚       โ”‚                                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚          Security Layer                        โ”‚   โ”‚
โ”‚  โ”‚  โ€ข Protected VM registry                      โ”‚   โ”‚
โ”‚  โ”‚  โ€ข Input validation & command blocklist        โ”‚   โ”‚
โ”‚  โ”‚  โ€ข Audit logging                              โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚       โ”‚                                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚     PyMEMUC + ADB Helpers                     โ”‚   โ”‚
โ”‚  โ”‚  โ€ข MEMUC CLI wrapper                          โ”‚   โ”‚
โ”‚  โ”‚  โ€ข ADB pull/push with auto-reconnect          โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              MEmu Android Emulator                    โ”‚
โ”‚         (MEMUC CLI + ADB over TCP)                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

mcp-memu/
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ banner.png             # GitHub banner image
โ”œโ”€โ”€ tools/
โ”‚   โ”œโ”€โ”€ lifecycle.py           # VM start, stop, create, delete, clone
โ”‚   โ”œโ”€โ”€ config.py              # CPU, RAM, resolution, GPS settings
โ”‚   โ”œโ”€โ”€ apps.py                # Install, launch, stop apps
โ”‚   โ”œโ”€โ”€ input.py               # Tap, swipe, type, scroll, shake
โ”‚   โ”œโ”€โ”€ capture.py             # Screenshots (file & base64)
โ”‚   โ”œโ”€โ”€ network.py             # Network, GPS, accelerometer
โ”‚   โ”œโ”€โ”€ shell.py               # Shell, ADB, file transfer, clipboard
โ”‚   โ””โ”€โ”€ compound.py            # High-level combined operations
โ”œโ”€โ”€ resources/
โ”‚   โ”œโ”€โ”€ vm_status.py           # MCP resources (guides, tools ref, config keys)
โ”‚   โ””โ”€โ”€ prompts.py             # MCP prompt templates (7 workflows)
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ memuc_instance.py      # Singleton PyMemuc + security layer
โ”‚   โ””โ”€โ”€ adb_helpers.py         # ADB pull/push with timeout & reconnect
โ”œโ”€โ”€ server.py                  # FastMCP entry point
โ”œโ”€โ”€ pyproject.toml             # Project metadata & dependencies
โ”œโ”€โ”€ protected_vms.json         # Auto-generated (gitignored)
โ”œโ”€โ”€ SECURITY.md                # Security documentation
โ”œโ”€โ”€ LICENSE                    # MIT License
โ””โ”€โ”€ README.md                 # This file

๐Ÿ“ฆ Dependencies

PackageVersionPurpose
pymemucโ‰ฅ 0.6.0Python wrapper for MEmu's MEMUC CLI
mcp[cli]โ‰ฅ 1.0.0Model Context Protocol SDK + CLI tools
Pillowโ‰ฅ 12.1.1Image processing for screenshots

All dependencies are managed via pyproject.toml and installed automatically with uv sync.


๐Ÿ”’ Security

See SECURITY.md for full details.

FeatureDescription
Protected VMsPre-existing VMs snapshotted on startup โ€” cannot be deleted/stopped
Input ValidationVM index validated, negative values rejected
Command Blocklistrm -rf /, mkfs, dd, reboot, shutdown, format, wipe blocked
Audit LoggingAll destructive ops logged with timestamps to stderr
Local-Only TransportUses stdio โ€” no network exposure by default

For remote deployments, implement OAuth 2.1 with PKCE per the MCP specification.


โš ๏ธ Known Limitations

LimitationDetailsWorkaround
Clone requires disk spaceEach clone needs 2-4GBFree disk space before cloning
DirectX blank screenshotsMEmu's DirectX mode produces blank imagesSet graphics_render_mode=0 (OpenGL)
ADB requires WiFiADB over TCP needs VM WiFi enabledCall connect_network() first
Config needs stopped VMCPU/RAM/resolution only changeable when stoppedstop_vm() before config changes
Windows onlyMEmu is Windows-only softwareNo Linux/macOS support

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ™ Acknowledgments


โ†‘โ†“ navigate openesc close