DeepSeek Harness plugin

dsh-dbhub-live

DSH 数据库 MCP 桥接插件:常驻多源 dbhub 服务 + 按工作区工具 + 临时动态连接。

Jump to install

Source facts

Repository
mr-mihu/dsh-dbhub-live
Latest update
Aug 18, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/mr-mihu/dsh-dbhub-live
Plugin: dsh-dbhub-live
Author: mr-mihu

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-dbhub-live

> 让 DeepSeek Harness (DSH) 直接、安全地操作数据库:常驻多源连接 + 按工作区工具 + 临时动态连接。

![License: MIT](https://opensource.org/licenses/MIT) ![DSH](#安装) ![DBHub](https://github.com/bytebase/dbhub)

dsh-dbhub-live 是一个 DSH 插件,基于 DBHub(数据库 MCP 服务器)让模型直接查询数据库:既能在已配置的工作区上复用常驻连接,也能临时连任意库做一次性排查。

✨ 特性

  • 常驻多源服务 — 后台一个 dbhub 服务同时接入多个数据源,连接复用、查询更快。
  • 按工作区工具dbhub_execute_sql_<工作区> / dbhub_search_objects_<工作区>,工具名即工作区,多工作区不混淆,连接标注(密码打码)清晰可见。
  • 临时动态连接dbhub_query / dbhub_query_objects 每次独立连任意库,可并行查多个不同库,便于跨环境排查。
  • 开箱即用 — 未安装 dbhub 时首次使用自动安装,之后自动保持更新,无需手动处理。
  • 多种配置方式 — 显式 DSN / 填写分项 / 授权扫描项目配置文件,凭据仅存本机用户目录,密码全程脱敏。

支持的数据源

MySQL · PostgreSQL · MariaDB · SQLite · SQL Server

环境要求

  • DeepSeek Harness 的 dsh CLI(dsh web 负责 GUI 运行)
  • 推荐本机有 Node.js ≥ 18(含 npm)——首次使用会自动安装 dbhub

安装

# 方式一:使用本机已安装的 dsh
dsh plugin --profile web add dsh-dbhub-live

# 方式二:通过 npx 调用 dsh(无需本机全局安装 dsh)
npx @deepseek-ai/dsh plugin --profile web add dsh-dbhub-live

安装后重启 dsh web 生效。

快速开始

# 1) 为当前工作区配置数据库连接(三种方式任选其一)
dbhub_configure

# 2) 在已配置工作区的常驻连接上执行查询
dbhub_execute_sql_myapp  SELECT * FROM users LIMIT 10;

# 3) 临时连任意库做一次性排查
dbhub_query  dsn=mysql://root:pass@192.168.77.6:3306/tx_sd_jinengshu  sql="SHOW TABLES;"

工具

工具说明
dbhub_configure(workspace?, dsn?)为工作区配置/持久化数据库连接。
dbhub_execute_sql_<工作区>在指定工作区的常驻连接上执行 SQL。
dbhub_search_objects_<工作区>在指定工作区搜索数据库对象(表/视图/列/索引等)。
dbhub_query(dsn, sql)临时连接任意库执行 SQL(多语句用 ; 分隔)。
dbhub_query_objects(dsn, ...)临时连接任意库搜索数据库对象。

> 注:search_objects 仅对 SQLite 开放;MySQL / PostgreSQL 等请用 dbhub_query 直接查(如 SHOW TABLES)。

配置方式

1. 显式 DSN — 传入完整连接串,如 mysql://user:pass@host:3306/db。 2. 填写分项 — 按类型 / 主机 / 端口 / 账号 / 密码 / 库名依次填写。 3. 授权扫描 — 授权后扫描项目配置文件(.envapplication*.ymldocker-composejdbc.properties 等),列出候选(密码打码)供你确认。

工作区若已有 mise env.envDSN / DB_*),插件会自动发现,无需手动配置。

🔄 dbhub 自动安装与更新

  • 首次使用自动安装:本机没有 dbhub 时,插件会在第一次查询时自动安装,之后离线也可用。
  • 自动保持更新:每 7 天在后台静默更新到最新版,失败则沿用现有版本。
  • 不碰你的配置:通过 PATH / mise 自行安装的 dbhub 不会被插件改动。
环境变量说明默认
DSH_DBHUB_PACKAGE自动安装使用的 npm 包名@bytebase/dbhub
DSH_DBHUB_UPDATE_DAYS自动更新间隔天数,0 关闭7

数据位置

所有配置与凭据存放在模块目录之外(不受 pnpm 打包影响),删除该目录即可完整清空:

~/.dsh/storages/dsh-dbhub-live/

卸载

dsh plugin --profile web remove dsh-dbhub-live

故障排查

现象处理
首次使用报「无法获取 dbhub」确认本机有 npm 且能联网;离线可手动安装 dbhub 并加入 PATH。
工具显示「dbhub 服务不可用」查看 dsh web 日志;进程异常退出时插件会在下次调用自动重启。
扫描不到配置文件默认跳过 node_modules / .git / target / dist 等目录,可改用「输入 DSN」或「填写分项」。
需要自定义 dbhub 版本删除 ~/.dsh/storages/dsh-dbhub-live 后设置 DSH_DBHUB_PACKAGE 指定包/版本。
不希望自动更新 dbhub设置环境变量 DSH_DBHUB_UPDATE_DAYS=0

许可证

[MIT](./LICENSE)