Repolode
bytebase

bytebase/dbhub

A minimal, token-efficient MCP server that lets AI clients query and explore PostgreSQL, MySQL, SQL Server, Oracle, MariaDB and SQLite databases.

Stars
3,689
Forks
341
Open issues
2
Last commit
7 days ago

What is it?

DBHub is an MCP (Model Context Protocol) server that gives MCP-compatible clients such as Claude Desktop, Claude Code, Cursor and VS Code a single gateway to several SQL databases. It supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, and can connect to multiple databases at once through TOML configuration.

By default it exposes just two tools, execute_sql and search_objects, which the project says load at about 1.4k tokens to keep the context window free. Opt-in extras include explain_sql and health_check, plus custom parameterized SQL tools defined in a dbhub.toml file. A built-in web workbench lets users run queries and tools without an MCP client.

Safety options include read-only mode, row limits, query timeouts, SSH tunneling and SSL/TLS encryption. It runs via npx, Docker, an MCP Bundle or a Claude Code plugin, and requires Node.js 22.5 or later.

Key features

  • 01Two default MCP tools (execute_sql and search_objects) to keep token usage low.
  • 02Supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite through one interface.
  • 03Connects to multiple databases simultaneously via TOML configuration.
  • 04Read-only mode, row limits and query timeouts as guardrails.
  • 05SSH tunneling and SSL/TLS encryption for secure connections.
  • 06Built-in web workbench for running queries and custom tools.

Use cases

  • Exploring schemas and debugging data from Claude Code, Cursor or VS Code during local development.
  • Giving non-technical staff read-only access to curated data through an AI client.
  • Replacing separate MCP servers with one process that covers several databases.
  • Running read-only production diagnostics with protection against runaway queries.

Quick start

  1. 1

    Start DBHub with npx, pointing it at your database DSN

    npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
  2. 2

    Alternatively, run the Docker image (see the Docker installation section)

Things to know

  • Requires Node.js 22.5.0 or newer for development builds.

Topics

FAQ

What is dbhub?
A minimal, token-efficient MCP server that lets AI clients query and explore PostgreSQL, MySQL, SQL Server, Oracle, MariaDB and SQLite databases. DBHub is an MCP (Model Context Protocol) server that gives MCP-compatible clients such as Claude Desktop, Claude Code, Cursor and VS Code a single gateway to several SQL databases. It supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, and can connect to multiple databases at once through TOML configuration.
Is dbhub free to use? What license does it have?
dbhub is open source under the MIT license. Check the license terms before using it in commercial products.
Is dbhub still maintained?
Actively maintained. The last commit to dbhub was on Oct 13, 2026.
What can I use dbhub for?
Exploring schemas and debugging data from Claude Code, Cursor or VS Code during local development. Giving non-technical staff read-only access to curated data through an AI client. Replacing separate MCP servers with one process that covers several databases. Running read-only production diagnostics with protection against runaway queries.
How do I install dbhub?
Start DBHub with npx, pointing it at your database DSN: npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable" Alternatively, run the Docker image (see the Docker installation section)
Where can I get dbhub?
The source code and installation instructions are on GitHub: https://github.com/bytebase/dbhub

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects