MCP-MEmu
Provides tools for controlling Android emulators via MEmu, enabling AI agents to manage VMs, install apps, automate UI, take screenshots, spoof GPS, and transfer files on Android emulator instances.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-MEmustart VM 0 and install Chrome"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ 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.
Related MCP server: Android-MCP
โจ Features
๐ฎ 69 Automation Tools
Category | Count | Highlights |
๐ Lifecycle | 15 | Create, clone, start, stop, reboot, delete, export/import VMs |
โ๏ธ Configuration | 8 | CPU, RAM, resolution, GPS, IMEI, device fingerprint randomization |
๐ฑ App Management | 7 | Install APK, launch, stop, uninstall, clear data, list packages |
๐ UI Interaction | 14 | Tap, swipe, long press, text input, keys, scroll, rotate, zoom, shake |
๐ธ Screenshot | 3 | Save to file, base64 for AI vision, get screen dimensions |
๐ Network & Sensors | 6 | Connect/disconnect, GPS spoofing, accelerometer, public IP |
๐ป Shell & Advanced | 8 | Shell commands, ADB passthrough, file push/pull, clipboard |
๐ Compound | 8 | Boot & ready, fresh start app, batch install, monkey test, snapshots |
๐ 8 MCP Resources (LLM Context)
Resource | Description |
| Comprehensive getting started guide with anti-hallucination rules |
| Complete tool reference with all args and descriptions |
| Step-by-step automation recipes |
| All VM configuration keys with valid values |
| Live VM list with status (dynamic) |
| Individual VM status (dynamic) |
| Security model documentation |
๐ก 7 Prompt Templates (Guided Workflows)
Prompt | Description |
| Full app testing workflow with screenshot-first rules |
| Create โ configure โ boot from scratch |
| Screen coordinate system, swipe directions, input reference |
| Set up multiple VMs with diverse configs |
| Diagnostic flowchart with error โ fix mapping |
| 10 city presets with verification steps |
| Push/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
Requirement | Details |
OS | Windows 10/11 |
MEmu Player | Download (installed & working) |
Python | 3.10 or higher |
uv | Install โ Python package manager |
Admin Privileges | Required by MEMUC CLI |
Installation
# Clone the repository
git clone https://github.com/devbysatyam/mcp-memu.git
cd mcp-memu
# Install dependencies
uv syncRun the Server
# Start the MCP server (stdio transport)
python server.py
# Or test with MCP Inspector (opens browser UI)
mcp dev server.pyConnect 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:
Boot the VM and wait for Android to fully load
Install your APK via
install_apkLaunch the app and take a screenshot to see the screen
Navigate through UI using
tap,swipe,input_textCapture screenshots at each step for visual verification
Tools used: boot_and_ready โ install_apk โ launch_app โ screenshot_base64 โ tap โ input_text โ take_screenshot2. ๐ 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_base643. ๐ญ Device Farm Setup
"Create 3 VMs with different resolutions and device fingerprints for compatibility testing."
The AI agent will:
Create 3 new Android 9 VMs
Configure each with different CPU, RAM, resolution
Randomize device fingerprints so each looks unique
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_ready4. ๐ 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_clipboard6. ๐ง 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
Tool | Description | Key Args |
| List all VMs with status | โ |
| Check running/stopped |
|
| Boot a VM |
|
| Graceful shutdown |
|
| Restart a VM |
|
| Create new VM |
|
| Permanently delete |
|
| Clone existing VM |
|
| Rename a VM |
|
| Export to .ova |
|
| Import from .ova |
|
| Compress disk |
|
| Re-tile windows | โ |
| Stop all non-protected | โ |
| Async task status |
|
Configuration
Tool | Description | Key Args |
| Read all common settings |
|
| Read single setting |
|
| Write single setting |
|
| Set CPU cores |
|
| Set RAM |
|
| Set display |
|
| Set GPS |
|
| Random fingerprint |
|
App Management
Tool | Description | Key Args |
| Installed packages |
|
| Install APK file |
|
| Remove app |
|
| Start app |
|
| Force stop |
|
| Wipe app data |
|
| Desktop shortcut |
|
UI Interaction
Tool | Description | Key Args |
| Tap coordinates |
|
| Swipe gesture |
|
| Long press |
|
| Type text |
|
| Send key event |
|
| Enter key |
|
| Back button |
|
| Home button |
|
| Shake gesture |
|
| Toggle orientation |
|
| Pinch zoom |
|
| Scroll |
|
Screenshot & Capture
Tool | Description | Key Args |
| Save to file |
|
| Base64 PNG for AI vision |
|
| Current resolution |
|
Network & Sensors
Tool | Description | Key Args |
| Enable internet |
|
| Disable internet |
|
| Get public IP |
|
| Spoof GPS |
|
| Set sensor |
|
| Get ADB address |
|
Shell & Advanced
Tool | Description | Key Args |
| Run shell command |
|
| Raw ADB command |
|
| Model/version/CPU |
|
| Running processes |
|
| VM โ Host |
|
| Host โ VM |
|
| Set clipboard |
|
| Read clipboard |
|
Compound (Multi-Step)
Tool | Description |
| Poll until Android is fully booted |
| Start VM + wait for boot |
| Stop โ clear data โ relaunch |
| Install APK + launch |
| Clone + set CPU/RAM/resolution |
| Install multiple APKs ( |
| Stop โ export โ restart |
| Random 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
Package | Version | Purpose |
โฅ 0.6.0 | Python wrapper for MEmu's MEMUC CLI | |
โฅ 1.0.0 | Model Context Protocol SDK + CLI tools | |
โฅ 12.1.1 | Image processing for screenshots |
All dependencies are managed via pyproject.toml and installed automatically with uv sync.
๐ Security
See SECURITY.md for full details.
Feature | Description |
Protected VMs | Pre-existing VMs snapshotted on startup โ cannot be deleted/stopped |
Input Validation | VM index validated, negative values rejected |
Command Blocklist |
|
Audit Logging | All destructive ops logged with timestamps to stderr |
Local-Only Transport | Uses stdio โ no network exposure by default |
For remote deployments, implement OAuth 2.1 with PKCE per the MCP specification.
โ ๏ธ Known Limitations
Limitation | Details | Workaround |
Clone requires disk space | Each clone needs 2-4GB | Free disk space before cloning |
DirectX blank screenshots | MEmu's DirectX mode produces blank images | Set |
ADB requires WiFi | ADB over TCP needs VM WiFi enabled | Call |
Config needs stopped VM | CPU/RAM/resolution only changeable when stopped |
|
Windows only | MEmu is Windows-only software | No Linux/macOS support |
๐ค Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing)Open a Pull Request
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ Acknowledgments
MEmu Player โ Android emulator
PyMEMUC โ Python MEMUC wrapper
Model Context Protocol โ AI tool interoperability standard
FastMCP โ Python MCP SDK
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devbysatyam/mcp-memu'
If you have feedback or need assistance with the MCP directory API, please join our Discord server