dsh-desktop-mcp 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,90 @@
1
- # Temporary Holding Version
1
+ # dsh-desktop-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 给 **DeepSeek Harness** 用的 Windows 桌面自动化:截屏、Win32 输入、窗口控制,
4
+ 外加一条 **UIA 无障碍树**的路 —— 按控件点名操作,不用看图猜坐标。
5
+
6
+ 这个包本身是一个**壳(配置型 bundle)**:它不含任何业务代码,只负责把
7
+ [`desktop-mcp`](https://github.com/Jestions-dev/Desktop-MCP) 这个 **标准 MCP 服务器**
8
+ 挂进 DSH;工具由那边提供,协议是 MCP,所以同一套引擎 Claude Desktop / Code、Cursor 也能用。
9
+
10
+ ## 装之前
11
+
12
+ 目标机器上要有 **Python 3.10+**(命令名 `python` 在 PATH 里),然后:
13
+
14
+ ```sh
15
+ pip install mss pillow uiautomation
16
+ pip install git+https://github.com/Jestions-dev/Desktop-MCP
17
+ ```
18
+
19
+ 验证一下(任意目录):
20
+
21
+ ```sh
22
+ python -m desktop_mcp.server
23
+ ```
24
+
25
+ 打印 `[desktop-mcp] v1.1.0 就绪(24 个工具)` 就成了,`Ctrl+C` 退出。
26
+
27
+ ## 装插件
28
+
29
+ ```sh
30
+ dsh plugin --profile <你的 profile> add dsh-desktop-mcp
31
+ ```
32
+
33
+ `<profile>`:`dsh web` 用 `web`,桌面应用用 `desktop`。
34
+
35
+ 装完**重启 DSH**——运行中的进程持有内存里的旧插件树。
36
+
37
+ ## 想换解释器 / 加参数
38
+
39
+ **覆盖 bundle 里的行,直接写同 id 的行 —— 不要用 `insert`。**
40
+
41
+ ```yaml
42
+ # ~/.dsh/profiles/<profile>/cordis.patch.yml
43
+ - id: desktop-mcp-bridge
44
+ config:
45
+ command: 'C:/Python313/python.exe'
46
+ args: ['-m', 'desktop_mcp.server']
47
+ env:
48
+ PYTHONIOENCODING: 'utf-8'
49
+ ```
50
+
51
+ patch 对同 id 是**整块替换 config**;写成 `insert:` 会再插一行,结果同一个 id 出现两次
52
+ (实测踩过:dump 出来两份,MCP 服务器被拉起两个)。
53
+
54
+ ## 装完看到什么
55
+
56
+ 工具表里多出 `desktop_` 开头的一批(serverName 是 `desktop`):
57
+
58
+ ```
59
+ 看 desktop_foreground_window desktop_list_windows desktop_screenshot
60
+ desktop_measure_window desktop_uia_snapshot desktop_monitors
61
+ 动 desktop_click desktop_move desktop_drag desktop_scroll
62
+ desktop_type desktop_press desktop_click_human
63
+ 按控件 desktop_uia_click desktop_uia_set_value desktop_uia_focus desktop_uia_wait_for
64
+ 窗口 desktop_focus_window
65
+ 观察框 desktop_highlight desktop_frame_start/stop/status
66
+ 杂项 desktop_wait desktop_clipboard desktop_launch(默认隐藏)
67
+ ```
68
+
69
+ ## 两条路,别用混
70
+
71
+ ```
72
+ 坐标路(截图 + 像素) 什么都看得见,但要眼睛估位置,窗口一动就得重看
73
+ 控件路(UIA 树 + 索引) 纯文本、精确、不动鼠标,
74
+ 但 Electron / Chromium(DSH 自己、VSCode、浏览器)
75
+ 常常只给窗框几个按钮 —— 那种窗口继续用截图
76
+ ```
77
+
78
+ 完整用法见主仓库的 [README](https://github.com/Jestions-dev/Desktop-MCP#readme)。
79
+
80
+ ## 出问题先看这两处
81
+
82
+ ```
83
+ 工具一个都没出现 python -m desktop_mcp.server 手动跑一下,看是不是缺依赖
84
+ (缺依赖不会拖垮 DSH:failOnStartupError 是关的)
85
+ 点不动 / 坐标偏 DPI 缩放。desktop_measure_window 能给分数坐标,比肉眼估准
86
+ ```
87
+
88
+ ## 许可
89
+
90
+ MIT
@@ -0,0 +1,48 @@
1
+ # dsh-desktop-mcp — bundle patch layer
2
+ #
3
+ # 这是一个**配置型 bundle**:它不提供任何 Host / Client 服务,只往 profile 里插一行
4
+ # MCP 客户端,让 DSH 去拉起 desktop-mcp 那个 Python 服务器。
5
+ #
6
+ # 为什么是壳而不是插件:
7
+ # desktop-mcp 本身是一个标准 MCP 服务器,Claude Desktop / Code、Cursor、DSH 都能用。
8
+ # 把它改写成 DSH 专有插件会丢掉「一套引擎、谁都能接」这件事,而且 UIA(COM)
9
+ # 和 SendInput 那层的细节在 Node 里得靠原生 addon 重做一遍。
10
+ #
11
+ # 前置条件(很重要):
12
+ # 这条行只负责 spawn,不负责装 Python。目标机器上需要有:
13
+ # · Python >= 3.10,并且在 PATH 里(命令名 `python`)
14
+ # · 依赖:pip install mss pillow uiautomation
15
+ # · 本体:pip install git+https://github.com/Jestions-dev/Desktop-MCP
16
+ # 装好之后 `python -m desktop_mcp.server` 在任意目录都能跑起来,所以这里不需要绝对路径。
17
+ #
18
+ # 想用别的解释器(比如某个 conda / venv)就覆盖这一行的 command / args:
19
+ #
20
+ # - id: desktop-mcp-bridge
21
+ # config:
22
+ # command: 'C:/Python314/python.exe'
23
+ #
24
+ # 工具会以 `desktop_` 前缀出现在模型的工具表里(serverName 决定命名空间)。
25
+
26
+ - insert:
27
+ - id: desktop-mcp-bridge
28
+ name: "@deepseek-ai/dsh-mcp-client"
29
+ config:
30
+ # 工具名前缀:desktop_screenshot / desktop_uia_snapshot / …
31
+ serverName: desktop
32
+ transport: stdio
33
+ command: python
34
+ args:
35
+ - "-m"
36
+ - "desktop_mcp.server"
37
+ env:
38
+ PYTHONIOENCODING: "utf-8"
39
+ # 截屏、UIA 树遍历、拖动这类操作本来就慢,给足时间
40
+ toolCallTimeoutMs: 120000
41
+ # 缺 Python / 缺依赖时不要让整个 profile 起不来:
42
+ # 界面上只会显示这个服务器连不上,DSH 本身照常启动
43
+ failOnStartupError: false
44
+ reconnect:
45
+ enabled: true
46
+ initialDelayMs: 500
47
+ maxDelayMs: 30000
48
+ maxAttempts: 10
package/icon.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,43 @@
1
1
  {
2
2
  "name": "dsh-desktop-mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.2.0",
4
+ "description": "Windows desktop automation for DeepSeek Harness — screenshots, Win32 input, window control, and a UIA accessibility-tree path, bridged from the desktop-mcp Python MCP server through DSH's in-box MCP client.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "files": [
8
+ "cordis.patch.yml",
9
+ "README.md",
10
+ "icon.png"
11
+ ],
12
+ "keywords": [
13
+ "dsh",
14
+ "dsh-plugin",
15
+ "deepseek-harness",
16
+ "mcp",
17
+ "model-context-protocol",
18
+ "windows",
19
+ "desktop",
20
+ "automation",
21
+ "computer-use",
22
+ "ui-automation",
23
+ "uia",
24
+ "screenshot"
25
+ ],
26
+ "engines": {
27
+ "node": ">=22"
28
+ },
29
+ "dsh": {
30
+ "bundle": {
31
+ "patch": "./cordis.patch.yml"
32
+ }
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/Jestions-dev/Desktop-MCP.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/Jestions-dev/Desktop-MCP/issues"
40
+ },
41
+ "homepage": "https://github.com/Jestions-dev/Desktop-MCP#readme",
42
+ "icon": "./icon.png"
43
+ }