bytebase/dbhub

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.

What it solves

DBHub provides a lightweight, secure way for AI-powered MCP (Model Context Protocol) clients—such as Claude Desktop, Cursor, and VS Code—to connect to and interact with various relational databases without requiring complex setup or risking runaway queries.

How it works

It acts as an MCP server that bridges the gap between LLM clients and databases. It implements the Model Context Protocol to offer specific tools that the AI can use to explore schemas and execute queries. It supports multiple database types (PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite) and can be configured via TOML to manage multiple simultaneous connections. To ensure safety, it includes guardrails like read-only modes, row limits, and query timeouts.

Who it’s for

Developers and non-technical teammates who want to give their AI assistants the ability to query and explore databases securely and efficiently.

Highlights

  • Multi-Database Support: Works with PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.
  • Token Efficiency: Uses a minimal set of tools to maximize the LLM's context window.
  • Safety Guardrails: Features read-only mode, row limiting, and query timeouts to prevent accidental damage or performance issues.
  • Flexible Deployment: Can be run via Docker, NPM, or as a one-click MCP Bundle.
  • Built-in Workbench: Includes a web interface for executing queries and viewing request traces without an MCP client.