DBHub MCP

A token-lean MCP server for PostgreSQL, MySQL, MariaDB, SQL Server and SQLite with a read-only mode

  • 3,752 ★ on the repository
  • Last commit
  • MIT
MCP serverEditors’ pick

Broad access

Why this level

  • Runs SQL against the connected database, including writes unless read-only
  • Handles a connection string containing a password
All reasons and checks

bytebase/dbhub

Install

Manual install

claude mcp add --transport stdio dbhub -- npx @bytebase/dbhub@latest --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs SQL against the connected database, including writes unless read-only
  • Handles a connection string containing a password

This is third-party code. Review the repository files before installing.

What it does

DBHub connects the agent to databases through one server. By default it exposes just two tools, SQL execution and schema object search, so it takes little context. Query plans and pool health checks are opt-in, and dbhub.toml can define custom parameterized SQL tools and multiple connections. It offers read-only mode, row limits, query timeouts, SSH tunneling and TLS, plus a built-in web workbench for manual queries.

Who it is for. For developers and analysts who want the agent to explore schemas and query databases.

Good fit when

  • You need to understand the schema of an unfamiliar database
  • You need to check a query or find data while debugging
  • You need to give colleagues safe read-only database access through an agent

Not a fit when

  • Your database is not supported, for example ClickHouse
  • The agent must not reach the production database even read-only

Example request

Find the order-related tables and show how many orders came in last week

MCP

Transport
stdio, http
Authentication
not required

Limitations

Only PostgreSQL, MySQL, MariaDB, SQL Server and SQLite are supported. Development needs Node 22.5 or newer. The connection string with its password lands in config, so pass it via an environment variable. Without read-only mode the agent can modify data.

How to disable. Run claude mcp remove dbhub or delete the dbhub block from .mcp.json.

FAQ

Can I connect several databases?

Yes, connections are defined in the TOML config.

How do I keep the password out of .mcp.json?

Pass the connection string via an environment variable such as ${DATABASE_URL}.

Discussion

No questions or reviews yet.

Official

A lightweight database workspace with an MCP server: the agent reads the schema, runs queries and explores data in PostgreSQL, MySQL and more

MCP serverBroad access5KRepository stars

MCP server that gives an agent access to MySQL: schema inspection and queries, read-only by default, writes behind flags

MCP serverExtended access2.2KRepository stars

A Python MCP server for MySQL: listing tables, reading data, running SQL and inspecting schema through a controlled interface

MCP serverBroad access1.4KRepository stars
Official

A desktop SQL workspace with a built-in MCP server: the agent reads the schema and runs queries in the same client you already use

MCP serverBroad access5.3KRepository stars

DB MCP Server

db-mcp-server

An MCP server for several databases with protection: a read-only mode per database and a row limit. Written in Go, launched in Docker

MCP serverBroad access474Repository stars
Editors’ pick

Official ClickHouse MCP server: the agent lists databases and tables and runs SQL, read-only by default

MCP serverExtended access899Repository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
DBHub (this entry)nonot required3,752
Anyquerynokey is optional1,787a SQLite-based SQL engine with plugins for apps
CentralMind Gatewaynokey is optional549a Go MCP server and REST API for databases
PG-MCP Servernonot required540an MCP server for PostgreSQL with several databases at once

README in short

The README explains the minimal-toolset approach and compares token use with other servers. It lists use cases, supported databases, tools, the workbench and guardrails. Install is one npx command, with other options in the docs: Docker, MCP Bundle and a Claude Code plugin. MIT licensed.

README badge

Report a problem

Foxx AIDBHub
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.