Skip to main content
Glama
ascript-cn
by ascript-cn

ascript-mcp

Chinese | English

PyPI License: MIT Python

AScript MCP Service — Allows AI programming tools (Claude Desktop / Cursor / Trae) to directly query AScript API documentation and control real Android / iOS devices (iOS requires no signing or jailbreaking).

Features

  • API Documentation Query: Module overview, API search, code examples, and environment setup guides

  • Online Plugin Query: Real-time query of the AScript plugin library (OCR, YOLO, HID, LLMs, etc.)

  • Device Interaction: Screenshots, UI trees, OCR, color finding, color comparison, and selector testing

  • Development & Deployment: Create projects, upload code, run, stop, and view logs

  • Device Management: LAN scanning, ADB scanning, and automatic connection

Related MCP server: magic-api-mcp-server

Installation

pip install ascript-mcp

Configuring Cursor

1. MCP Configuration

Create .cursor/mcp.json in the project root directory:

{
  "mcpServers": {
    "ascript": {
      "command": "python",
      "args": ["-m", "ascript_mcp.local"]
    }
  }
}

2. Rule Configuration

Copy the entire docs/AGENT_RULES.md into the .cursorrules (for Cursor) or CLAUDE.md / AGENTS.md (for Claude Code / other IDEs) in your automation project root.

This rule template includes:

  • 5-stage standard workflow (Observe → Select Strategy → eval_python iteration → Crop if necessary → Upload and Run)

  • Decision tree for API selection (UI controls → OCR → Image search → Color search)

  • Orchestration examples for common tasks like auto-login, check-in, and game combat

  • Anti-pattern list (guessing code, running without verification, hardcoding non-existent image paths, etc.)

Simplified rules (use only if you don't want to copy the full rules):

当用户需要编写设备自动化脚本(Android/iOS/Windows)时,必须先调用 ascript MCP 的
get_device_status 与 list_python_packages,再用 eval_python 在设备 REPL 里
验证关键代码片段,最后才 upload_file + run_project。
禁止凭记忆编写 ascript 代码。

Tool List

API Documentation (5)

Tool

Description

get_platform_overview

Get platform API module overview

get_module_apis

Get detailed module API documentation

search_api

Search for APIs by keyword

get_code_example

Get code examples

get_setup_guide

Get environment setup guide

Online Plugins (2)

Tool

Description

list_plugins

Query plugin library list

get_plugin_detail

Get detailed plugin documentation

Device Connection (5)

Tool

Description

auto_connect

Automatically connect to devices from project configuration

scan_devices

Scan LAN + ADB devices

connect_device

Manually connect to a specified device

get_device_status

Get full device running status (running mode/permissions/screen/battery/memory/running scripts, etc., Android only)

list_python_packages

List third-party Python libraries installed on the AScript App (Android + iOS)

Observation Interface (6)

Tool

Description

screen_capture

Capture device screen

dump_ui_tree

Get UI control tree

test_selector

Test if a selector matches

ocr

Screen text recognition

find_colors

Multi-point color search

compare_colors

Multi-point color comparison

Development & Deployment (7)

Tool

Description

create_project

Create a project on the device

upload_file

Upload files to the device (automatically creates project)

run_project

Run project

run_project_debug

Debug mode run (Android + ADB), automatically forwards port 5678 and returns VS Code attach configuration

stop_project

Stop project

get_run_log

Get running logs

eval_python

Device Python REPL (Android + iOS): Execute code directly in the main process to get results immediately, with a cycle of a few hundred milliseconds. Suitable for exploratory debugging, complex decision-making, and custom workflows (SoM/intelligent tap/auto-cropping templates, etc.). iOS automatically translates ascript.android.*ascript.ios.* and preloads cv2/np/Image. See AGENT_EVAL_GUIDE for details

File Management (2)

Tool

Description

list_projects

List projects on the device

get_project_files

Get project file tree

Online SSE Mode

If you need to deploy as a public service (API documentation query only):

uvicorn ascript_mcp.server:app --host 0.0.0.0 --port 8000

License

MIT License, see LICENSE for details. Copyright © 2026 Beijing Aoyue Technology Co., Ltd.

More Information

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to control mobile and desktop devices with natural language, including running automation tasks, taking screenshots, and managing devices.
    6
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Magic-API development environment, supporting script syntax query, API management, debugging, and knowledge search for efficient development.
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Enables Android device control via ADB and scrcpy, including device management, app management, file operations, shell commands, input simulation, screen mirroring, and UI element inspection.
    25
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables remote control of Android devices via ADB, including screen operations, input, app management, file transfer, and advanced tools like UI testing and performance analysis.
    24
    MIT

View all related MCP servers

Related MCP Connectors

  • AI agent tools for FreeAppStore: deploy status, SDK docs, app info, platform guide.

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Create, test, publish, and manage Dreamlit notification workflows from AI clients.

View all MCP Connectors

Latest Blog Posts

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/ascript-cn/ascript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server