Universal database gateway implementing the Model Context Protocol (MCP) server interface. Lets MCP-compatible clients (Cursor, Claude Desktop, etc.) connect to MySQL, PostgreSQL, SQL Server and MariaDB.
https://github.com/bytebase/dbhubYou're building with AI-powered development tools like Cursor and Claude Desktop, but every time you need database insights, you're alt-tabbing to your SQL client, running queries, copying results, and pasting them back into your AI conversation.
DBHub eliminates this workflow friction entirely.
Instead of configuring database connections separately for each AI tool, DBHub acts as a universal gateway. Point your MCP-compatible clients to DBHub, and they can instantly query MySQL, PostgreSQL, SQL Server, and MariaDB databases directly within your AI conversations.
# Single command, immediate database access in any MCP client
npx @bytebase/dbhub --dsn "postgres://user:pass@localhost:5432/db"
Your AI tools can now:
Before DBHub: You're debugging a slow query in Cursor. You describe the issue, Cursor suggests optimizations, you copy the SQL to your database client, run it, copy results back, paste into Cursor, repeat.
With DBHub: You ask Cursor "Why is this query slow?" It immediately examines your actual table structure, indexes, and data patterns, then tests optimizations directly against your database.
Before DBHub: Building a new feature requires understanding your data model. You explain table relationships to Claude Desktop from memory (and probably get some details wrong).
With DBHub: Claude Desktop explores your actual schema, understands foreign key relationships, suggests proper joins, and validates queries against real data.
Run DBHub in read-only mode for production databases:
npx @bytebase/dbhub --readonly --dsn "postgres://user:pass@prod-db:5432/app"
Your AI tools get full schema visibility and query capabilities without any risk of data modification. SSL connections are supported across all database types with proper certificate validation.
Cursor: Click the install button, paste your database connection string, done. Your next chat session has full database context.
Claude Desktop: Add DBHub to your MCP config once, and every conversation can access your database schemas and execute queries.
Docker: One command gets you running with any database type - no dependency management needed.
Switch between MySQL for your main app, PostgreSQL for analytics, and SQL Server for legacy systems without reconfiguring anything. DBHub handles the connection specifics while your AI tools work with a consistent interface.
# Production MySQL
npx @bytebase/dbhub --dsn "mysql://app:secret@prod-mysql:3306/store"
# Analytics PostgreSQL
npx @bytebase/dbhub --dsn "postgres://analyst:key@warehouse:5432/analytics"
# Legacy SQL Server
npx @bytebase/dbhub --dsn "sqlserver://admin:pass@legacy:1433/orders"
DBHub handles SSL connections properly, supports Azure Active Directory authentication for SQL Server, and includes comprehensive integration tests against real database containers. When you're ready to deploy, it scales horizontally and works with any reverse proxy for authentication.
The 748 GitHub stars and active development by the Bytebase team (the database DevSecOps platform) mean you're building on a foundation that's proven in production environments.
# Install and run with your database
npx @bytebase/dbhub --dsn "postgres://user:password@localhost:5432/mydb"
# Or try the demo endpoint
# Point Cursor to: https://demo.dbhub.ai/message
Your AI development workflow just got a major upgrade. No more copy-paste between tools, no more explaining your database schema from memory, no more context switching to run queries.
DBHub puts your database directly into your AI conversations where it belongs.