{"_id":"@dong-victor/dsh-mcphub","_rev":"5-dc8246068a5d2b897f6ce55b43a89c23","name":"@dong-victor/dsh-mcphub","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@dong-victor/dsh-mcphub","version":"0.1.0","keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"license":"MIT","_id":"@dong-victor/dsh-mcphub@0.1.0","maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"074c655039776e02589d6139bff062938cc47157","tarball":"https://registry.npmjs.org/@dong-victor/dsh-mcphub/-/dsh-mcphub-0.1.0.tgz","fileCount":6,"integrity":"sha512-Ycsqg3eR1CrFauC9Xz0FmUqaYBDfDrN3S0JvAc8EPwbiSjhbSDkU1+QwOVMd0wh7aQ2kN83QZo4k2duDQ3qWsA==","signatures":[{"sig":"MEYCIQCwkxASvq+nMtCnx5P+mVEdOYlXkll1s1NJrUqmOU8eLgIhAIGw8w4Od4Il4Bvw2QHJqH8iokTHBal/jDzdPxpVnAqB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71201},"main":"lib/index.js","type":"module","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"4a4e7a4e50c860b673c76f8b27ca1186e76ef246","scripts":{"pack":"npm pack","test":"node test/host-boot.test.mjs && node test/client-smoke.test.mjs && node test/bridge-live.test.mjs"},"_npmUser":{"name":"dong-victor","email":"dougzforever@gmail.com"},"_npmVersion":"11.12.1","description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-mcphub_0.1.0_1786861285632_0.0760897347521099","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dong-victor/dsh-mcphub","version":"0.1.1","keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"license":"MIT","_id":"@dong-victor/dsh-mcphub@0.1.1","maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"f35925bc499809f41d13a44d1dff0a6f9d35649d","tarball":"https://registry.npmjs.org/@dong-victor/dsh-mcphub/-/dsh-mcphub-0.1.1.tgz","fileCount":6,"integrity":"sha512-Sgd+mOBiZDNoGYQMMPYjPZWhz553cY5QVo3bzfnhKgkUpCTXX1EKpiNlD3i9C06C0Nd36WZpKTuoPqFb40uCFQ==","signatures":[{"sig":"MEUCIEhw1fqgAkRiVOcvMs47RXIH2Vh9BFbuLM2aoVyD+5MoAiEAoqR97WmLjaFNRSvlu/Wej9d/vDj8hxu8gH5n+SqK/YE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70892},"main":"lib/index.js","type":"module","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"4a4e7a4e50c860b673c76f8b27ca1186e76ef246","scripts":{"pack":"npm pack","test":"node test/host-boot.test.mjs && node test/client-smoke.test.mjs && node test/bridge-live.test.mjs"},"_npmUser":{"name":"dong-victor","email":"dougzforever@gmail.com"},"_npmVersion":"11.12.1","description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-mcphub_0.1.1_1786861507783_0.21448764199939907","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dong-victor/dsh-mcphub","version":"0.1.2","keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"license":"MIT","_id":"@dong-victor/dsh-mcphub@0.1.2","maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"f9605df1992b3da91eae98f227ffe1b3dafb60b0","tarball":"https://registry.npmjs.org/@dong-victor/dsh-mcphub/-/dsh-mcphub-0.1.2.tgz","fileCount":6,"integrity":"sha512-w30687z5WtbC5oPUDQEDMh+hCYvbqxAS4TYoLglSsaG5wFpHLK08z3cTM+RMmDp7K01Y/45l58oWm7YPO+4Z5A==","signatures":[{"sig":"MEUCIBn6lFR+okXonFs2W9+OhSuzohj/ZyicsKKct635qE2NAiEAujmWjATvTdwFS77F89V2GKmPK05lN8rgddGQmTE0RMI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72916},"main":"lib/index.js","type":"module","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"e37647959627e8dd964b55393104732b0741d422","scripts":{"pack":"npm pack","test":"node test/host-boot.test.mjs && node test/client-smoke.test.mjs && node test/bridge-live.test.mjs"},"_npmUser":{"name":"dong-victor","email":"dougzforever@gmail.com"},"_npmVersion":"11.12.1","description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-mcphub_0.1.2_1787152235925_0.9896021928104692","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@dong-victor/dsh-mcphub","version":"0.1.3","keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"license":"MIT","_id":"@dong-victor/dsh-mcphub@0.1.3","maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"4cc87dbd8123a59be713a865f2519453bc1e4be7","tarball":"https://registry.npmjs.org/@dong-victor/dsh-mcphub/-/dsh-mcphub-0.1.3.tgz","fileCount":6,"integrity":"sha512-Ep3IXl9GyRpwJViLlR9ZpVL1JSXebj2C1ANl0rpBmen9wCS5e8icjnvBgpUS9N8bKgq98TtVPrpEYmWHKJJ3/Q==","signatures":[{"sig":"MEUCIQC8qtfJgWtgPPRUBqLWOVfQz/deCCp/mOl2H9e/BjKofwIgIzjjKgXLHlA1cyUkBWSkVKOocB+b5GIXFx4fItSz8VQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75442},"main":"lib/index.js","type":"module","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"a1dd9842f92baa13593df9e1f8e791d5b4bd41cd","scripts":{"pack":"npm pack","test":"node test/host-boot.test.mjs && node test/client-smoke.test.mjs && node test/bridge-live.test.mjs"},"_npmUser":{"name":"dong-victor","email":"dougzforever@gmail.com"},"_npmVersion":"11.12.1","description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-mcphub_0.1.3_1787193245299_0.7103158004741787","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@dong-victor/dsh-mcphub","description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","version":"0.1.4","type":"module","engines":{"node":"^22.19.0 || >=24.0.0"},"main":"lib/index.js","exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0","zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6"},"devDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.6","jsdom":"^30.0.1"},"scripts":{"test":"node test/host-boot.test.mjs && node test/client-smoke.test.mjs && node test/bridge-live.test.mjs","pack":"npm pack"},"keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"license":"MIT","gitHead":"860572c6d9f160e264f58074024a3dae0dba66a5","_id":"@dong-victor/dsh-mcphub@0.1.4","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-w2djeP0QB7oo2hqTLMTujjll2PJWDtxTUXx6xyVZWFv7GwFVVs/uh8xAP69iavTAe35EtRQQE2lRWrhNGxXDBg==","shasum":"74e61201074612e6d109e0b75730bc33b600acda","tarball":"https://registry.npmjs.org/@dong-victor/dsh-mcphub/-/dsh-mcphub-0.1.4.tgz","fileCount":6,"unpackedSize":76535,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAVkz60euM63uZzIO8UiwBgL5/iGR092epc8jhi31zkCAiEAp7aw0i/BbmJ924UafCovv0cWR6ZJcR7fQk/tpmOtNIs="}]},"_npmUser":{"name":"dong-victor","email":"dougzforever@gmail.com"},"directories":{},"maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-mcphub_0.1.4_1788957878763_0.23349169458581143"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T06:21:25.515Z","modified":"2026-09-09T12:44:39.082Z","0.1.0":"2026-08-16T06:21:25.771Z","0.1.1":"2026-08-16T06:25:07.933Z","0.1.2":"2026-08-19T15:10:36.063Z","0.1.3":"2026-08-20T02:34:05.439Z","0.1.4":"2026-09-09T12:44:38.921Z"},"license":"MIT","keywords":["dsh","deepseek-harness","plugin","mcphub","mcp","model context protocol","hub"],"description":"MCPHub 桥接插件（DSH Web GUI）：把本地 MCPHub（http://localhost:3000，@samanhappy/mcphub）聚合暴露的全部 MCP server 工具桥接进 DSH。宿主侧以 MCP Streamable HTTP 客户端连接 MCPHub 聚合端点 /mcp（或 /mcp/<group> 分组端点），把发现到的工具以 mcp__mcphub__<server>-<tool> 形式注册为 agent 原生工具；提供 mcphub_status / mcphub","maintainers":[{"name":"dong-victor","email":"dougzforever@gmail.com"}],"readme":"# @dong-victor/dsh-mcphub\r\n\r\nDSH Web GUI 插件：把本地 [MCPHub](https://github.com/samanhappy/mcphub)（`@samanhappy/mcphub`，Dashboard 默认 `http://localhost:3000`）一站式聚合暴露的**全部 MCP server 工具**桥接进 DSH，让 agent 在会话里直接调用。\r\n\r\nMCPHub 自身就是一个 MCP server：它把所有已启用的 server 聚合在一个 Streamable HTTP 端点 `/mcp`（全局路由，工具名投影为 `<server名>-<工具名>`；也可用 `/mcp/<group>` 分组路由）。本插件用官方 MCP SDK 作为客户端连接该端点，把发现到的每个工具注册为 DSH 原生 agent 工具：\r\n\r\n```\r\nmcp__mcphub__<server名>-<工具名>\r\n# 例：mcp__mcphub__cassiopeia-ap-mysql-execute_sql\r\n```\r\n\r\n调用时参数 schema 与 MCPHub 发布的一致；`tools/call` 原样转发原始工具名（不做名字解析），调用结果按 MCP 文本块投影回模型上下文。\r\n\r\n## 能力\r\n\r\n- **工具桥接**：连接 MCPHub 聚合端点（或分组端点），注册全部工具为 agent 原生工具（命名规范与 `@deepseek-ai/dsh-mcp-client` 一致：64 字符限制、非法字符替换、必要时追加确定性 hash）。\r\n- **agent 工具**：\r\n  - `mcphub_status` —— 连接状态、端点、server / 工具清单（含 DSH 可调用名）、MCPHub `/health`；\r\n  - `mcphub_resync` —— 强制重新同步工具集（MCPHub 侧增删改 server / 工具后使用）。\r\n- **侧边栏「MCPHub」入口**：作为侧边栏底部 **foot 区域（`footArea`）的直接子节点**，插在设置区域（`settingsArea`，即「设置」按钮）上方；`footArea` 不存在的老宿主自动回退为「设置在 settingsArea 内、trigger 上方」（连接状态点 + 工具数概览；折叠侧边栏时自动切换为图标形态），点击打开状态面板。\r\n- **状态面板**：连接徽章、端点 / 分组 / 健康 / 上次同步 / 最近错误、按 server 分组的工具清单（可展开）、「打开 MCPHub Dashboard」外链、手动刷新。\r\n- **健壮性**：断线自动指数退避重连（工具在中断期保持注册、调用报错，恢复后自动重同步）；监听 `notifications/tools/list_changed` 热同步工具集；MCPHub 不可达时插件照常激活，状态面板如实显示。\r\n- **宿主路由**：`GET /api/dsh-mcphub/status`（环回地址保护、TTL 缓存、`?refresh=1` 绕过）。\r\n\r\n## 安装\r\n\r\n前置：本机已运行 MCPHub（`mcphub`，`http://localhost:3000`），且其中已启用至少一个 server。\r\n\r\n```powershell\r\n# 从本地目录安装（与本仓库 dsh-jupyter 同样的 link 方式）\r\ndsh plugin --profile web add link:C:\\Users\\dongz\\.dsh\\workspace\\dsh-mcphub\r\n```\r\n\r\n或发布到 npm 后：`dsh plugin --profile web add @dong-victor/dsh-mcphub`。\r\n\r\n安装后**重启 dsh web 宿主进程**（本插件是新 bundle，需要宿主重新加载 profile 才能生效）。\r\n\r\n## 配置（可选）\r\n\r\n在 profile 的 `cordis.patch.yml` 中按需覆盖：\r\n\r\n```yaml\r\n- id: mcphub\r\n  name: '@dong-victor/dsh-mcphub'\r\n  config:\r\n    baseUrl: http://localhost:3000   # MCPHub 地址\r\n    group: ''                        # 留空=全局聚合 /mcp；填分组名= /mcp/<group>\r\n    serverName: mcphub               # 工具命名空间（mcp__<serverName>__…）\r\n    headers: {}                      # 附加 HTTP 头，如 { Authorization: 'Bearer xxx' }（MCPHub 开启 bearer 认证时）\r\n    announceToAgent: true            # 是否向 agent 公告本插件\r\n    toolCallTimeoutMs: 60000         # 单次 tools/call 超时\r\n    reconnect:\r\n      enabled: true\r\n      initialDelayMs: 500\r\n      maxDelayMs: 30000\r\n      maxAttempts: 10\r\n```\r\n\r\n## 开发\r\n\r\n```powershell\r\nnpm install        # 安装依赖（@modelcontextprotocol/sdk、zod、jsdom 等）\r\nnpm test           # host-boot 冒烟 + 客户端 DOM 冒烟 + 对真实 MCPHub 的桥接端到端测试\r\nnpm pack           # 打包发布\r\n```\r\n\r\n测试说明：`bridge-live.test.mjs` 会真实连接本机 `http://localhost:3000` 的 MCPHub，发现工具并调用一个只读工具（如 `get_schema_info`），需要 MCPHub 在线。\r\n\r\n## 已知限制\r\n\r\n- 只桥接**工具**能力：MCP 的 resources / prompts 暂不暴露（与 dsh-mcp-client 相同）。\r\n- 工具名中的 `<server名>` 前缀来自 MCPHub 配置；在 MCPHub 中改名会导致工具名变化（可 `mcphub_resync` 刷新）。\r\n- 面板中的 server 分组基于工具名前缀启发式推断（展示用），调用始终使用完整工具名，不受影响。\r\n- 依赖 MCPHub 服务在线；服务端会话在插件重连后会重建。\r\n\r\n## 许可\r\n\r\nMIT\r\n","readmeFilename":"README.md"}