question-workbench-mcp 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  给**非 DeepSeek Harness** 客户端用的题目工作台插件。它是标准 **MCP(Model Context Protocol)服务器**,不依赖 DSH,可被 Codex、WorkBuddy 以及其他支持 MCP 的代理客户端调用。
4
4
 
5
+ 已发布到 npm:`question-workbench-mcp`(需要 Node.js 18+)。
6
+
5
7
  ## 它提供什么
6
8
 
7
9
  | 工具 | 作用 |
@@ -11,64 +13,54 @@
11
13
 
12
14
  识图仍由客户端自己的多模态模型完成——MCP 服务器不本地 OCR。图片通过客户端附加,或在 `build_worksheet` 里传本地路径嵌入讲义。
13
15
 
14
- ## 启动(stdio)
16
+ ## 快速启动(stdio)
15
17
 
16
18
  ```powershell
17
- node C:\Users\admin\Documents\deepseek-harness\default-workspace\question-workbench-mcp\server.js
19
+ npx -y question-workbench-mcp
18
20
  ```
19
21
 
20
- 发布到 npm 后可改用:
22
+ 本地源码方式:
21
23
 
22
24
  ```powershell
23
- npx -y question-workbench-mcp
25
+ node <本目录绝对路径>\server.js
24
26
  ```
25
27
 
26
28
  ## Codex CLI 配置
27
29
 
28
- 编辑 `~/.codex/config.toml`,加一段:
30
+ 编辑 `~/.codex/config.toml`:
29
31
 
30
32
  ```toml
33
+ # Windows
31
34
  [mcp_servers.question-workbench]
32
- command = "node"
33
- args = ["C:\\Users\\admin\\Documents\\deepseek-harness\\default-workspace\\question-workbench-mcp\\server.js"]
34
- ```
35
-
36
- 发布 npm 后更简单:
35
+ command = "cmd"
36
+ args = ["/c", "npx", "-y", "question-workbench-mcp"]
37
37
 
38
- ```toml
39
- [mcp_servers.question-workbench]
40
- command = "npx"
41
- args = ["-y", "question-workbench-mcp"]
38
+ # macOS / Linux
39
+ # [mcp_servers.question-workbench]
40
+ # command = "npx"
41
+ # args = ["-y", "question-workbench-mcp"]
42
42
  ```
43
43
 
44
- 保存后重启 Codex,用 `/mcp`(或对应命令)确认 `question-workbench` 已连接、两个工具可见。
44
+ 保存后重启 Codex,用 `/mcp` 或对应命令确认 `question-workbench` 已连接、两个工具可见。
45
45
 
46
- ## WorkBuddy / 其他客户端
46
+ **Windows 注意**:MCP 客户端直接 spawn `npx` 常因 `.cmd` shim 报 ENOENT,所以要 `cmd /c npx ...` 包装;若客户端允许填写 argv 数组,也可用 `cmd.exe` + `/c`。
47
47
 
48
- 只要该客户端支持**自定义 MCP 服务器(stdio)**,就填:
48
+ ## WorkBuddy / 其他客户端
49
49
 
50
- - 命令:`node`
51
- - 参数:`<本目录绝对路径>\server.js`
50
+ 只要支持**自定义 MCP 服务器(stdio)**,填:
52
51
 
53
- 若客户端用 JSON 配置,参考 `mcp-config.example.json`:
52
+ - 命令:`cmd`
53
+ - 参数:`/c`、`npx`、`-y`、`question-workbench-mcp`(Windows)
54
+ - macOS / Linux:命令 `npx`,参数 `-y`、`question-workbench-mcp`
54
55
 
55
- ```json
56
- {
57
- "mcpServers": {
58
- "question-workbench": {
59
- "command": "node",
60
- "args": ["<本目录绝对路径>\\server.js"]
61
- }
62
- }
63
- }
64
- ```
56
+ JSON 写法参考 [mcp-config.example.json](mcp-config.example.json)。
65
57
 
66
- 客户端**不支持 MCP** 的话,无法以插件形式接入;那种情况下只能把提示词作为自定义指令使用。
58
+ 客户端**不支持 MCP** 的话,无法以插件形式接入,只能把提示词当自定义指令使用。
67
59
 
68
60
  ## 在代理里的推荐流程
69
61
 
70
62
  1. 用户提供题目照片;
71
- 2. 调用 `question_prompt`,`mode: "recognition"`,把结果三段式贴在对话里给用户核对;
63
+ 2. 调用 `question_prompt`,`mode: "recognition"`,把结果给用户核对;
72
64
  3. 用户改正后,把核对文本传给 `question_prompt`,`mode` 选 `analysis` / `solution` / `summary` / `full`;
73
65
  4. 用 `build_worksheet` 生成讲义:`text` 放题目,`notes` 放解答,`images` 放本地原图路径;
74
66
  5. 打开返回的 `.html` 路径,Ctrl+P 预览并打印。
@@ -1,10 +1,15 @@
1
1
  # Codex CLI: add to ~/.codex/config.toml
2
- # Local checkout (no publish needed):
2
+ # Published package. On Windows, wrap npx with cmd /c so MCP clients can spawn it.
3
3
  [mcp_servers.question-workbench]
4
- command = "node"
5
- args = ["C:\\Users\\admin\\Documents\\deepseek-harness\\default-workspace\\question-workbench-mcp\\server.js"]
4
+ command = "cmd"
5
+ args = ["/c", "npx", "-y", "question-workbench-mcp"]
6
6
 
7
- # After publishing to npm, use this instead:
7
+ # macOS / Linux:
8
8
  # [mcp_servers.question-workbench]
9
9
  # command = "npx"
10
- # args = ["-y", "question-workbench-mcp"]
10
+ # args = ["-y", "question-workbench-mcp"]
11
+
12
+ # Local checkout instead of the registry copy:
13
+ # [mcp_servers.question-workbench]
14
+ # command = "node"
15
+ # args = ["<checkout-dir>/server.js"]
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "question-workbench": {
4
- "command": "node",
5
- "args": ["C:\\Users\\admin\\Documents\\deepseek-harness\\default-workspace\\question-workbench-mcp\\server.js"]
4
+ "command": "cmd",
5
+ "args": ["/c", "npx", "-y", "question-workbench-mcp"]
6
6
  }
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "question-workbench-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server for the question-workbench flow: structured recognition/solution prompts and A4 worksheet HTML generation, usable from Codex, WorkBuddy and any MCP-capable agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",