Skip to content
MCP Shelf

One small server for Postgres, MySQL, MariaDB, SQL Server, Oracle and SQLite.

  • Needs your setup first
  • ★ 3.7K GitHub stars
  • 17.1K downloads a week
  • Last commit 26 Oct 2026

At a glance

DBHub is Bytebase's deliberately small database server. By default it shows the model just two tools, one to run SQL and one to search the schema, so it costs far less context than servers with dozens of tools. A single process can hold connections to several databases at once through a TOML file, and you can add your own named, parameterised queries as extra tools.

For safety its config file can make a tool read-only, cap the rows returned and time out slow queries, and it can reach databases through an SSH tunnel. It also has a small web workbench for trying queries by hand.

Made by
Bytebase
Licence
MIT
Latest version
1.5.0 (9 Oct 2026)
npm package
@bytebase/dbhub
GitHub stars
3.7K
Downloads
17.1K a week
Last commit
26 Oct 2026
Tools
2
Runs on
Your computer

Our check: It needs something our Linux test machine does not have (an account, a desktop app, a Mac or a running service), so on 27 Oct 2026 we listed its tools from its package instead of running this config.

What's in the pod: its tools

We found 2 tools when we ran its package, before any sign-in or app was connected, on 27 Oct 2026. 1 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Started @bytebase/dbhub 1.5.0 with --demo, its bundled sample SQLite database, because the placeholder DSN has no database behind it. These are the two default tools; explain_sql, health_check and your own custom tools appear only when you switch them on in dbhub.toml.

Runs commands1 tool · Can start programs or run code.

ToolWhat it is for
execute_sqlRuns SQL against a connected database, with transactions, row limits and read-only checks applied.

Only reads1 tool · Looks things up and changes nothing.

ToolWhat it is for
search_objectsSearches schemas, tables, columns, indexes and procedures, starting with names and going into detail only when asked.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How clearly it describes its tools to your assistant

Tools with a description
2 of 2
Say if they change things
2 of 2
Context it takes, at least
~100 tokens

Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.

Set it up

Pick your app for the exact snippet and where it goes.

Where it goes: claude_desktop_config.json (Settings → Developer → Edit Config)

Claude Desktop
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub@latest",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@localhost:5432/dbname"
      ]
    }
  }
}

Use "--demo" in place of --dsn to try it on a bundled sample database. Read-only mode, row limits and several databases are set in a dbhub.toml file passed with --config instead of --dsn.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop and ChatGPT.

Settings

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
--dsnCommand line flag · requiredThe connection string, such as postgres://, mysql://, sqlserver://, oracle:// or sqlite:///path. Also read from DSN in env or a .env file.postgres://user:password@localhost:5432/dbname?sslmode=disable
readonlyConfigA per-tool option in dbhub.toml that only lets read statements through (SELECT, SHOW, DESCRIBE, EXPLAIN). It cannot be set on the command line.[[tools]] name = "execute_sql" source = "main" readonly = true
max_rowsConfigA per-tool option in dbhub.toml that caps how many rows a query returns.max_rows = 1000
query_timeoutConfigA per-source limit in dbhub.toml, in seconds, after which a query is stopped.query_timeout = 30
--configCommand line flagA dbhub.toml file for several databases, per-source limits, SSH tunnels, the optional tools and your own named SQL tools.--config ./dbhub.toml
--demoCommand line flagStarts with a bundled sample SQLite database instead of your own.
--transportCommand line flagstdio for clients that start it, or http with --port to serve it, together with the web workbench.--transport http --port 8080

What it can touch

It can read

  • Any table, view or object the database user can see

It can change

  • Rows and schema, through execute_sql, unless readonly is set in dbhub.toml

Safer setup: Connect as a database user with read rights only, and set readonly and max_rows in dbhub.toml. The database's own permissions are the real boundary.

Before you start

  • Node.js 22.5 or newer
  • A connection string (DSN) for your database

If it does not work

It exits as soon as the client starts it
It could not reach the database in the DSN. Check the host, port and password, and add ?sslmode=disable for a local Postgres without TLS.
A special character in the password breaks the DSN
URL-encode it, for example @ as %40.
It will not start on an older Node
DBHub needs Node.js 22.5 or newer for its built-in SQLite support.
explain_sql or health_check is missing
They are off by default. Switch them on in dbhub.toml.

Peas in a pod: similar servers

How DBHub lines up against other databases and data servers on the shelf.

ServerToolsRuns onLicenceStars
DBHub2Your computerMIT3.7K
Postgres MCP Pro9Your computer–3.4K
Supabase29Hosted–3K
MCP Toolbox for Databases29Your computerApache-2.016.7K
Qdrant2Your computerApache-2.01.6K

Questions

Which databases does it support?

PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite.

Why only two tools?

To keep context small: Bytebase measures about 1,400 tokens for the default set. You add more when you need them.

Can one server reach several databases?

Yes, through dbhub.toml. Each tool then takes the source you want.

Is it free?

Yes, MIT licensed. Bytebase sells a separate product with approval flows and audit logs for larger teams.

Full docs on GitHubbytebase/dbhub

Something wrong on this page? Tell us.

More in Databases and data