DBHub
DBHub is a minimal MCP server: token-efficient, zero-dependency, and just two tools by default with opt-in extras. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases.
Why DBHub
Built to stay out of your way
Minimal by design
Zero dependencies, token-efficient, and a minimal set of MCP tools to keep your context window open.
Multi-database support
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite through a single interface.
Multi-connection
Connect to multiple databases simultaneously using TOML configuration.
Built-in guardrails
Read-only mode, row limiting, and query timeout prevent runaway operations.
Secure access
SSH tunneling and SSL/TLS encryption keep your connections safe.
Token Efficiency
DBHub loads just 2 tools by default at 1.4k tokens — 13–14x fewer than alternatives — keeping the context window open for your actual work.
MCP ServerDefault ConfigDefault ToolsDBHub1.4k2 (execute_sql, search_objects)MCP Toolbox19.0k28Supabase MCP19.3kallUse Cases
What people use DBHub for
Local development
Schema exploration, query validation, and data debugging with Claude Code, VS Code, Cursor, and more.
Non-technical access
Expose curated, read-only views to non-technical staff via Claude Desktop, VS Code, or Cursor.
Multi-database consolidation
Replace separate MCP servers for each database with a single DBHub process.
Production troubleshooting
Read-only diagnostics with guardrails against runaway queries.
MCP Tools
execute_sql
Execute SQL queries with transaction support and safety controls.
search_objects
Search and explore schemas, tables, columns, indexes, and procedures with progressive disclosure.
explain_sql (opt-in)
Show a query's execution plan without running it.
health_check (opt-in)
Report connection pool state and buffer cache hit ratio.
Custom Tools
Define reusable, parameterized SQL operations in your dbhub.toml configuration file.

Built-in interface
Workbench
Installation
Get started with a single command:
npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"Also available as a Docker image, MCP Bundle (one-click install, read-only), and Claude Code plugin. See the Installation Guide for all options, Command-Line Options for parameters, and Multi-Database Configuration for connecting several databases at once.
Development
Requires Node.js >= 22.5.0 (DBHub uses the built-in node:sqlite module).
# Install dependencies pnpm install # Run in development mode pnpm dev # Build and run for production pnpm build && pnpm start --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"

