sky-lite-desktop
Windows 桌面 GUI 自动化,以 MCP stdio 服务形式提供给 AI 调用。
底层用三件系统能力组合:UI Automation(读界面结构与元素)+ SendInput(合成鼠标键盘)
- PrintWindow(截屏;装了可选扩展时优先用 Windows.Graphics.Capture)。
安装
无需手动安装依赖,MCP 宿主通过 uvx 拉起即可:
uvx --from sky-lite-desktop sky-lite-mcp
或本地安装后运行:
pip install sky-lite-desktop
sky-lite-mcp
需要 Windows 10 1809+ / Python 3.10+。默认只装 2 个依赖(uiautomation + pillow), 安装体积约 16 MB。
可选:游戏 / 视频画面捕获
默认的 PrintWindow 后端对普通窗口够用,但 DirectX 独占全屏(游戏)会抓到黑屏。 需要捕获游戏或视频画面时,装 WGC 扩展:
uvx --from "sky-lite-desktop[wgc]" sky-lite-mcp
WGC 依赖 windows-capture,而它会把 opencv + numpy(约 152 MB)一并装进来——
这是本包默认不带它的原因。不装也不影响其他功能,代码会自动回退。
工具
13 个桌面操作方法 + 5 个定时与画布方法,共 18 个:
观测 list_apps list_windows get_window get_window_state
输入 click type_text press_key scroll set_value drag
perform_secondary_action activate_window
定时 hold_keys sequence mouse_move
画面 capture_frames compare_shots
实现说明
- MCP 协议层自行实现(
sky_lite/_mcp_stdio.py,纯标准库)。官方mcpSDK 会把 pydantic、cryptography、pywin32、starlette、uvicorn 等约 30 MB 的依赖带进来, 而本服务只用 stdio 传输,那些重量都在 HTTP/SSE 与鉴权侧。 需要官方 SDK 时可装[sdk]扩展,入口为sky-lite-sdk。 - 支持
initialize/tools/list/tools/call/ping/notifications/*, 超出范围的方法返回-32601,不会让进程退出。
安全设计
- 硬拒绝清单:终端/shell、锁屏与 UAC、安全软件、密码管理器、Windows 键组合 在工具层直接拒绝,不依赖模型自觉。
- 双重确认:高危动作(删除/发送/支付/安装/授权等)需要显式
confirm=true, 代码侧对危险动词做机械兜底。 - 纯本地:不联网、不上传截图与文本、不需要账号凭证。策略配置存于
~/.sky-lite/policy.json,可自行增删拒绝项。
限制
仅 Windows;需要可交互桌面会话(锁屏 / RDP 断开时不可用);自绘界面没有可访问性树,
只能用坐标加连拍比对;游戏画面需装 [wgc] 扩展。
许可
MIT
Metadata
Release files for sky-lite-desktop 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sky_lite_desktop-1.0.1.tar.gz | 44.9 kB | Without provenance | Details for sky_lite_desktop-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sky_lite_desktop-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for sky_lite_desktop-1.0.1-py3-none-any.whl |
Total release size: 93.0 kB
Release files / sky_lite_desktop-1.0.1.tar.gz
| Download URL | sky_lite_desktop-1.0.1.tar.gz |
|---|---|
| Size | 44.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8488076c39752c9e17beb665bfbdcc99594cc352904a612366ad22abb5c6dac
|
|
BLAKE2b-256 checksum How to use checksums |
7bf385cb9edccadce5d7183e0b86a8b29f62d081bc663de531db40fddce18e5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sky_lite_desktop-1.0.1-py3-none-any.whl
| Download URL | sky_lite_desktop-1.0.1-py3-none-any.whl |
|---|---|
| Size | 48.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dd0453684c7168ee2d8b81e8f39cd7bceddd467034d6eda18d5c502f6b9a690
|
|
BLAKE2b-256 checksum How to use checksums |
dcd5ec06e2acfa66f648fbbcce9a10de761ed0e251407d8750565656813b0f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for sky-lite-desktop 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.