dsh-desktop-mcp 1.2.0 → 1.2.1

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.
Files changed (2) hide show
  1. package/README.md +53 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,40 +1,75 @@
1
1
  # dsh-desktop-mcp
2
2
 
3
- 给 **DeepSeek Harness** 用的 Windows 桌面自动化:截屏、Win32 输入、窗口控制,
4
- 外加一条 **UIA 无障碍树**的路 —— 按控件点名操作,不用看图猜坐标。
3
+ **先说明白它是什么**:本体是一个**标准 MCP 服务器**([`desktop-mcp`](https://github.com/Jestions-dev/Desktop-MCP)),
4
+ 任何 MCP 客户端都能直接用 —— Claude Desktop / Code、Cursor、以及 DSH。
5
+ 本仓库这个 npm 包只是一个**配置型外壳**:不含业务代码,只负责把那台服务器挂进 DSH。
5
6
 
6
- 这个包本身是一个**壳(配置型 bundle)**:它不含任何业务代码,只负责把
7
- [`desktop-mcp`](https://github.com/Jestions-dev/Desktop-MCP) 这个 **标准 MCP 服务器**
8
- 挂进 DSH;工具由那边提供,协议是 MCP,所以同一套引擎 Claude Desktop / Code、Cursor 也能用。
7
+ 所以下面分两条路:**先讲通用 MCP,再讲 DSH 插件**。两条路装的是同一套引擎、同一批工具。
9
8
 
10
- ## 装之前
9
+ ---
11
10
 
12
- 目标机器上要有 **Python 3.10+**(命令名 `python` 在 PATH 里),然后:
11
+ ## 一、通用 MCP(任何客户端)
12
+
13
+ ### 前置条件
13
14
 
14
- ```sh
15
- pip install mss pillow uiautomation
16
- pip install git+https://github.com/Jestions-dev/Desktop-MCP
15
+ ```
16
+ 系统 Windows(Win32 API + UIA,其他平台跑不了)
17
+ Python 3.10+,命令名 python 在 PATH 里
18
+ 依赖 pip install mss pillow uiautomation
19
+ 本体 pip install git+https://github.com/Jestions-dev/Desktop-MCP
17
20
  ```
18
21
 
19
- 验证一下(任意目录):
22
+ 验证(任意目录):
20
23
 
21
24
  ```sh
22
25
  python -m desktop_mcp.server
23
26
  ```
24
27
 
25
- 打印 `[desktop-mcp] v1.1.0 就绪(24 个工具)` 就成了,`Ctrl+C` 退出。
28
+ 打印下面这行就成了,`Ctrl+C` 退出:
29
+
30
+ ```
31
+ [desktop-mcp] v1.2.0 就绪(24 个工具);观察框:按需启动(Electron 子进程)
32
+ ```
33
+
34
+ ### 接入客户端
26
35
 
27
- ## 装插件
36
+ 任何支持 stdio 的 MCP 客户端,配置都长这样:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "desktop": {
42
+ "command": "python",
43
+ "args": ["-m", "desktop_mcp.server"],
44
+ "env": { "PYTHONIOENCODING": "utf-8" }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ - Claude Desktop 放 `claude_desktop_config.json`;Claude Code 用 `claude mcp add` 或 `~/.claude.json`
51
+ - `PYTHONIOENCODING` 别省 —— 默认 GBK 时 `tools/list` 会在「⚠」这类字符上崩
52
+ - 想用别的解释器就写绝对路径;**Windows 上建议用 `"command": "C:/Python313/python.exe"` 这种正斜杠写法**
53
+
54
+ ---
55
+
56
+ ## 二、DSH(插件版)
57
+
58
+ DSH 的内置 MCP 客户端只支持 stdio,所以插件壳走的是「启动一个 python 子进程」这条路。
28
59
 
29
60
  ```sh
30
61
  dsh plugin --profile <你的 profile> add dsh-desktop-mcp
31
62
  ```
32
63
 
33
- `<profile>`:`dsh web` 用 `web`,桌面应用用 `desktop`。
64
+ `<profile>`:`dsh web` 用 `web`,桌面应用用 `desktop`。装完**重启 DSH** —— 运行中的进程持有内存里的旧插件树。
65
+
66
+ ### 缺依赖不会报错,只会静默没有工具
34
67
 
35
- 装完**重启 DSH**——运行中的进程持有内存里的旧插件树。
68
+ 插件里 `failOnStartupError: false`:python 起不来、或者缺 `mss` / `pillow` / `uiautomation`
69
+ 时,**DSH 照常启动,只是 `desktop_` 那些工具一个都不出现**。所以工具不见了先跑一次
70
+ `python -m desktop_mcp.server` 看真实报错,别在插件配置里找。
36
71
 
37
- ## 想换解释器 / 加参数
72
+ ### 想换解释器 / 加参数
38
73
 
39
74
  **覆盖 bundle 里的行,直接写同 id 的行 —— 不要用 `insert`。**
40
75
 
@@ -51,6 +86,8 @@ dsh plugin --profile <你的 profile> add dsh-desktop-mcp
51
86
  patch 对同 id 是**整块替换 config**;写成 `insert:` 会再插一行,结果同一个 id 出现两次
52
87
  (实测踩过:dump 出来两份,MCP 服务器被拉起两个)。
53
88
 
89
+ ---
90
+
54
91
  ## 装完看到什么
55
92
 
56
93
  工具表里多出 `desktop_` 开头的一批(serverName 是 `desktop`):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-desktop-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
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
5
  "license": "MIT",
6
6
  "type": "module",