MCP Configs2026年5月13日·1 分钟阅读

DBHub — Token-Efficient Database MCP Server

Database MCP server for Postgres/MySQL/MariaDB/SQL Server/SQLite. Includes execute_sql + schema search with guardrails: read-only, row limits, timeouts.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 62/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Mcp
安装
Npx|Docker
信任
信任等级:Established
入口
npx @bytebase/dbhub@latest --transport http --port 8080 --demo
通用 CLI 安装命令
npx tokrepo install e2d65e60-8e23-5483-9d77-568f90a028ba

简介

DBHub 是一个 token 高效的数据库 MCP server:让 MCP 客户端连接多种数据库,并在 guardrails 约束下安全地查询与探索结构。

最适合: 希望通过 MCP 提供更安全、可维护数据库工具面的 agent 开发者

适配: MCP 客户端(Claude Desktop/Code、Cursor、VS Code、Copilot CLI)+ 数据库 DSN(README 有说明)

配置时间: 10–30 分钟

关键事实(已验证)

  • README 列出支持的数据库:PostgreSQL、MySQL、MariaDB、SQL Server、SQLite。
  • Quick Start 同时提供 Docker 与 NPM(npx @bytebase/dbhub@latest ...)方式(README)。
  • GitHub:2,744 stars · 232 forks;最近更新 2026-04-21(GitHub API 验证)。

正文

避免“数据库工具面膨胀”

让 agent 做数据工作时,最安全的两类能力通常是:

  • 先看结构(表/列/索引)再写 SQL
  • 带限制地执行 SQL

DBHub 把两者做成 MCP 工具,并加上 guardrails(只读、行数限制、超时)。生产环境建议先只读,写入能力单独用凭证/流程隔离并做审计。

README 原文节选(verbatim)

[!NOTE]
Brought to you by Bytebase, open-source database DevSecOps platform.

DBHub Logo

            +------------------+    +--------------+    +------------------+
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            |  Claude Desktop  +--->+              +--->+    PostgreSQL    |
            |                  |    |              |    |                  |
            |  Claude Code     +--->+              +--->+    SQL Server    |
            |                  |    |              |    |                  |
            |  Cursor          +--->+    DBHub     +--->+    SQLite        |
            |                  |    |              |    |                  |
            |  VS Code         +--->+              +--->+    MySQL         |
            |                  |    |              |    |                  |
            |  Copilot CLI     +--->+              +--->+    MariaDB       |
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            +------------------+    +--------------+    +------------------+
                 MCP Clients           MCP Server             Databases

DBHub is a zero-dependency, token efficient MCP server implementing the Model Context Protocol (MCP) server interface. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:

  • Local Development First: Zero dependency, token efficient with just two MCP tools to maximize context window
  • Multi-Database: PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a single interface
  • Multi-Connection: Connect to multiple databases simultaneously with TOML configuration
  • Guardrails: Read-only mode, row limiting, and query timeout to prevent runaway operations
  • Secure Access: SSH tunneling and SSL/TLS encryption

Supported Databases

FAQ

能同时连多个数据库吗? 答:可以。README 提到可通过 TOML 配置实现 multi-connection。

默认安全吗? 答:README 描述了只读/行数限制/超时等 guardrails;但上生产前仍建议审计与最小权限。

怎么最快试用? 答:用 README 的 demo 模式:--demo 启动后再让 MCP 客户端连接。

🙏

来源与感谢

Source: https://github.com/bytebase/dbhub > License: MIT > GitHub stars: 2,744 · forks: 232

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产