If you're tired of bloated database tools eating your context window, this is the MCP server to check out. Built by the Bytebase team, it connects Claude to PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite with just two core tools: execute_sql for running queries with transaction support and search_objects for exploring schemas without dumping entire table definitions. You get read-only mode, row limits, query timeouts, and SSH tunneling out of the box. The TOML config lets you connect to multiple databases simultaneously, and there's a built-in web workbench for testing queries without spinning up an MCP client. Zero dependencies, token efficient by design, perfect for local development.
[!NOTE]
Brought to you by Bytebase, open-source database governance platform.
+------------------+ +--------------+ +------------------+
| | | | | |
| | | | | |
| Claude Desktop +--->+ +--->+ PostgreSQL |
| | | | | |
| Claude Code +--->+ +--->+ SQL Server |
| | | | | |
| Cursor +--->+ DBHub +--->+ SQLite |
| | | | | |
| VS Code +--->+ +--->+ MySQL |
| | | | | |
| Copilot CLI +--->+ +--->+ MariaDB |
| | | | | |
| | | | | |
+------------------+ +--------------+ +------------------+
MCP Clients MCP Server Databases
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:
DBHub is the official example in the Claude Code docs for connecting to PostgreSQL via MCP.
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 Server | Default Config | Default Tools |
|---|---|---|
| DBHub | 1.4k | 2 (execute_sql, search_objects) |
| MCP Toolbox | 19.0k | 28 |
| Supabase MCP | 19.3k | all |
PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.
DBHub implements MCP tools for database operations:
dbhub.toml configuration fileDBHub includes a built-in web interface for interacting with your database tools. It provides a visual way to execute queries, run custom tools, and view request traces without requiring an MCP client.

npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Also available as:
See the Installation Guide for all options, Command-Line Options for parameters, and Multi-Database Configuration for connecting several databases at once.
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"
DSNsecretDatabase connection string (e.g., postgres://user:pass@host:5432/db)
DB_TYPEDatabase type: postgres, mysql, mariadb, sqlserver, sqlite
DB_HOSTDatabase hostname
DB_PORTDatabase port
DB_USERDatabase username
DB_PASSWORDsecretDatabase password
DB_NAMEDatabase name or SQLite file path
TRANSPORTTransport mode: stdio or http
PORTHTTP server port (default: 8080)
IDInstance identifier for tool names
SSH_HOSTSSH server hostname
SSH_PORTSSH server port (default: 22)
SSH_USERSSH username
SSH_PASSWORDsecretSSH password
SSH_KEYPath to SSH private key
SSH_PASSPHRASEsecretSSH key passphrase
hovecapital/read-only-local-postgres-mcp-server
cocaxcode/database-mcp
io.github.infoinlet-marketplace/mcp-mysql
io.github.cybeleri/database-admin
io.github.yash-0620/postgres-mcp-secured