# Database

> Universal MCP server for accessing various databases including PostgreSQL, MySQL, SQL Server, SQLite via MCP protocol. Supports SQL query execution, CRUD, schema exploration for agent data retrieval. Compares favorably to direct SDKs by providing a consistent MCP gateway for multiple DB types.

- **URL:** https://github.com/bytebase/dbhub
- **Category:** Databases & Storage MCP Servers
- **Tags:** Mcp Server, Database, Sql, Postgresql, Mongodb
- **Updated:** 2026-04-23 17:02
- **Canonical page:** https://mcpserver.ever.works/items/database

## Details

# Database (DBHub)

**Source:** [GitHub - bytebase/dbhub](https://github.com/bytebase/dbhub)

## Description
DBHub is a universal database gateway implementing the Model Context Protocol (MCP) server interface. It allows MCP-compatible clients to connect to and explore multiple database types, including PostgreSQL, MySQL, Microsoft SQL Server, SQLite, and more.

## Features
- **Universal MCP Server:** Acts as a gateway for MCP-compatible clients (e.g., Claude Desktop, Cursor) to connect to various databases.
- **Supported Database Types:**
  - PostgreSQL
  - MySQL
  - Microsoft SQL Server
  - SQLite
  - (Mentions support for Redshift, CockroachDB, RDS MySQL, BigQuery, Oracle DB, though primary support for first four is detailed)
- **Demo Mode:** Includes a bundled SQLite \"employee\" sample database for testing, with tables for employees, departments, salaries, etc.
- **Resource Exploration:**
  - List schemas, tables, table structures, indexes, and procedures (procedure support varies by DB type).
- **Database Tools:**
  - Execute queries (`run_query`)
  - List available connectors (`list_connectors`)
- **Prompt Capabilities:**
  - Generate SQL statements (`generate_sql`)
  - Explain database elements (`explain_db`)
- **Flexible Connection:**
  - Connect to databases using DSN via command line, environment variable, or environment file.
  - Supports connection to local and remote databases.
- **Transport Modes:**
  - `stdio` (default): For direct integration with tools like Claude Desktop.
  - `sse`: For browser and network clients.
- **Docker and NPM Installation:**
  - Run as a Docker container or via NPM.
- **Open Source:**
  - Licensed under the MIT License.
  - Written primarily in TypeScript.
- **Integration Guides:**
  - Examples for integration with Claude Desktop and Cursor.
- **Customizable Command Line Options:**
  - `--demo`, `--dsn`, `--transport`, `--port`.
- **Development Ready:**
  - Setup scripts for development and production environments.
- **Sample Endpoints:**
  - Demo SSE endpoint available for testing with sample data.

## Pricing
No pricing information is provided. DBHub is open source and available under the MIT License.

## Tags
`mcp-server`, `database`, `SQL`, `PostgreSQL`, `MongoDB`

## Category
`Databases & Storage MCP Servers`

---

_This Markdown mirror is generated by Ever Works for AI agents. The canonical HTML page is at https://mcpserver.ever.works/items/database._
