Sky PC MCP Companion Safe
Provides tools for interacting with the Windows version of Sky: Children of the Light game, including window status checks, screenshots, local OCR screen reading, and optional game key presses and chat sending when permissions are enabled.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sky PC MCP Companion Safe check the game status and OCR what's on the screen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sky PC MCP Companion Safe
一个面向 Windows 版《Sky: Children of the Light / 光·遇》的本地 MCP 服务。它让支持 MCP 的 AI 客户端读取经过验证的游戏窗口、执行本地 OCR,并在用户明确开启权限后发送有限的游戏按键或聊天文本。
本项目参考了 Aevella/sky-pc-mcp-companion 所展示的使用场景,但采用 clean-room 方式重新实现,没有复制授权不明的原仓库源码。
与原型相比的主要改进
使用官方 MCP Python SDK v2,支持标准 stdio 与 Streamable HTTP。
同时校验窗口标题和进程名,避免只靠模糊标题控制错误窗口。
找不到游戏窗口时默认报错,不会静默截取整个桌面。
输入和聊天分别授权,默认均关闭。
按键白名单、禁止 Windows/Meta 键、按压最长 2 秒。
所有聚焦、按键和剪贴板操作串行执行,降低并发卡键风险。
恢复剪贴板前检查内容,避免覆盖用户刚复制的新数据。
LAN HTTP 必须提供 Bearer Token,并启用 MCP Host allowlist。
HTTP 请求体最大 256 KiB。
screenshot是正式工具名,同时保留take_screenshot兼容别名。不在工具结果中回显聊天正文。
pytest、Ruff 和 GitHub Actions CI。
Related MCP server: pc-control-agent
安装
需要 Windows、Python 3.10 或更新版本。
git clone https://github.com/ll13355154947/sky-pc-mcp-companion-safe.git
cd sky-pc-mcp-companion-safe
python -m venv .venv
.venv\Scripts\python -m pip install -e .需要 OCR 时,先安装 Windows 版 Tesseract 及中文语言包,然后执行:
.venv\Scripts\python -m pip install -e ".[ocr]"默认安全模式
默认只允许 status、screenshot、take_screenshot 和 read_screen。开启输入:
$env:SKY_MCP_ENABLE_INPUT="1"单独开启聊天:
$env:SKY_MCP_ENABLE_CHAT="1"聊天要求输入权限也已开启。不要在不受信任的客户端上开放这两项权限。
启动 stdio MCP
.venv\Scripts\sky-mcp-safe stdio客户端配置示例:
{
"command": "C:\\path\\to\\sky-pc-mcp-companion-safe\\.venv\\Scripts\\sky-mcp-safe.exe",
"args": ["stdio"]
}启动本机 Streamable HTTP
.venv\Scripts\sky-mcp-safe http端点为 http://127.0.0.1:9800/mcp,健康检查为 http://127.0.0.1:9800/health。
局域网模式
可直接双击 start-http-lan.bat。它会为本次启动生成随机 Token。客户端连接:
URL: http://电脑局域网IP:9800/mcp
Authorization: Bearer 启动窗口显示的Token不要通过路由器端口转发、反向代理或公网防火墙规则把它暴露到互联网。普通 HTTP 不提供传输加密, 因此局域网也必须是可信网络;跨网络访问请使用受控 VPN 或带 TLS 的反向代理。
工具
工具 | 默认可用 | 说明 |
| 是 | 权限、OCR 与窗口状态 |
| 是 | 仅截取验证后的游戏窗口 |
| 是 | 截图兼容别名 |
| 是 | 本地 OCR,不上传到云端 |
| 否 | 发送白名单内的有限游戏按键 |
| 否 | 打开聊天输入框 |
| 否 | 向已打开且已聚焦的聊天框粘贴文本 |
| 否 | 聚焦游戏、打开聊天并发送文本 |
窗口识别
默认要求进程名是 Sky.exe。如果实际安装不同,可配置逗号分隔列表:
$env:SKY_MCP_PROCESS_NAMES="Sky.exe,YourSkyExecutable.exe"
$env:SKY_MCP_WINDOW_TITLES="Sky: Children of the Light,光遇"只有在明确接受隐私风险时,才允许找不到窗口后截取显示器:
$env:SKY_MCP_ALLOW_MONITOR_FALLBACK="1"边界
本项目不读取游戏内存、不修改客户端、不破解协议,也不提供刷资源、自动跑图或代肝功能。 模拟输入仍可能受到游戏或平台规则限制;如果规则不允许,请勿开启输入功能。
开发
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest项目采用 MIT License。安全问题请阅读 SECURITY.md。
Available Tools
8 toolsopen_chatB
Open Sky chat when both input and chat permissions are enabled.
Inputs: backend. Returns: object
press_keyA
Press one allowlisted game key after verifying and focusing the Sky process.
Inputs: key (required), backend, duration_ms. Returns: object
read_screenA
Capture the verified Sky window and run local OCR.
Inputs: no named parameters. Returns: object
screenshotB
Capture only the verified Sky window and return a PNG image.
Inputs: no named parameters.
send_chatC
Focus Sky, open chat, paste a message, and optionally submit it.
Inputs: message (required), send, backend. Returns: object
statusA
Report permissions, OCR availability, and verified game-window status.
Inputs: no named parameters. Returns: object
take_screenshotB
Compatibility alias for screenshot.
Inputs: no named parameters.
type_textC
Paste into an already-focused, already-open Sky chat box.
Inputs: message (required), send, backend. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
screenshot and take_screenshot are literal duplicates (compatibility alias), creating direct ambiguity. read_screen overlaps significantly with screenshot since both capture the window, differing only in OCR output. open_chat vs send_chat also overlap since send_chat opens chat itself. Several tools have unclear boundaries.
Most tools follow a verb_noun pattern (press_key, open_chat, type_text, send_chat, read_screen), which is consistent. However, status uses a noun-only name, screenshot and take_screenshot mix a simple noun-verb with an explicit verb_noun alias, and there's inconsistency in how the capture intent is expressed (screenshot vs read_screen).
8 tools is a reasonable count for a screen-capture and input automation server. However, the presence of a duplicate alias (take_screenshot) artificially inflates the count, and the domain could arguably be served well with 5-6 distinct tools.
The surface covers the core lifecycle: status checking, capture, OCR reading, key input, and chat operations (open, type, send). Minor gaps exist—there's no tool for mouse input, clipboard management, or capturing the full screen rather than just the game window, but the stated scope appears centered on Sky gaming automation and is reasonably well covered.
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local, dependency-free MCP server that gives AI agents controlled access to the active Windows desktop, enabling automated interaction with applications through screenshots, clicks, typing, and window management.1-
- FlicenseNot gradedqualityDmaintenanceThis MCP server enables an AI agent to control a Windows PC through human-like interactions such as screen capture, OCR, mouse, keyboard, and navigation, without using shortcut APIs.-
- AlicenseNot gradedqualityDmaintenanceA Windows-only MCP server that gives AI models eyes and hands on a Windows machine, enabling file reading, screenshots, mouse/keyboard injection, and an auto-debug loop with a safety-focused watchdog for protected abort regions.MIT
- AlicenseNot gradedqualityCmaintenanceA Windows-only local MCP server that lets Codex/ChatGPT agents control the keyboard, operate foreground windows, and send input to applications and games running with administrator privileges.MIT