前言¶
DSH 的理念是“一切皆插件”。在 Windows 桌面开发里,AI agent 经常需要知道用户当前看到哪个窗口、哪个 UI 元素,或哪块屏幕区域。手动描述界面成本高,让模型直接猜 UI 状态也不够稳。Little Mouse Pointer 针对这个问题:用户先用鼠标选择目标,插件再通过 UI Automation、截图和本机 OCR 生成上下文,并在确认后通过 MCP 提供给 OpenAI Codex、DeepSeek Harness 或其他兼容客户端。
这是什么¶
Little Mouse Pointer 是一个面向 AI agent 的 Windows 桌面 UI context picker,由 Fish121380 维护,MIT 许可。仓库地址是:
https://github.com/Fish121380/auto-mouse
它的插件目录在:
plugins/little-mouse-pointer
简单来说,它把“鼠标选择窗口、UI 元素或屏幕区域”变成一套可确认的 MCP 上下文,供 DSH 或兼容客户端调用。
核心功能¶
下面介绍已确认的能力。
- Windows 桌面 UI context picker。
- 用鼠标选择窗口、UI 元素或屏幕区域。
- 通过 UI Automation、截图和本机 OCR 获取上下文。
- 用户确认后,通过 MCP 提供给 OpenAI Codex、DeepSeek Harness 或其他兼容客户端。
- 提供 MCP 工具:
ui_context_pickui_context_currentui_context_clear- 提供符合 Harness
dsh.bundle规范的安装包。 - 自动定位携带的 Windows x64 exe,并注册
@deepseek-ai/dsh-mcp-client。
安装与启用¶
Harness bundle 安装¶
如果是 DeepSeek Harness 场景,先执行下面的命令安装固定 tag 的 bundle,再 dump 配置检查:
dsh plugin --profile demo add github:Fish121380/auto-mouse#v0.1.1
dsh --profile demo --dump-config
经过上面的步骤,bundle 会定位自己携带的 Windows x64 exe,并注册 @deepseek-ai/dsh-mcp-client。它只适用于 Windows x64。
Codex 安装¶
Codex 场景下,按仓库 README 的说明替换 OWNER/REPOSITORY 为实际 GitHub 仓库:
codex plugin marketplace add OWNER/REPOSITORY --ref main
codex plugin add little-mouse-pointer@auto-mouse
如果只需要下载插件目录,可以使用 GitHub release zip,或本地安装 plugins/little-mouse-pointer 这一层。不要把仓库根目录误当成直接插件根目录。
MCP stdio 手动接入¶
如果手动接入 MCP stdio,必须直接启动下面的可执行文件:
plugins/little-mouse-pointer/app/MousePointer.Windows.exe
不要把 run.ps1 作为 MCP stdio bridge。run.ps1 只用于手动启动 GUI 和 self-test。
典型用法¶
使用流程可以按下面几步理解:
1、在 Codex、DeepSeek Harness 或其他兼容客户端中启用该 MCP 插件。
2、用鼠标选择窗口、UI 元素或屏幕区域。
3、插件通过 UI Automation、截图和本机 OCR 生成上下文。
4、用户确认后,客户端通过 MCP 工具读取上下文。
对应 MCP 工具为:
ui_context_pick
ui_context_current
ui_context_clear
如果端口需要调整,可以在 profile 的 cordis.patch.yml 中覆盖,例如:
- replace:
- id: little-mouse-pointer
config:
port: 49154
默认端口为 49153。endpoint 和 MOUSE_POINTER_HTTP_PORT 必须一致。
适用场景与注意事项¶
适合在 Windows x64 环境中,给 AI agent 补充“用户当前选择的桌面 UI 上下文”的场景。使用前注意下面几点:
- 只适用于 Windows x64。
- 不需要安装 .NET,发行包已经 self-contained。
- 保留
plugins/little-mouse-pointer/app的全部文件。 - Codex/Harness 运行前关闭旧的 Little Mouse Pointer 实例。
- 默认端口为
49153,endpoint和MOUSE_POINTER_HTTP_PORT必须一致。 - 不要把
run.ps1当 MCP stdio bridge。 - 插件以当前
dsh进程权限运行,会读取 UI Automation、截图和本机 OCR 结果;安装前建议检查源码、配置和 MIT 许可证。 - DeepSeek Harness 手工 Cordis 配置可参考:
plugins/little-mouse-pointer/docs/deepseek-harness.md
链接¶
- GitHub 仓库:
https://github.com/Fish121380/auto-mouse
- 插件目录:
plugins/little-mouse-pointer
- 新手教程:
plugins/little-mouse-pointer/docs/getting-started.md
- DeepSeek Harness 配置:
plugins/little-mouse-pointer/docs/deepseek-harness.md