# Android MCP server

> Provides deep diagnostic and forensic capabilities for Android devices using ADB to investigate crashes, memory leaks, and system performance.

- Repository: https://github.com/us-all/android-mcp-server
- Page: https://hostedmcp.org/servers/us-all/android-mcp-server
- Transport: stdio
- Stars: 16
- License: MIT
- Latest version: 1.14.4

## Install

### Claude Code

```sh
claude mcp add android-mcp-server -- npx -y @us-all/android-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "android-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@us-all/android-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "android-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@us-all/android-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"android-mcp-server","type":"stdio","command":"npx","args":["-y","@us-all/android-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "android-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@us-all/android-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add android-mcp-server -- npx -y @us-all/android-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.android-mcp-server]
command = "npx"
args = ["-y", "@us-all/android-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user android-mcp-server npx -- -y @us-all/android-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "android-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@us-all/android-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ADB_PATH` | no | no | Path to adb binary. Default: 'adb' on PATH. |
| `ANDROID_DISABLE` | no | no | Comma-separated category disablelist. |
| `ANDROID_HOME` | no | no | Android SDK root. Used to resolve adb if ADB_PATH not set. |
| `ANDROID_MCP_ALLOW_SHELL` | no | no | Set to 'true' to enable arbitrary shell command execution. Default disabled. |
| `ANDROID_MCP_ALLOW_WRITE` | no | no | Set to 'true' to enable write/destructive tools. Default read-only. |
| `ANDROID_SERIAL` | no | no | Default device serial when multiple devices are connected. |
| `ANDROID_TOOLS` | no | no | Comma-separated category allowlist. Default: all categories enabled. |

## FAQ

### Does it require Appium or uiautomator2?

No, it uses pure ADB via child_process without any additional mobile automation dependencies.

### How can I use this for crash investigation?

You can use the built-in crash-investigation prompt to pull crash logs, stack frames, and recent permission changes for a specific package.
