dbhub

by bytebase

Pending

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.

2,036stars
169forks
TypeScript
Added 12/27/2025
AI Agentsagentsaianthropicclaudeclaude-aicodexcursordatabasedifyllmmariadbmcpmcp-servermssqlmysqlpostgrespostgresqlsqlsqlitesqlserver
Installation
# Add to your Claude Code skills
git clone https://github.com/bytebase/dbhub
README.md

[!NOTE]
Brought to you by Bytebase, open-source database DevSecOps platform.

<p align="center"> <a href="https://dbhub.ai/" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-dark.svg" width="75%"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-light.svg" width="75%"> <img src="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-light.svg" width="75%" alt="DBHub Logo"> </picture> </a> </p>
            +------------------+    +--------------+    +------------------+
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            |  Claude Desktop  +--->+              +--->+    PostgreSQL    |
            |                  |    |              |    |                  |
            |  Claude Code     +--->+              +--->+    SQL Server    |
            |                  |    |              |    |                  |
            |  Cursor          +--->+    DBHub     +--->+    SQLite        |
            |                  |    |              |    |                  |
            |  VS Code         +--->+              +--->+    MySQL         |
            |                  |    |              |    |                  |
            |  Copilot CLI     +--->+              +--->+    MariaDB       |
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            +------------------+    +--------------+    +------------------+
                 MCP Clients           MCP Server             Databases

DBHub is a zero-dependency, token efficient MCP server implementing the Model Context Protocol (MCP) server interface. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:

  • Local Development First: Zero dependency, token efficient with just two MCP tools to maximize context window
  • Multi-Database: PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a single interface
  • Multi-Connection: Connect to multiple databases simultaneously with TOML configuration
  • Guardrails: Read-only mode, row limiting, and query timeout to prevent runaway operations
  • Secure Access: SSH tunneling and SSL/TLS encryption

Supported Databases

PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.

MCP Tools

DBHub implements MCP tools for database operations:

  • execute_sql: Execute SQL queries with transaction support and safety controls
  • search_objects: Search and explore database schemas, tables, columns, indexes, and procedures with progressive dis...