Main
Database MCP without tool sprawl
If you want agents to work with data, you usually need two safe primitives:
- Search schema (tables/columns/indexes) before writing SQL
- Execute SQL with strict limits
DBHub ships both and adds guardrails (read-only mode, row limits, query timeouts). For production, start read-only and gate write access behind explicit review or separate credentials.
README excerpt (verbatim)
[!NOTE]
Brought to you by Bytebase, open-source database DevSecOps platform.
+------------------+ +--------------+ +------------------+
| | | | | |
| | | | | |
| Claude Desktop +--->+ +--->+ PostgreSQL |
| | | | | |
| Claude Code +--->+ +--->+ SQL Server |
| | | | | |
| Cursor +--->+ DBHub +--->+ SQLite |
| | | | | |
| VS Code +--->+ +--->+ MySQL |
| | | | | |
| Copilot CLI +--->+ +--->+ MariaDB |
| | | | | |
| | | | | |
+------------------+ +--------------+ +------------------+
MCP Clients MCP Server DatabasesDBHub is a zero-dependency, token efficient MCP server implementing the Model Context Protocol (MCP) server interface. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:
- Local Development First: Zero dependency, token efficient with just two MCP tools to maximize context window
- Multi-Database: PostgreSQL, MySQL, MariaDB, SQL Server, 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
Supported Databases
FAQ
Q: Can it connect to multiple DBs? A: Yes—README mentions multi-connection support via TOML configuration.
Q: Is it safe by default? A: README describes guardrails like read-only mode, row limiting, and query timeouts—still review before production use.
Q: How do I try it quickly?
A: Use the README demo mode: run with --demo and then connect an MCP client to the server.