This repository is a proof-of-concept to drive an android phone via adb using the mcp protocol.
- Analyze UI components
- Take screenshot
- Type text
- Touch and Swipe input
- Launch apps
The setup is fairly easy given you have already an connected device and created an adb session.
nix run github:micartey/android-mcp
# Or if you have cloned the repository, you can run:
nix develop .#mcpAfterward, you have to configure the mcp server in your tool of choice. It needs to support SSE as the endpoint will be exposed to:
http://localhost:3134/sse
In case you want to use a VM instead of an actual android device, you need to start with creating one
- First we need to create a
qcow2image for our vm to boot later. This needs to be done with the following command
just create-qcow2-image-
For the next step we need the
isoimage from the android. -
Next, create a new VM and add the
isofile. Select theqcow2image as your drive. -
After starting, you need to install android. DO NOT choose the Live CD.
- Enable Debug Mode so that the device can communicate with adb
Now you can stop the VM.
First you want to start the VM
just vm-silentThen you will need to run a slightly different command as this will also take care of connecting via adb
nix develop .#vm