DBHub MCP server
2026년 11월 12일 커밋Connects AI clients to PostgreSQL, MySQL, SQL Server, Oracle, MariaDB, and SQLite to explore schemas and execute SQL queries.
다른 이름 bytebase/dbhub, @bytebase/dbhub
- 스타
- 3,843
- Tools
- —
- 다운로드, 30일
- 176,231
- 최신 버전
- 1.6.1
- 마지막 커밋
- 2026년 11월 12일
- 라이선스
- MIT
DBHub MCP란?
DBHub은(는) MCP server입니다. Connects AI clients to PostgreSQL, MySQL, SQL Server, Oracle, MariaDB, and SQLite to explore schemas and execute SQL queries.
프로젝트 README에서 생성된 요약
DBHub MCP server 정보
Connecting AI clients to diverse database systems is what DBHub enables for developers using tools like Claude Desktop, Cursor, or VS Code. This lightweight gateway provides a single interface to interact with PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite. By using a minimal set of tools, it preserves the context window of your AI client, consuming only 1.4k tokens by default.
Users can configure multiple simultaneous connections through a TOML file and manage access via SSH tunneling or SSL/TLS encryption. The server includes safety features such as read-only mode, row limiting, and query timeouts to prevent accidental or runaway operations. Beyond the standard execute_sql and search_objects tools, users can opt-in to explain_sql and health_check or define their own parameterized operations. It is designed to be a zero-dependency solution that works locally via npx or through Docker containers.
활용 사례
- 1Local Schema ExplorationA developer can use an AI client to navigate and understand complex database structures.
- 2Consolidating Database ConnectionsTeams can replace multiple specialized MCP servers with one single process to manage various database types.
- 3Safe Production DiagnosticsEngineers can perform troubleshooting on live data using built-in protections against heavy queries.
- 4Providing Data Access to Non-Technical StaffOrganizations can grant limited, read-only visibility into specific data views for employees who do not write code.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
DBHub MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 DBHub MCP 설치
$ claude mcp add --env DB_PASSWORD=<YOUR_DB_PASSWORD> --env DSN=<YOUR_DSN> --env SSH_PASSPHRASE=<YOUR_SSH_PASSPHRASE> --env SSH_PASSWORD=<YOUR_SSH_PASSWORD> dbhub -- npx -y @bytebase/dbhubCursor에 DBHub MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DSN": "<YOUR_DSN>",
"SSH_PASSPHRASE": "<YOUR_SSH_PASSPHRASE>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}VS Code에 DBHub MCP 설치
.vscode/mcp.json
{
"servers": {
"dbhub": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DSN": "<YOUR_DSN>",
"SSH_PASSPHRASE": "<YOUR_SSH_PASSPHRASE>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}Claude Desktop에 DBHub MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DSN": "<YOUR_DSN>",
"SSH_PASSPHRASE": "<YOUR_SSH_PASSPHRASE>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}Codex에 DBHub MCP 설치
~/.codex/config.toml
[mcp_servers.dbhub] command = "npx" args = ["-y", "@bytebase/dbhub"] [mcp_servers.dbhub.env] DB_PASSWORD = "<YOUR_DB_PASSWORD>" DSN = "<YOUR_DSN>" SSH_PASSPHRASE = "<YOUR_SSH_PASSPHRASE>" SSH_PASSWORD = "<YOUR_SSH_PASSWORD>"
Gemini CLI에 DBHub MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DSN": "<YOUR_DSN>",
"SSH_PASSPHRASE": "<YOUR_SSH_PASSPHRASE>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}구성
DB_PASSWORD비밀Database password
DSN비밀Database connection string (e.g., postgres://user:pass@host:5432/db)
SSH_PASSPHRASE비밀SSH key passphrase
SSH_PASSWORD비밀SSH password
DB_HOSTDatabase hostname
DB_NAMEDatabase name or SQLite file path
DB_PORTDatabase port
DB_TYPEDatabase type: postgres, mysql, mariadb, sqlserver, oracle, sqlite
DB_USERDatabase username
IDInstance identifier for tool names
PORTHTTP server port (default: 8080)
SSH_AUTH_SOCKPath to SSH agent socket
SSH_HOSTSSH server hostname
SSH_KEYPath to SSH private key
SSH_PORTSSH server port (default: 22)
SSH_USERSSH username
TRANSPORTTransport mode: stdio or http
| 이름 | 설명 | 유형 |
|---|---|---|
| DB_PASSWORD | Database password | 비밀 |
| DSN | Database connection string (e.g., postgres://user:pass@host:5432/db) | 비밀 |
| SSH_PASSPHRASE | SSH key passphrase | 비밀 |
| SSH_PASSWORD | SSH password | 비밀 |
| DB_HOST | Database hostname | |
| DB_NAME | Database name or SQLite file path | |
| DB_PORT | Database port | |
| DB_TYPE | Database type: postgres, mysql, mariadb, sqlserver, oracle, sqlite | |
| DB_USER | Database username | |
| ID | Instance identifier for tool names | |
| PORT | HTTP server port (default: 8080) | |
| SSH_AUTH_SOCK | Path to SSH agent socket | |
| SSH_HOST | SSH server hostname | |
| SSH_KEY | Path to SSH private key | |
| SSH_PORT | SSH server port (default: 22) | |
| SSH_USER | SSH username | |
| TRANSPORT | Transport mode: stdio or http |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음@bytebase/dbhub looks like dchub-mcp-server결함 발견
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지와 의존성에 심각한 보안 권고 없음통과
README
GitHub에서 보기[!NOTE]
If you need an enterprise-level database MCP server with built-in guardrails like approval flow, access control, data masking, and audit logging beyond what DBHub offers, check out Bytebase.
+------------------+ +--------------+ +------------------+
| | | | | |
| Claude Desktop +--->+ +--->+ PostgreSQL |
| | | | | |
| Claude Code +--->+ +--->+ SQL Server |
| | | | | |
| Cursor +--->+ DBHub +--->+ Oracle |
| | | | | |
| VS Code +--->+ +--->+ SQLite |
| | | | | |
| Copilot CLI +--->+ +--->+ MySQL |
| | | | | |
| | | +--->+ MariaDB |
| | | | | |
+------------------+ +--------------+ +------------------+
MCP Clients MCP Server Databases
DBHub is a minimal MCP server: token-efficient, zero-dependency, and just two tools by default with opt-in extras. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:
- Minimal: Zero dependency, token efficient with a minimal set of MCP tools to maximize context window
- Multi-Database: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, 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
DBHub is the official example in the Claude Code docs for connecting to PostgreSQL via MCP.
Token Efficiency
DBHub loads just 2 tools by default at 1.4k tokens — 13-14x fewer than alternatives — keeping the context window open for your actual work.
| MCP Server | Default Config | Default Tools |
|---|---|---|
| DBHub | 1.4k | 2 (execute_sql, search_objects) |
| MCP Toolbox | 19.0k | 28 |
| Supabase MCP | 19.3k | all |
Use Cases
- Local Development: Schema exploration, query validation, and data debugging with Claude Code, VS Code, Cursor, etc.
- Non-Technical Access: Expose curated, read-only views to non-technical staff via Claude Desktop, VS Code, Cursor, etc.
- Multi-Database Consolidation: Replace separate MCP servers for each database with a single DBHub process
- Production Troubleshooting: Read-only diagnostics with guardrails against runaway queries
Supported Databases
PostgreSQL, MySQL, SQL Server, MariaDB, Oracle, 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 disclosure
- explain_sql (opt-in): Show a query's execution plan without running it
- health_check (opt-in): Report connection pool state and buffer cache hit ratio
- Custom Tools: Define reusable, parameterized SQL operations in your
dbhub.tomlconfiguration file
Workbench
DBHub includes a built-in web interface for interacting with your database tools. It provides a visual way to execute queries, run custom tools, and view request traces without requiring an MCP client.

Installation
npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Also available as:
- Docker image
- MCP Bundle (one-click install, read-only)
- Claude Code plugin
See the Installation Guide for all options, Command-Line Options for parameters, and Multi-Database Configuration for connecting several databases at once.
Development
Requires Node.js >= 22.5.0 (DBHub uses the built-in node:sqlite module).
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build and run for production
pnpm build && pnpm start --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"
Contributors
Star History
DBHub MCP 질문
DBHub MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env DB_PASSWORD=<YOUR_DB_PASSWORD> --env DSN=<YOUR_DSN> --env SSH_PASSPHRASE=<YOUR_SSH_PASSPHRASE> --env SSH_PASSWORD=<YOUR_SSH_PASSWORD> dbhub -- npx -y @bytebase/dbhub를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
DBHub MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Which databases can DBHub connect to?
DBHub connects to PostgreSQL, MySQL, SQL Server, MariaDB, Oracle, and SQLite through a single interface.
What MCP tools does DBHub provide?
By default it loads two tools, execute_sql and search_objects, with opt-in explain_sql, health_check, and custom tools.
Can DBHub connect to multiple databases at once?
Yes, multi-connection is supported through TOML configuration.
Does DBHub have read-only safety controls?
Yes, it offers read-only mode, row limiting, and query timeouts to prevent runaway operations.
How do I run DBHub?
You can start it with npx using the HTTP transport, and it is also available as a Docker image, MCP Bundle, and Claude Code plugin.