npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dong-victor/dsh-mcphub

v0.1.3

Published

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

Readme

@dong-victor/dsh-mcphub

DSH Web GUI 插件:把本地 MCPHub@samanhappy/mcphub,Dashboard 默认 http://localhost:3000)一站式聚合暴露的全部 MCP server 工具桥接进 DSH,让 agent 在会话里直接调用。

MCPHub 自身就是一个 MCP server:它把所有已启用的 server 聚合在一个 Streamable HTTP 端点 /mcp(全局路由,工具名投影为 <server名>-<工具名>;也可用 /mcp/<group> 分组路由)。本插件用官方 MCP SDK 作为客户端连接该端点,把发现到的每个工具注册为 DSH 原生 agent 工具:

mcp__mcphub__<server名>-<工具名>
# 例:mcp__mcphub__cassiopeia-ap-mysql-execute_sql

调用时参数 schema 与 MCPHub 发布的一致;tools/call 原样转发原始工具名(不做名字解析),调用结果按 MCP 文本块投影回模型上下文。

能力

  • 工具桥接:连接 MCPHub 聚合端点(或分组端点),注册全部工具为 agent 原生工具(命名规范与 @deepseek-ai/dsh-mcp-client 一致:64 字符限制、非法字符替换、必要时追加确定性 hash)。
  • agent 工具
    • mcphub_status —— 连接状态、端点、server / 工具清单(含 DSH 可调用名)、MCPHub /health
    • mcphub_resync —— 强制重新同步工具集(MCPHub 侧增删改 server / 工具后使用)。
  • 侧边栏「MCPHub」入口:位于侧边栏底部「设置」按钮上方(连接状态点 + 工具数概览;折叠侧边栏时自动切换为图标形态),点击打开状态面板。
  • 状态面板:连接徽章、端点 / 分组 / 健康 / 上次同步 / 最近错误、按 server 分组的工具清单(可展开)、「打开 MCPHub Dashboard」外链、手动刷新。
  • 健壮性:断线自动指数退避重连(工具在中断期保持注册、调用报错,恢复后自动重同步);监听 notifications/tools/list_changed 热同步工具集;MCPHub 不可达时插件照常激活,状态面板如实显示。
  • 宿主路由GET /api/dsh-mcphub/status(环回地址保护、TTL 缓存、?refresh=1 绕过)。

安装

前置:本机已运行 MCPHub(mcphubhttp://localhost:3000),且其中已启用至少一个 server。

# 从本地目录安装(与本仓库 dsh-jupyter 同样的 link 方式)
dsh plugin --profile web add link:C:\Users\dongz\.dsh\workspace\dsh-mcphub

或发布到 npm 后:dsh plugin --profile web add @dong-victor/dsh-mcphub

安装后重启 dsh web 宿主进程(本插件是新 bundle,需要宿主重新加载 profile 才能生效)。

配置(可选)

在 profile 的 cordis.patch.yml 中按需覆盖:

- id: mcphub
  name: '@dong-victor/dsh-mcphub'
  config:
    baseUrl: http://localhost:3000   # MCPHub 地址
    group: ''                        # 留空=全局聚合 /mcp;填分组名= /mcp/<group>
    serverName: mcphub               # 工具命名空间(mcp__<serverName>__…)
    headers: {}                      # 附加 HTTP 头,如 { Authorization: 'Bearer xxx' }(MCPHub 开启 bearer 认证时)
    announceToAgent: true            # 是否向 agent 公告本插件
    toolCallTimeoutMs: 60000         # 单次 tools/call 超时
    reconnect:
      enabled: true
      initialDelayMs: 500
      maxDelayMs: 30000
      maxAttempts: 10

开发

npm install        # 安装依赖(@modelcontextprotocol/sdk、zod、jsdom 等)
npm test           # host-boot 冒烟 + 客户端 DOM 冒烟 + 对真实 MCPHub 的桥接端到端测试
npm pack           # 打包发布

测试说明:bridge-live.test.mjs 会真实连接本机 http://localhost:3000 的 MCPHub,发现工具并调用一个只读工具(如 get_schema_info),需要 MCPHub 在线。

已知限制

  • 只桥接工具能力:MCP 的 resources / prompts 暂不暴露(与 dsh-mcp-client 相同)。
  • 工具名中的 <server名> 前缀来自 MCPHub 配置;在 MCPHub 中改名会导致工具名变化(可 mcphub_resync 刷新)。
  • 面板中的 server 分组基于工具名前缀启发式推断(展示用),调用始终使用完整工具名,不受影响。
  • 依赖 MCPHub 服务在线;服务端会话在插件重连后会重建。

许可

MIT