dbhub
by
bytebase

Description: Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.

View on GitHub ↗

Summary Information

Updated 41 minutes ago
Added to GitGenius on April 7th, 2025
Created on March 9th, 2025
Open Issues & Pull Requests: 2 (+0)
Number of forks: 267
Total Stargazers: 3,132 (+0)
Total Subscribers: 16 (+0)

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 179 days
Stale 30+ days: 2
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (7)
  • enhancement (3)
  • help wanted (2)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 2.0 hours
Mean response time: 33.7 hours
90th percentile: 2.7 days
Tracked items: 153

Most active contributors

Detailed Description

DBHub is a zero-dependency MCP server developed by Bytebase that enables AI agents and language models to interact with multiple database systems through a standardized interface. Written in TypeScript, it implements the Model Context Protocol to allow MCP-compatible clients such as Claude, Cursor, and Dify to connect to and explore PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite databases. The project is designed with token efficiency as a core principle, implementing just two primary MCP tools to maximize context window usage in AI applications.

The server provides two main database interaction tools: execute_sql for running SQL queries with transaction support and safety controls, and search_objects for exploring database schemas, tables, columns, indexes, and procedures through progressive disclosure. Additionally, users can define custom tools as reusable, parameterized SQL operations within a dbhub.toml configuration file. A built-in web workbench provides a visual interface for executing queries, running custom tools, and viewing request traces without requiring a separate MCP client.

DBHub prioritizes security and operational safety through several built-in guardrails. It supports read-only mode to prevent accidental modifications, implements row limiting to prevent excessive data retrieval, and enforces query timeouts to stop runaway operations. The server supports SSH tunneling and SSL/TLS encryption for secure database connections. The HTTP transport includes DNS-rebinding protection and defaults to loopback binding in production environments, with configurable allowed hosts to work behind reverse proxies.

The installation process is straightforward, supporting Docker deployment, NPM installation for Node.js 22.5.0 and above, and a demo mode for quick evaluation. Multi-database configuration allows simultaneous connections to multiple databases through TOML configuration files, making it suitable for managing production, staging, and development environments from a single DBHub instance. The project requires Node.js 22.5.0 or later due to its use of the built-in node:sqlite module.

According to GitGenius activity tracking across 153 issues and pull requests, the project maintains a median response latency of 2.0 hours with a mean of 33.7 hours, indicating active maintenance and community engagement. The most active contributor, tianzhou, has logged 460 events, with additional contributions from Diluka and jellydn. Bug reports represent the most common issue type with 7 tracked instances, followed by enhancement requests with 3 instances and help wanted items with 2 instances. The repository shares contributors with notable projects including zitadel/zitadel, microsoft/vscode, and typeorm/typeorm, suggesting integration with broader development ecosystems.

dbhub
by
bytebasebytebase/dbhub

Repository Details

Fetching additional details & charts...