LogoSTMCP
Download
dbhub

DBHub

DBHub is a universal database gateway implementing the Model Context Protocol (MCP) server interface, allowing MCP-compatible clients to connect to and explore PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite databases.

Tools

1. execute_sql

Execute single or multiple SQL statements (separated by semicolons).

2. generate_sql

Generate SQL based on database context and requirements.

3. explain_db

Explain database elements such as tables, schemas, and relationships.

Open Graph image for DBHub

JSON Config

{
  "mcpServers": {
    "dbhub-postgres-docker": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "bytebase/dbhub",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@host.docker.internal:5432/dbname?sslmode=disable"
      ]
    },
    "dbhub-postgres-npx": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@localhost:5432/dbname?sslmode=disable"
      ]
    },
    "dbhub-demo": {
      "command": "npx",
      "args": ["-y", "@bytebase/dbhub", "--transport", "stdio", "--demo"]
    }
  }
}

Useful Links

Information