dsh-cc-mcp 0.2.0 → 0.3.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,5 +1,12 @@
1
1
  # dsh-cc-mcp
2
2
 
3
+ > [!IMPORTANT]
4
+ > **Only upgrade to this version when upgrading DSH to `0.1.5-rc.2` or later.**
5
+ > It binds to the 0.1.5 host contracts (`^0.1.5-rc.2` peer ranges for
6
+ > `dsh-subprocess` / `schemastery`) and **does not work on older DSH**. If your
7
+ > DSH is still `0.1.0-rc.7`–`0.1.1-rc.2`, **do not upgrade** — stay on `v0.1.x`.
8
+ > The two lines are mutually exclusive.
9
+
3
10
  Load Claude Code MCP server configs into DeepSeek Harness as **runtime-registered
4
11
  tools** — no config-row writes, no restarts for config changes.
5
12
 
@@ -31,6 +38,21 @@ tools** — no config-row writes, no restarts for config changes.
31
38
  `dsh-mcp-client` row is skipped by default; `"override": true` in the server
32
39
  entry forces the project/plugin connection (agent layer shadows upper
33
40
  layers).
41
+ - **Management panel (`/mcp`)**: every server keeps a status row
42
+ (connected / failed / disabled / provided-by-host) with its tool list. The
43
+ Web GUI's `/mcp` command opens a panel over those rows: a failed server shows
44
+ a **Connect** button, a connected one can be re-checked, each row opens a
45
+ detail view with the server's tools, and **Disable** hides that server from
46
+ the model until you enable it again. The session's start-up self-check reports
47
+ failures as auto-dismissing toasts.
48
+ - **Host MCP rows are listed too** (`manageHostRows`, on by default): the
49
+ profile's own `@deepseek-ai/dsh-mcp-client` instances (github, fetch, …) appear
50
+ with the tools the host really exposes. Acting on them is **workspace-scoped and
51
+ never rewrites the profile config**: Disable hides that row's `mcp__<server>__*`
52
+ tools for this workspace only (via the platform's `tools.restrict({ deny })`,
53
+ lifted again on Enable), and Connect adopts a row that exposes nothing by
54
+ connecting with that row's own config and registering its tools inside the
55
+ session scope.
34
56
 
35
57
  ## Trust model ⚠️
36
58
 
@@ -71,6 +93,61 @@ directory paths inside the config, not module specifiers.
71
93
  | `toolCallTimeoutMs` | `60000` | per-call timeout |
72
94
  | `watchProject` | `true` | hot-reload the project `.mcp.json` |
73
95
  | `projectRootMarkers` | `['.git', '.dsh', '.claude']` | directory names that mark a project root when walking up from the session cwd; the first ancestor containing any marker wins. `.dsh` / `.claude` let projects without a `.git` repo still resolve their root |
96
+ | `enableManager` | `true` | register the `/mcp` command and the panel's `/cc-mcp` route |
97
+ | `manageHostRows` | `true` | list the profile's `@deepseek-ai/dsh-mcp-client` rows in the panel (disabling one only hides its tools in this workspace) |
98
+ | `statePath` | `''` (→ `<projectRoot>/.dsh/cc-mcp-state.json`) | explicit state-file override; empty keeps decisions per workspace (machine-wide file only when the session has no project root) |
99
+
100
+ ## Management panel
101
+
102
+ `/mcp` (bare) opens the panel in the Web GUI; `/mcp <anything>` prints the text
103
+ report instead, and the same report is what a headless/CLI session gets.
104
+
105
+ | Status | Meaning | Panel |
106
+ |---|---|---|
107
+ | `ready` | connected and its tools are visible | ✓ — click to re-check |
108
+ | `error` | the connection failed (host rows say whether Connect can adopt it) | `Connect` button, error text in the detail view |
109
+ | `disabled` | disabled in this workspace | `Enable` button |
110
+ | `skipped` | another layer already registers this tool prefix | shown as host-provided, with the visible tools |
111
+ | `checking` | a check/connect is in flight | spinner |
112
+
113
+ | Scope | Where it comes from | Disable does |
114
+ |---|---|---|
115
+ | `Project` | `<projectRoot>/.mcp.json` | unregister this plugin's tools for that server |
116
+ | `Plugin` | `pluginRoots` (plugin `.mcp.json` / `plugin.json`) | same, under `mcp__plugin_<plugin>_<server>__` |
117
+ | `Host` | the profile's `dsh-mcp-client` rows | hide that row's tools **for this workspace only** (`tools.restrict({ deny })`, lifted on Enable) — the profile config is never rewritten |
118
+
119
+ `Connect` on a host row that exposes no tools **adopts** it: this plugin connects
120
+ with that row's own config and registers the tools inside the session scope, so a
121
+ row whose own connection failed still gives this workspace working tools.
122
+
123
+ Decisions are remembered in `<projectRoot>/.dsh/cc-mcp-state.json` (per workspace;
124
+ `$DSH_HOME/cc-mcp-state.json` only for sessions without a project root), which is
125
+ the **only** file this plugin writes — your `.mcp.json`, the profile config and
126
+ Claude Code settings are never touched. Add `.dsh/` to the project's `.gitignore`
127
+ if you do not want to share the choices.
128
+
129
+ ## Try the panel locally
130
+
131
+ A throwaway project config used to exercise the panel end to end (one server that
132
+ connects, one that fails so `Connect` has something to do):
133
+
134
+ ```json
135
+ {
136
+ "mcpServers": {
137
+ "cc-echo": { "command": "node", "args": ["<repo>/packages/cc-mcp/test/mcp-echo-server.mjs"] },
138
+ "cc-flaky": {
139
+ "command": "node",
140
+ "args": [
141
+ "<repo>/packages/cc-mcp/test/mcp-flaky-server.mjs",
142
+ "<repo>/.cc-mcp-marker"
143
+ ]
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ `cc-flaky` refuses to start until `<repo>/.cc-mcp-marker` exists; create it and
150
+ press **Connect** to watch the row flip to connected.
74
151
 
75
152
  ## Example
76
153