dbhub  by bytebase

Universal database gateway for Model Context Protocol (MCP) clients

created 4 months ago
1,041 stars

Top 36.7% on sourcepulse

GitHubView on GitHub
Project Summary

DBHub is a universal database gateway that implements the Model Context Protocol (MCP) server interface, enabling MCP-compatible clients to connect to and explore various databases. It targets developers and AI agents needing unified access to diverse data sources, simplifying database interaction and data exploration.

How It Works

DBHub acts as a proxy, translating MCP requests into database-specific queries. It supports multiple transport protocols, including stdio for direct integration with tools like Claude Desktop and sse for network clients. This dual transport approach offers flexibility for different integration scenarios. The project provides specific Docker images and npm packages for easy deployment and usage.

Quick Start & Requirements

  • Docker: docker run --rm --init --name dbhub --publish 8080:8080 bytebase/dbhub --transport sse --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
  • NPM: npx @bytebase/dbhub --transport sse --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
  • Demo Mode: docker run --rm --init --name dbhub --publish 8080:8080 bytebase/dbhub --transport sse --port 8080 --demo or npx @bytebase/dbhub --transport sse --port 8080 --demo
  • Dependencies: Node.js, pnpm (for development). Oracle requires Oracle Instant Client and setting ORACLE_LIB_DIR.
  • Resources: Demo mode uses an in-memory SQLite database. Production usage requires database credentials and network access.
  • Docs: https://github.com/bytebase/dbhub

Highlighted Details

  • Supports PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, and Oracle.
  • Offers read-only mode for enhanced security on production databases.
  • Provides a demo mode with a sample employee database for immediate testing.
  • Supports Azure Active Directory authentication for SQL Server.

Maintenance & Community

The project is maintained by Bytebase. Contributors are listed in the README.

Licensing & Compatibility

The project appears to be under the Apache License 2.0. Compatibility for commercial use is generally permissive under this license.

Limitations & Caveats

Oracle connections may require using the bytebase/dbhub-oracle-thick Docker image or installing Oracle Instant Client for older versions or specific configurations. The stdio transport is primarily for desktop applications.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
9
Star History
668 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.