前言¶
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