minano-computer-use
Windows desktop automation MCP server that drives apps through UIA control patterns, opt-in real keyboard/mouse input, or background window messages, with screenshot, recording, playback, process and system utilities — reporting submitted vs. verified results instead of assuming success.
window— list/find windows and controls, read full app state (control tree, focus/selection summary, optional screenshot), run UIA semantic actions and conditional waits; accepts HWND/PID/title targets and expiring node tokens.act— run ordered action batches in one call withinput_mode=uia(default),native, ormessage; supports set_value, invoke, toggle, select, expand, scroll, wait, plus native clicks, drags, keys, text, paste,look, and explicitfocus/force_focus.screenshot— desktop, monitor, window, or region capture; saves originals, defines a viewport, chooses capture backend and fallback policy, auto-scales (default 800px JPEG q75).record— bounded recording with timestamped montage, optional raw PNG frames and time index, local MP4 via PyAV.play— timed/scripted actions (hold W 0.2,look 40 0,shot) executed while recording.process— list/query processes, launch apps, wait for readiness, plus shell and termination only with startup and per-call authorization.system— service status, cancellation requests, display enumeration, pointer, clipboard, and viewport management.Safety/feedback model — UIA never silently falls back to real mouse; results are labeled
invoked/verified/refused/error/unknown/partial, password-like values are redacted, and screenshots/recordings may still contain sensitive content.
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., "@minano-computer-use Find the Notepad window, type hello into it, and take a screenshot"
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.
minano-computer-use
用于 Windows 桌面自动化的 MCP 服务,提供 UI Automation 控件操作、显式原生键鼠输入和后台窗口消息三条通道,以及应用状态、截图、录制、动作脚本、OCR 和进程管理。
默认直接操作控件,不移动真实鼠标;需要接管键鼠时,在调用中传入 native=true。动作提交、状态验证、失败和不确定结果分别报告,不把系统接受输入等同于任务成功。
环境要求
Windows,CPython 3.13。
uv:安装和运行 Python 工具。
支持本地 stdio MCP 的客户端。
MP4 编码与视频验证使用随依赖安装的 PyAV,无需另装
ffmpeg或ffprobe可执行文件。
当前限制为 CPython 3.13,因为 Windows 工作进程隔离使用了该版本的启动协议。不声明支持其他 Python 版本。
Related MCP server: mcp-winaccess
安装
uv tool install --python 3.13 "git+https://github.com/source-233/minano-computer-use.git"确保 uv 的工具目录在 PATH 中,然后检查安装:
uv tool update-shell
minano-computer-use --version这是 stdio MCP 服务,不是交互式终端应用。应由 MCP 客户端启动进程并调用工具,stdout 仅用于 MCP 协议。
配置 MCP 客户端
对于使用 mcpServers 配置的客户端:
{
"mcpServers": {
"minano-computer-use": {
"command": "minano-computer-use",
"args": [],
"env": {"PYTHONUTF8": "1"}
}
}
}对于 OpenCode:
{
"mcp": {
"servers": {
"minano-computer-use": {
"type": "local",
"command": ["minano-computer-use"],
"environment": {"PYTHONUTF8": "1"}
}
}
}
}若客户端找不到命令,将 command 中的可执行文件名替换为安装后的绝对路径。配置结构以对应客户端的文档为准。
七个工具
工具 | 用途 |
| 列举窗口、查找控件、读取完整应用状态,执行 UIA 语义操作与条件等待 |
| 顺序执行批量动作,默认自动返回操作后的画面或文字 |
| 桌面、显示器、窗口或局部截图,保存原图,定义 viewport |
| 有界录制、时间戳拼图,可选原始 PNG 帧及时间索引导出 |
| 按时间或脚本执行动作,同时录制 |
| 进程查询、启动、等待,以及独立授权的 shell 和进程终止 |
| 服务状态、取消、显示器、指针、剪贴板及 viewport 管理 |
具体参数以客户端取得的 MCP schema 为准。完整示例见 使用指南。
调用示例
以下 JSON 是对应工具的入参,不是终端命令。窗口句柄、控件名和 AutomationId 需要从实际窗口查询,不能照抄示例值。
查找窗口和控件
调用 window:
{"action":"list","details":true}{"action":"find","target":"hwnd:0x123456","query":"搜索","compact":true}目标可用明确的 HWND、PID 或唯一窗口标题;控件可用名称、AutomationId、控件类型或短期 token。多目标匹配默认拒绝,不悄悄选择第一项。
批量控件操作
调用 act,默认走严格 UIA:
{
"target":"hwnd:0x123456",
"actions":[
{"action":"set_value","selector":{"automation_id":"searchBox"},"value":"hello"},
{"action":"invoke","selector":"搜索"}
]
}支持填写、调用、勾选、选择、展开、滚动及等待。UIA 不支持某个操作时明确拒绝,不隐式回退为真实鼠标点击。
后台窗口消息
对于接受 Win32 窗口消息、但没有合适 UIA 接口的应用,可显式调用 act 的后台通道:
{
"target":"hwnd:0x123456",
"input_mode":"message",
"actions":[
{"action":"set_value","recipient":"hwnd:0x123457","value":"hello"}
]
}recipient 是目标窗口自身或同进程子控件的句柄。后台通道不调用真实键鼠或聚焦 API;应用收到消息后仍可能自行激活窗口,因此不能保证任何应用都绝不抢焦点。消息提交成功只代表 invoked,不等于应用已消费;支持的标准输入框完整值写入可通过回读确认。
input_mode 可选 uia、native、message,显式指定即选择本次通道;省略时仍按原有 native 参数决定。不要把 native=true 与 input_mode="message" 混用。后台通道不支持相对转头、聚焦或剪贴板粘贴,也不会失败后切到真实键鼠。
一次获取应用状态
调用 window:
{
"action":"state",
"target":"hwnd:0x123456",
"include_ax":true,
"include_screenshot":true,
"capture_mode":"window",
"allow_fallback":false
}一次返回同一窗口的控件树、可用动作、目标内焦点/选区摘要和可选截图。rich=true 还可用于控件发现与检查,提供位置、类别、原生句柄等信息;不可读取的属性会明确标注,不以空值冒充已确认状态。结构化结果中的密码文字和值会脱敏;截图仍可能包含应用绘制的敏感内容,文字脱敏不等于图片遮盖。
这不是原子快照:UIA 和图像有各自的时间与错误。任一组件失败会保留另一组件并报告部分结果,不把不同窗口或不同时刻的数据冒充同帧状态。
capture_mode 和独立截图工具相同;示例明确选择窗口后端。省略时仍读取屏幕合成画面,可能包含遮挡,不为取图自动激活窗口。
宿主窗口与 UIA 控件可以属于不同进程:仅在实时 UIA 祖先链能连回宿主,并找到
由控件进程持有的原生子窗口锚点时支持;宿主与控件进程生命周期分别校验。
没有可靠原生锚点、进程身份不可读或 UIA 根与目标窗口不一致时仍明确拒绝,
不按 ApplicationFrameHost.exe 等进程名放行,也不保证所有 UWP/provider 拓扑。
动作回执与详细反馈
原生动作提供投递回执,区分请求、实际构造的事件、系统接受数量与应用消费。键盘回执可包含实际目标、扫描码、按下/松开提交、投递间隔与清理结果;不回显文本或剪贴板内容。
act / play 默认 feedback="compact"。需要输入上下文时显式设置 feedback="detailed":工具只读报告可取得的前台、目标线程输入布局、IME 关联和修饰键信息,不可得的状态明确为未知。它不会切换输入法、释放用户的键或判断远程软件正在拦截。
反馈是带时间的非原子观察,不证明游戏消费了输入。观察失败不覆盖已有动作结果,也不自动重放动作;consumption_verified=false 表示未确认消费,不表示已证明未消费。UIA 归属拒绝提供有界的失败阶段和检查原因,不发布失效元素的文字。
公开结果中 process_creation_time 使用十进制字符串(不可得时为 null),避免 JavaScript 大整数舍入。不要先转换为 Number 再比较;内部目标绑定仍使用精确整数。
原生键鼠输入
同样调用 act,传入 native=true 即可,无需修改启动参数:
{
"target":"hwnd:0x123456",
"native":true,
"actions":[
{"action":"force_focus"},
{"action":"hold","key":"W","seconds":0.2},
{"action":"look","dx":40,"dy":0}
]
}原生输入会影响真实键鼠,要求目标位于前台。只有显式 focus / force_focus 才会尝试激活窗口。支持点击、双击、拖拽、多鼠标按钮、滚动、组合键、长按、文本及粘贴;批次结束会尝试释放本工具持有的输入。
自动反馈和图片大小
act 默认 screenshot="auto":原生动作后返回截图,UIA 后返回有界控件文字,后台消息后返回同一目标的组合状态及可得截图。优先复用本次返回的观察,不例行再调一次 screenshot;UIA 需要图片时在同次调用传 screenshot=true。false 关闭观察,"text" 只读取文字;观察可能失败或省略,不因此重放动作。
截图和整张录制拼图默认最长边 800px、JPEG quality75。可显式设置 max_dim、format 和 quality,max_dim=0 请求原尺寸。视频和原始帧导出保留来源分辨率,不受响应图片缩放影响。
原生坐标默认是物理屏幕像素。使用返回图片的像素坐标时,传 coordinate_space="image" 和对应 capture_id;桌面或显示器截图仍需另行指定接收输入的具体窗口。失效坐标、未知变换和越界点击会拒绝。
窗口 rect/截图 window_rect 的格式为 [left,top,right,bottom],不是宽高;
结果附格式与坐标空间标记。它们不同于图像内 surface_bounds。DPI 虚拟化窗口
矩形不能直接当作物理点击坐标;scale 仅描述裁剪后图像到响应图的缩放,不能
拿 dpi/96 猜换算。物理点击只使用明确可得的 physical_transform。
动作与录制
调用 play:
{
"target":"hwnd:0x123456",
"native":true,
"seconds":2,
"script":"hold W 0.2\nlook 40 0\nwait 0.2\nshot"
}也可传带 at 时间戳的 actions,与 script 二选一。record 只采样而不执行动作。输出包含拼图和本地 MP4 路径;编码不可用时明确返回警告,不伪造视频成功。
视频由独立 Python 工作进程调用 PyAV 编码为 H.264/MP4;取消或超时会停止并回收工作进程,不让底层编码调用永久阻塞 MCP。PyAV 绑定 FFmpeg 动态库,但不调用外部 ffmpeg.exe。为兼容 yuv420p,奇数宽高只在视频右侧/底部补边,不改变截图点击坐标。
权限与安全边界
UIA 默认不抢焦点,但目标应用的 provider 仍可能自行激活窗口,不能承诺绝无副作用。
输入通道逐调用选择:默认 UIA;
native=true或显式input_mode="native"才使用真实键鼠。后台消息必须显式选择input_mode="message",不能隐式降级。shell 与外部进程控制默认关闭:分别需要启动参数
--allow-shell/--allow-process-control,以及单次调用的对应许可。window.close也受进程控制许可约束。system.cancel不等待长调用执行锁;取消请求被接受不等于动作已撤销或松键已完成,应检查最终结果。写动作超时可能已经生效,返回不确定状态,不自动重放;批次不是事务,不提供回滚。
剪贴板粘贴只保留 Unicode 文本;仅当剪贴板序号未被其他应用改变时恢复,不承诺保留全部富文本或图片格式。
截图、视频和显式命令输出可能含敏感信息。制品保存在本地,可用
--output-dir指定目录;配额仅清理本工具分配并登记的文件。不安装输入驱动,不自启动,不进行后台遥测。显式授权的命令仍具有当前 Windows 用户权限,权限开关不是安全沙箱。
结果区分 invoked(已提交)、verified(后置状态已确认)、refused、error、unknown 和 partial。SendInput 或窗口消息提交成功不证明目标应用消费了输入。
截图后端与兼容性
默认读取屏幕合成画面,可能包含遮挡。窗口截图支持 PrintWindow 和可选 Windows Graphics Capture(WGC);不自动激活窗口,屏幕回退须明确允许。
WGC 可在从源码安装依赖时选装:
uv sync --python 3.13 --extra wgc各后端的可用性取决于 Windows、目标应用和运行环境;结果会报告实际后端及失败原因。UIA 只适用于暴露可访问控件的应用,游戏或自绘界面通常需要原生输入。动作与采样不是硬实时,也不保证严格的动作/游戏帧配对。
开发与验证
git clone https://github.com/source-233/minano-computer-use.git
cd minano-computer-use
uv sync --python 3.13
uv run ruff check .
uv run ruff format --check .
uv run pytest -q
uv run python scripts/smoke_stdio.py
uv run python scripts/verify_recording.py
uv run python scripts/verify_playback.py
uv run python scripts/verify_pyav.py
uv build专项验证分别覆盖自有 Win32 控件、窗口截图、合成视频及连续帧,不把单测等同于任意应用的兼容性证明。
许可证
原创代码以 MIT 许可发布;Windows 子进程启动器的 CPython 适配部分保留 PSF 许可,详见 第三方声明 和 CPython 许可证。
视频依赖 PyAV 及其 wheel 所含的编码库。依赖的许可证独立于本项目源码;重新分发这些二进制库时,应同时核对并遵守其 FFmpeg/x264 等组件的许可与声明,不能把包含 libx264 的构建一概视为纯 LGPL。
Available Tools
7 toolsactBDestructive
Run ordered actions with uia, native, or background message input_mode.
Omitted input_mode preserves native=false/true. Explicit native or message mode opts in alone; native=true conflicts with explicit uia/message.
Explicit native force_focus restores/attaches input threads and verifies the exact foreground HWND; focus keeps conservative SetForegroundWindow behavior. Neither is automatically used before keyboard or mouse actions. Auto feedback returns full state for message, an image for native, text for UIA; screenshot=false disables feedback. Observation does not verify game effects. feedback=compact/detailed controls native receipt/context metadata only, independently of screenshot; it does not select another input channel.
Inputs: actions (required), focus, native, target, +11 more.
playCDestructive
Timed actions (at seconds) alongside capture; no strict frame/action pairing.
feedback=compact/detailed controls native receipt/context metadata only; it never changes input mode or recording behavior.
Inputs: fps, probe, format, native, +17 more.
processCDestructive
Process inventory, launch and waits; shell/control require startup AND call opt-ins.
Inputs: all, cwd, dir, exe, +17 more.
recordCRead-only
Bounded screen recording and timestamped montage; no focus activation.
Inputs: fps, format, region, target, +10 more.
screenshotCRead-only
Return a screen-composite MCP image, separately from JSON metadata.
Inputs: save, format, region, target, +10 more.
systemC
Read status/displays or request cancellation (acceptance is not cleanup).
Inputs: name, text, action.
windowCDestructive
List/read windows or use semantic UIA patterns; never physically falls back.
state accepts capture_mode/allow_fallback for its independent image component; defaults remain screen/false. No focus activation; components are non-atomic. include_tokens=True adds bounded, expiring node tokens usable by later UIA actions. UIA set_value writes once, then checks that same live element for at most 600ms within the remaining call deadline; it never searches again or repeats the write.
Inputs: nth, rich, role, depth, +30 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool nominally has a lane (read windows/UIA vs. run actions vs. timed actions vs. capture vs. process vs. system), but the boundaries blur: `window`'s state can capture images, `act` auto-returns screenshots, `play` runs actions alongside capture, and `screenshot`/`record` also capture. The dense, caveat-heavy descriptions (fallback modes, feedback flags, focus behavior) add precision about options but make it harder to decide at a glance whether to use `act` or `play` for a given sequence.
All names are single lowercase words with no prefixing scheme, so the format is uniform and predictable. The only inconsistency is grammatical role — nouns (`window`, `process`, `system`) mixed with verbs (`act`, `play`, `record`) — which is minor but slightly weakens the verb_noun predictability.
Seven tools is a well-scoped surface for a computer-use/automation server: input, observation, capture, recording, timing, process control, and system status each get one entry point. Nothing appears redundant enough to be a pure duplicate.
The surface covers the core loop of observe (window/screenshot/record), act (act/play), and environment management (process/system, including cancellation). Minor gaps exist — no explicit clipboard, text-input, or app-level lifecycle tool beyond launch, and no dedicated cleanup/teardown given that cancellation acceptance 'is not cleanup'.
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
Turn any work into an API. Agents use any software through the screen, each on its own desktop.
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables local Windows UI automation and screen capture, targeting windows that are difficult to automate such as games and legacy apps, with tools for window management, mouse and keyboard input, and desktop capture.8-

mcp-winaccessofficial
FlicenseNot gradedqualityBmaintenanceEnables Windows desktop automation and screen interaction through coordinate-based and UI-automation strategies, supporting screenshots, clicks, typing, application launching/termination, window management, text reading, log reading, and build automation.-- AlicenseNot gradedqualityBmaintenanceEnables Windows agents to control desktop applications and isolated Chromium sessions through a unified computer tool, supporting discovery, observation, input, window management, browser automation, and sequencing actions.1,129 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to inspect Windows desktop UIs through compact UI Automation snapshots with stable element IDs and to execute batched mouse, keyboard, window, and wait/assert actions without relying on screenshot loops.2MIT