Content
MCP
`AutoGo MCP` is a `stdio`-based MCP Server that exposes the AutoGo SDK and common ADB workflows to MCP-enabled clients.
## Feature Overview
- `run_project`: Run an AutoGo project on a specified device, supporting debug mode
- `read_project_logs`: Read incremental logs from a `run_project` session
- `stop_project`: Stop an AutoGo project on a device
- `sync_files`: Synchronize `so` and `assets` files in a project
- `connect_device`: Connect to a remote ADB device
- `list_devices`: List currently visible ADB devices
- `adb_command`: Execute custom ADB commands
- `get_screen_nodes`: Capture the current screen node tree and filter by conditions
## Environment Requirements
- Node.js 18 or higher
Go SDK
- ADB (optional; if not in `PATH`, needs to be explicitly specified)
## Installation and Usage
Recommended to start directly with `npx`:
```bash
npx -y autogo-mcp
```
## Environment Variables
- `AUTOGO_AG_PATH`: Path to AutoGo SDK
- Windows default: `C:\Users\Public\ag.exe`
- macOS default: `/Users/Shared/ag`
- `AUTOGO_ADB_PATH`: Path to ADB executable, optional
- `AUTOGO_DEFAULT_DEVICE`: Default device serial number or `ip:port`, optional
## MCP Client Configuration
### Minimal Configuration
If `ag.exe` is in the default path and `adb` is in the system `PATH`, you can configure it like this:
```json
{
"mcpServers": {
"autogo": {
"command": "npx",
"args": ["-y", "autogo-mcp"]
}
}
}
```
### Recommended Configuration
```json
{
"mcpServers": {
"autogo": {
"command": "npx",
"args": ["-y", "autogo-mcp"],
"env": {
"AUTOGO_AG_PATH": "C:\\Users\\Public\\ag.exe",
"AUTOGO_ADB_PATH": "C:\\Android\\platform-tools\\adb.exe",
"AUTOGO_DEFAULT_DEVICE": "192.168.1.100:5555"
}
}
}
}
```
### macOS Example
```json
{
"mcpServers": {
"autogo": {
"command": "npx",
"args": ["-y", "autogo-mcp"],
"env": {
"AUTOGO_AG_PATH": "/Users/Shared/ag",
"AUTOGO_ADB_PATH": "/opt/homebrew/bin/adb",
"AUTOGO_DEFAULT_DEVICE": "emulator-5554"
}
}
}
}
```
## Invocation Examples
### Run Project
```json
{
"device": "192.168.1.100:5555",
"projectPath": "C:\\path\\to\\autogo-project",
"debug": false
}
```
### Read Logs
```json
{
"sessionId": "run-2026-04-25T12-00-00-000Z-1",
"fromOffset": 0,
"limit": 200
}
```
## Local Development
```bash
npm install
npm run check
npm run build
npm start
```
See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for more development and release notes.
## License
[MIT](./LICENSE)