Skip to main content

Connect AI to Your Databases

DBHub is a zero-dependency MCP server that bridges Claude, Cursor, and other AI clients with PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite databases. Token-efficient, secure, and built for local development.

Quick Start

Get DBHub running in minutes with Docker, npm, or demo mode.

1

Run DBHub with Docker

Launch DBHub with your database connection string:
Docker
docker run --rm --init \
  --name dbhub \
  --publish 8080:8080 \
  bytebase/dbhub \
  --transport http \
  --port 8080 \
  --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Replace the DSN with your actual database connection details. DBHub supports PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.
2

Or use npm to run DBHub

No Docker? Run directly with npx:
npm
npx @bytebase/dbhub@latest \
  --transport http \
  --port 8080 \
  --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
3

Try demo mode (no database required)

Explore DBHub with a built-in SQLite employee database:
Demo Mode
npx @bytebase/dbhub@latest --transport http --port 8080 --demo
Demo mode is perfect for testing DBHub’s capabilities without connecting to a real database.
4

Access the workbench

Open your browser to http://localhost:8080 to access the built-in web workbench. Execute queries, explore schemas, and test MCP tools visually.
The workbench provides a visual interface for all DBHub tools without requiring an MCP client.

Key Features

Built for AI-powered database workflows with developer experience in mind.

Zero Dependencies

Lightweight MCP server with no external dependencies. Just two powerful tools to maximize your context window.

Multi-Database Support

Connect to PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a unified interface.

Token-Efficient Schema Exploration

Progressive disclosure design minimizes token usage while exploring database schemas, tables, and columns.

Multi-Connection Configuration

Manage multiple database connections simultaneously with TOML configuration files.

Secure Access

SSH tunneling and SSL/TLS encryption for secure database connections through bastion hosts.

Built-in Workbench

Web interface for executing queries and testing MCP tools without an MCP client.

Query Guardrails

Read-only mode, row limiting, and query timeouts to prevent runaway operations.

Custom Tools

Define reusable, parameterized SQL operations in your configuration file.

Supported Databases

Connect to any of these databases through a unified MCP interface.

PostgreSQL

Full support for PostgreSQL with schemas, procedures, and advanced features.

MySQL

Connect to MySQL databases with full schema exploration support.

MariaDB

MariaDB connector with compatibility for MySQL workflows.

SQL Server

Microsoft SQL Server support including named instances and NTLM authentication.

SQLite

Lightweight SQLite support for file-based and in-memory databases.

SSH Tunnels

Secure connections through SSH tunnels with key-based or password authentication.

Ready to Connect AI to Your Database?

Get started with DBHub in minutes. Zero dependencies, token-efficient, and built for local development.