# ascript-mcp

Connects AI assistants to physical Android and iOS devices. Helps inspect mobile screens, verify UI selectors, and run automation scripts without iOS jailbreak.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: ascript-cn
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ascript-cn/ascript-mcp
- Updated: 2026-04-30
- HTML: https://affpapa.org/en/nevibecode/mcp/ascript-mcp

## What it does

The server equips AI tools with actions to inspect mobile devices and query AScript documentation. Your assistant can capture screenshots, pull the UI element hierarchy, run OCR scans, and compare pixel colors on screen. It also searches AScript modules and online plugins like YOLO or HID.

For iterative development, the `eval_python` tool executes code directly inside the mobile app runtime within milliseconds. The server handles project creation, file transfers, and debugging sessions over ADB with automatic forwarding for port 5678. On iOS, device interaction functions without jailbreak or app resigning.

Hardware checks such as memory and battery stats via `get_device_status` work exclusively on Android. Running automation requires the AScript client application installed on the target phone along with the needed Python packages.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ascript-mcp -- uvx ascript-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ascript-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add ascript-mcp -- uvx ascript-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ascript-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ascript-mcp": {
            "command": "uvx",
            "args": [
                "ascript-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from ascript-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ascript-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "ascript-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from ascript-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ascript-mcp uvx ascript-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ascript-mcp <command>

## When to use it
- inspect UI hierarchy trees and validate mobile element selectors
- execute Python test snippets on mobile devices using a live REPL
- extract on-screen text with OCR and run pixel color comparisons
- deploy automation scripts and start remote debugging over ADB

## Example prompts
- Take a screenshot of the connected phone and dump the current UI tree.
- Search the AScript documentation for swipe actions and test the snippet using eval_python.
- Scan the local network for devices and list their installed Python packages.

## Similar
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 10025
- [mobilerun](https://affpapa.org/en/nevibecode/mcp/mobilerun.md) — MCP server · ★ 9833
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11962
- [XcodeBuildMCP](https://affpapa.org/en/nevibecode/mcp/xcodebuildmcp.md) — MCP server · ★ 6511
- [ShipSwift](https://affpapa.org/en/nevibecode/mcp/shipswift.md) — MCP server · ★ 3244
- [agent-device](https://affpapa.org/en/nevibecode/mcp/agent-device.md) — MCP server · ★ 5158

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
