dbhub

Level ALocal

Token conscious database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite.

Overview

DBHub is a lightweight database MCP server that connects to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite through a single interface. It loads just two tools by default at about 1.4k tokens to save context window. It supports multiple simultaneous connections, read-only mode, row limiting, and query timeouts, plus SSH tunneling and SSL/TLS. A built-in web workbench lets you run queries and view request traces.

⭐ 3.9kDatabaseTypeScriptRepo ↗Updated 2026-11-19

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub@latest",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@localhost:5432/dbname"
      ]
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/bytebase/dbhub

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub@latest",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@localhost:5432/dbname"
      ]
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers