Skip to main content

AScript MCP Service - 为大模型提供 ascript 自动化库 API 文档与设备交互服务

Project description

ascript-mcp

中文 | English

PyPI License: MIT Python

AScript MCP Service — 让 AI 编程工具(Claude Desktop / Cursor / Trae)直接查询 AScript API 文档、操控真实 Android / iOS 设备(iOS 免签免越狱)。

功能

  • API 文档查询:模块概览、API 搜索、代码示例、环境搭建指南
  • 在线插件查询:实时查询 AScript 插件库(OCR、YOLO、HID、大模型等)
  • 设备交互:截图、控件树、OCR、找色、比色、选择器测试
  • 开发部署:创建工程、上传代码、运行、停止、查看日志
  • 设备管理:局域网扫描、ADB 扫描、自动连接

安装

pip install ascript-mcp

配置 Cursor

1. MCP 配置

在项目根目录创建 .cursor/mcp.json

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

2. 规则配置

在项目根目录创建 .cursorrules 文件:

当用户需要编写设备自动化脚本(Android/iOS/Windows)时,必须使用 ascript MCP 工具连接设备、观察界面、查询 API 后再编写代码,禁止凭记忆编写 ascript 代码。

工具列表

API 文档(5 个)

工具 说明
get_platform_overview 获取平台 API 模块概览
get_module_apis 获取模块详细 API 文档
search_api 按关键词搜索 API
get_code_example 获取代码示例
get_setup_guide 获取环境搭建指南

在线插件(2 个)

工具 说明
list_plugins 查询插件库列表
get_plugin_detail 获取插件详细文档

设备连接(3 个)

工具 说明
auto_connect 从工程配置自动连接设备
scan_devices 扫描局域网 + ADB 设备
connect_device 手动连接指定设备

观察界面(6 个)

工具 说明
screen_capture 截取设备屏幕
dump_ui_tree 获取控件树
test_selector 测试选择器是否匹配
ocr 屏幕文字识别
find_colors 多点找色
compare_colors 多点比色

开发部署(5 个)

工具 说明
create_project 在设备上创建工程
upload_file 上传文件到设备(自动创建工程)
run_project 运行工程
stop_project 停止运行
get_run_log 获取运行日志

文件管理(2 个)

工具 说明
list_projects 列出设备上的工程
get_project_files 获取工程文件树

线上 SSE 模式

如需部署为公网服务(仅 API 文档查询):

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

License

MIT License,详见 LICENSE。Copyright © 2026 北京奥悦科技有限公司。

更多信息

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ascript_mcp-1.6.2.tar.gz (136.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ascript_mcp-1.6.2-py3-none-any.whl (141.7 kB view details)

Uploaded Python 3

File details

Details for the file ascript_mcp-1.6.2.tar.gz.

File metadata

  • Download URL: ascript_mcp-1.6.2.tar.gz
  • Upload date:
  • Size: 136.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ascript_mcp-1.6.2.tar.gz
Algorithm Hash digest
SHA256 e80473d7f4430c6b655bc47124314878271109e7885217c15469500f4e84597f
MD5 12b8b1058e6b1e47b670793a55e02150
BLAKE2b-256 5f5b5cca516ca27eb88fb4334aba57c95c5c60909928976327cd1a12ba458160

See more details on using hashes here.

Provenance

The following attestation bundles were made for ascript_mcp-1.6.2.tar.gz:

Publisher: publish.yml on ascript-cn/ascript-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ascript_mcp-1.6.2-py3-none-any.whl.

File metadata

  • Download URL: ascript_mcp-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 141.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ascript_mcp-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1a517f2162a05132d684639694aafcbe9241c995f34549f9096171dec0fa05d
MD5 f774f4e9966abaf84c06aba52a6171f3
BLAKE2b-256 0e1a38c9e3250c2f80b25387b47c20c02ff0bdcc8395abae27f9b8211eeb10e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ascript_mcp-1.6.2-py3-none-any.whl:

Publisher: publish.yml on ascript-cn/ascript-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page