</>MCP Agents Market
MCP Server

dbhub

by bytebase3.5kTypeScriptUpdated 2026-09-02

Token conscious database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.

Claude DesktopClaude CodeCursorVS CodeCopilot CLI

DBHub is a token-efficient MCP server that connects AI assistants to PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite databases. Built by Bytebase, it loads just two tools by default (execute_sql and search_objects) consuming only 1.4k tokens—13-14x fewer than alternative database MCP servers—to preserve context window space. The server offers read-only mode, row limits, query timeouts, SSH tunneling, and optional tools like explain_sql and health_check. It supports simultaneous connections to multiple databases through TOML configuration and includes a built-in web workbench for visual query execution.

Key Features

Multi-database support for PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a single interface
Token-efficient design with only 1.4k tokens for default configuration (2 tools), 13-14x less than alternatives
Zero-dependency implementation with minimal tool surface to maximize context window availability
Safety guardrails including read-only mode, row limiting, and query timeout controls
Multi-connection capability to query multiple databases simultaneously via TOML configuration
SSH tunneling and SSL/TLS encryption for secure remote database access
Built-in web workbench for visual query execution and request trace debugging
Custom tool definitions for parameterized, reusable SQL operations in configuration

Use Cases

  • 01Local development schema exploration and query validation in Claude Code, VS Code, or Cursor
  • 02Providing non-technical staff with curated, read-only database access through Claude Desktop
  • 03Consolidating multiple database MCP servers into a single DBHub process for multi-database environments
  • 04Production database troubleshooting with read-only diagnostics and runaway query protection
  • 05Progressive database schema discovery using search_objects to explore tables, columns, and indexes
  • 06Query optimization by analyzing execution plans with explain_sql before running expensive queries

Related MCP Servers

View more

dbhub — FAQ

What is the DBHub MCP server?+

DBHub is a Model Context Protocol server that allows AI assistants like Claude, Cursor, and VS Code to connect to and query relational databases including PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite. It's designed to be token-efficient and includes safety features like read-only mode and query limits.

How do I install the DBHub MCP server?+

Run DBHub using npx with your database connection string, then add the configuration to your MCP client's settings file. For example, use 'npx @bytebase/dbhub@latest' with transport and DSN parameters, then configure Claude Desktop, Claude Code, or VS Code to connect to it. Docker and MCP Bundle one-click installation options are also available.

Which AI clients work with DBHub?+

DBHub works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, VS Code with MCP extensions, and Copilot CLI. It is the official example in Claude Code documentation for PostgreSQL database connections.

Do I need API keys or database credentials for DBHub?+

You need valid database credentials (username, password, host, port, database name) for the databases you want to connect to. No separate API keys are required; DBHub connects directly to your databases using standard connection strings (DSNs).

Is DBHub free to use?+

Yes, DBHub is an open-source MCP server developed by Bytebase and available for free on GitHub. It requires Node.js 22.5.0 or higher to run.

What are the default tools and how can I enable additional ones?+

DBHub loads two tools by default: execute_sql for running queries and search_objects for schema exploration. You can opt-in to additional tools like explain_sql for execution plans, health_check for connection diagnostics, and define custom tools in your dbhub.toml configuration file.

How do I install dbhub?+

Open the source repository on GitHub and follow its README. dbhub is a mcp server — MCP Agents Market links you directly to the official repo.

Is dbhub free?+

dbhub is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches