MCP ConfigsMay 13, 2026·2 min read

DBHub — Token-Efficient Database MCP Server

Database MCP server for Postgres/MySQL/MariaDB/SQL Server/SQLite. Includes execute_sql + schema search with guardrails: read-only, row limits, timeouts.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Stage only
Trust
Trust: Established
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install e2d65e60-8e23-5483-9d77-568f90a028ba --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

DBHub is a token-efficient database MCP server: connect MCP clients to multiple databases and run safe queries with built-in guardrails.

Best for: Agent builders who need a safer, maintainable database tool surface via MCP

Works with: MCP clients (Claude Desktop/Code, Cursor, VS Code, Copilot CLI) and DB DSNs (see README)

Setup time: 10–30 minutes

Key facts (verified)

  • README lists multiple databases: PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.
  • Quick start includes both Docker and NPM (npx @bytebase/dbhub@latest ...) install paths (README).
  • GitHub: 2,744 stars · 232 forks; pushed 2026-04-21 (GitHub API verified).

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.

DBHub Logo

            +------------------+    +--------------+    +------------------+
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            |  Claude Desktop  +--->+              +--->+    PostgreSQL    |
            |                  |    |              |    |                  |
            |  Claude Code     +--->+              +--->+    SQL Server    |
            |                  |    |              |    |                  |
            |  Cursor          +--->+    DBHub     +--->+    SQLite        |
            |                  |    |              |    |                  |
            |  VS Code         +--->+              +--->+    MySQL         |
            |                  |    |              |    |                  |
            |  Copilot CLI     +--->+              +--->+    MariaDB       |
            |                  |    |              |    |                  |
            |                  |    |              |    |                  |
            +------------------+    +--------------+    +------------------+
                 MCP Clients           MCP Server             Databases

DBHub 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.

🙏

Source & Thanks

Source: https://github.com/bytebase/dbhub > License: MIT > GitHub stars: 2,744 · forks: 232

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets