DBHub — AI Meets Your Database
Supported Databases
| Database | Status |
|---|---|
| PostgreSQL | ✅ |
| MySQL | ✅ |
| MariaDB | ✅ |
| SQL Server | ✅ |
| SQLite | ✅ |
Why Only Two Tools?
Most database MCP servers expose dozens of tools, consuming precious context window tokens. DBHub takes a minimalist approach with just two tools, maximizing the space available for your actual queries and results.
Safety Features
- Read-only mode — Prevent accidental writes
- Row limiting — Cap result set sizes
- Query timeout — Prevent runaway queries
- SSL/TLS — Encrypted connections
- SSH tunneling — Secure access to remote databases
Installation Options
# NPX (recommended)
npx @bytebase/dbhub --transport http --port 8080 --dsn "postgres://..."
# Docker
docker run --rm --init --name dbhub \
--publish 8080:8080 bytebase/dbhub \
--transport http --port 8080 --dsn "postgres://..."
# Multi-database via TOML config
npx @bytebase/dbhub --transport http --port 8080 --config databases.tomlMulti-Database Config
[[databases]]
name = "production"
dsn = "postgres://user:pass@prod-host/mydb"
[[databases]]
name = "analytics"
dsn = "mysql://user:pass@analytics-host/warehouse"FAQ
Q: What is DBHub? A: DBHub is a zero-dependency database MCP server that connects AI agents to PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite using just two token-efficient MCP tools.
Q: Is DBHub free? A: Yes, DBHub is free and open source under the MIT license.
Q: Is it safe to connect AI to my database? A: DBHub includes read-only mode, row limits, and query timeouts to prevent accidental data modification or runaway queries.