Loading...

DBHub is a zero-dependency MCP server enabling database access (PostgreSQL, MySQL, SQLite, etc.) for MCP clients with safety controls and multi-database support.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
DBHub is a zero-dependency MCP server enabling database access (PostgreSQL, MySQL, SQLite, etc.) for MCP clients with safety controls and multi-database support.
DBHub offers several safety features, but the ability to execute arbitrary SQL queries means careful configuration and monitoring are necessary. It's safer in read-only mode with strict row limits and query timeouts. Risks increase with write access and custom tools.
Performance depends on the underlying database and the complexity of the queries. Network latency can also impact performance. Consider using connection pooling for high-volume scenarios.
DBHub itself is open-source, but the underlying databases may incur costs depending on the database platform and usage. Token usage will depend on the complexity of the queries and the amount of data returned.
npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"DSNTRANSPORTexecute_sqlExecutes SQL queries against the configured databases, supporting transactions.
Allows arbitrary SQL execution, potentially leading to data modification or deletion.
search_objectsSearches and explores database schemas, tables, columns, and other database objects.
Read-only operation that does not modify data.
Custom ToolsExecutes user-defined SQL operations defined in the configuration file.
The danger level depends entirely on the SQL defined in the custom tool, which could be anything.
Environment Variable
local
DBHub offers several safety features, but the ability to execute arbitrary SQL queries means careful configuration and monitoring are necessary. It's safer in read-only mode with strict row limits and query timeouts. Risks increase with write access and custom tools.
Autonomy is highly dependent on the configuration and the SQL executed. Exercise caution when granting write access or using custom tools.
Production Tip
Implement strict query timeouts and row limits to prevent runaway queries from impacting performance.
DBHub supports PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.
You can use a TOML configuration file to define multiple database connections.
Yes, you can configure DBHub to operate in read-only mode to prevent data modification.
Custom tools are reusable, parameterized SQL operations defined in the `dbhub.toml` configuration file.
Use SSH tunneling, SSL/TLS encryption, and restrict access to authorized users only.
Yes, DBHub supports row limiting to prevent large data transfers.
Yes, DBHub includes a built-in web interface for interacting with your database tools.