Emulator MCP Server
Provides tools for controlling Android emulators, including launching AVDs, installing APKs, tapping, swiping, typing, taking screenshots, reading logs, and more.
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., "@Emulator MCP Serverlist connected devices"
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.
Emulator MCP Server
Model Context Protocol (MCP) server for controlling Android emulators from any MCP-capable client. Uses ADB and the Android emulator CLI. Control AVDs, install APKs, tap, swipe, type, take screenshots, read logs, and more—all through your AI assistant.
Table of contents
Related MCP server: android-emulator-mcp
Prerequisites
Python 3.9+
Android SDK with:
adbon your PATHemulatoron your PATH (for launching AVDs)
(Optional) An Android Virtual Device (AVD) for emulator tools
To check:
adb version
emulator -list-avdsInstallation
Clone or copy this project to a folder, e.g.
android_emulator_mcp.Install dependencies:
cd android_emulator_mcp pip install -r requirements.txtVerify the server loads:
python main.pyThe server runs over stdio: it will start and wait for JSON-RPC messages. Normal exit is when stdin closes (e.g. the client disconnects). Use Ctrl+C to stop. You don’t need to “run” it yourself when using Cursor, VS Code, etc.—they start it automatically using the config below.
How to start the server
When used by a client (Cursor, VS Code, Claude, Antigravity, etc.):
You do not start the server yourself. The client runs thecommand(e.g.python) with theargs(e.g. path tomain.py) you configure. The server process is started and stopped by the client.For local testing / debugging:
Run it in the terminal so it uses stdio and waits for input:cd /path/to/android_emulator_mcp python main.pyThen either close stdin (client disconnect) or press Ctrl+C to stop.
To test the protocol, use the official MCP inspector or another MCP client that can launch a stdio server.Path to Python:
Use the same executable your client will use. Examples:pythonorpython3if it’s on PATHFull path, e.g.
C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe(Windows) or/usr/bin/python3(Linux/macOS)
Replace any path below with your project path and Python path as needed.
Adding to clients
Cursor
The emulator server is already added to your Cursor config:
Global (all workspaces):
~/.cursor/mcp.json— contains the emulator server with path to this project.This project only:
.cursor/mcp.jsonin this repo — uses${workspaceFolder}/main.pywhen you open this folder in Cursor.
If you add it manually:
Open Cursor Settings → Features → MCP.
Click + Add New MCP Server.
Set:
Name:
emulator(or any name).Type:
stdio.Command:
python(or full path topython.exe).Args: path to
main.py, e.g.C:\Users\User\Documents\android_emulator_mcp\main.py
Save. Restart Cursor if the new server doesn’t appear.
Using the server to launch the emulator:
Restart Cursor (or reload the window) so it picks up
mcp.jsonand starts the emulator MCP server.Open Chat (Composer / Agent).
Ensure emulator (or its tools) appear under Available Tools. If not, check Settings → Features → MCP and that the server is enabled.
Ask the agent to use the emulator, for example:
“List my Android AVDs” → it can use
list_avds.“Launch the Android emulator for AVD <name>” → it can use
launch_emulatorwith the AVD name.“List connected devices” → it can use
list_devices.
You can approve tool calls when prompted or enable Auto-run for MCP tools in agent settings.
VS Code & Copilot
MCP is supported in VS Code 1.102+ with Copilot. Config can be workspace (.vscode/mcp.json) or user (via MCP: Open User Configuration).
Option A – Workspace (project-only)
Create
.vscode/mcp.jsonin your project.Add the emulator server:
{
"servers": {
"emulator": {
"type": "stdio",
"command": "python",
"args": ["C:\\Users\\User\\Documents\\android_emulator_mcp\\main.py"]
}
}
}Use ${workspaceFolder}/main.py if main.py is inside the workspace, e.g.:
"args": ["${workspaceFolder}/android_emulator_mcp/main.py"]Option B – User config (all projects)
Command Palette → MCP: Open User Configuration.
In the opened
mcp.json, add the sameservers.emulatorblock as above (adjust paths for your machine).
Option C – Command Palette
MCP: Add Server → choose stdio.
Command:
python(or full path).Args: path to
main.py.Choose Workspace or Global.
After adding, use Chat and ensure the emulator server (and its tools) are enabled in the tool picker. You may need to trust the server when prompted.
Google Antigravity
Antigravity uses a custom MCP config (e.g. Manage MCP Servers → View raw config → mcp_config.json). Add a stdio entry for this server.
In Antigravity, open the MCP Store (e.g. "..." at the top of the agent/side panel).
Click Manage MCP Servers → View raw config.
Edit
mcp_config.jsonand add an entry for the emulator server. Structure is usually a map of server names to configs; use the same pattern as other stdio servers in the file. Example:
{
"emulator": {
"command": "python",
"args": ["C:\\Users\\User\\Documents\\android_emulator_mcp\\main.py"]
}
}(or "type": "stdio" plus command / args if your Antigravity template uses that). Save and restart/reload MCP in Antigravity so it picks up the new server.
Claude Desktop
Open the Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Or: Settings → Developer → Edit Config in Claude Desktop.
Add the emulator under
mcpServers:
{
"mcpServers": {
"emulator": {
"command": "python",
"args": ["C:\\Users\\User\\Documents\\android_emulator_mcp\\main.py"]
}
}
}Use forward slashes or escaped backslashes in paths; no trailing commas. Restart Claude Desktop fully so the new server is loaded. Tools should appear (e.g. hammer icon) when the server is connected.
Other MCP clients
Most clients that support stdio MCP servers expect a config like:
Command: executable to run (e.g.
python,python3, or full path to Python).Args: list with the path to
main.py.
Generic pattern:
{
"mcpServers": {
"emulator": {
"command": "python",
"args": ["/absolute/path/to/android_emulator_mcp/main.py"]
}
}
}Or with type (if the client requires it):
{
"emulator": {
"type": "stdio",
"command": "python",
"args": ["C:\\Users\\User\\Documents\\android_emulator_mcp\\main.py"]
}
}Replace the path with your actual android_emulator_mcp path. Then point your client at this config (or merge this block into its MCP config).
Available tools
Tool | Description |
| Launch an AVD in the background |
| Kill the Android emulator |
| Use when emulator is hanging: kill, wait 25s, then cold boot (avoids PC freeze) |
| List available Android Virtual Devices |
| List connected devices/emulators |
| Install an APK on the device |
| Uninstall an app by package name |
| Launch an app by package (optional activity) |
| Tap at (x, y) coordinates |
| Swipe from one point to another |
| Type text on the device |
| Send key event (BACK, HOME, ENTER, etc.) |
| Execute multiple input actions in one call |
| Get UI XML tree (bounds, text, IDs) |
| Find and tap element by visible text |
| Launch via Deep Link (URI) |
| Set emulator GPS (lat, lng) |
| Get device screen resolution |
| Capture screenshot (optional scale 0.1–1.0) |
| Read logcat (optional filter) |
| Last N lines, filter by tag |
| Clear logcat buffer |
| Test emulator internet access |
| Memory/CPU usage |
| Record screen as MP4 |
| Pull file from device to host |
| Push file from host to device |
| Run arbitrary adb shell command |
Troubleshooting
“adb: command not found” / “emulator: command not found”
Add the Android SDKplatform-toolsandemulatordirectories to your PATH.PC or Cursor hangs when killing / launching emulator
What we fix: The server uses a timeout (8 s) foradb emu kill. If the emulator is hung, the command stops after 8 s and on Windows the server force-killsemulator.exe/qemu-system-*.exeso your machine doesn’t stay stuck. What we don't fix: The whole PC can still freeze from load. Killing then immediately cold-booting is very heavy; on 16 GB / i5 that often causes a hang. What to do: Userestart_emulator_cold_boot(avd_name)only—it kills, waits 25 s, then cold boots in one call. Do not call kill_emulator and launch_emulator separately or the PC may freeze. Close other apps first on 16 GB / i5.Server not showing in Cursor
Confirm the path tomain.pyin Args is correct and that python (or the full path) runsmain.pywithout errors. Restart Cursor and check Features → MCP for the server and any error state.VS Code: server not starting / not trusted
Run MCP: List Servers, select the emulator server, and use Show Output to see logs. Use MCP: Reset Trust if you need to be prompted to trust again.Claude Desktop: tools never appear
Restart Claude Desktop completely (quit and reopen). Ensure the config JSON is valid (no trailing commas). Check thatpythonand the path inargsare correct.Paths with spaces
Use quoted paths in configs where required. Forargs, a single string like"C:\\Users\\User\\Documents\\android_emulator_mcp\\main.py"is typical; avoid splitting the path across multiple args.
References
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/Amm-ar/android_emulator_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server