MCP Directory

DBHub vs PGMCP - PostgreSQL Model Context Protocol Server

A side-by-side comparison of two Databases servers — tools, transport, auth, maintenance, and copy-paste config for each.

 DBHub

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, and SQLite.

Unverified
stdio (local)
No auth
TypeScript
PGMCP - PostgreSQL Model Context Protocol Server

Query any PostgreSQL database in natural language via MCP, with safe read-only SQL and streaming.

Unverified
HTTP (remote)
API key
Go
CategoryDatabasesDatabases
LanguageTypeScriptGo
Transportstdio (local)HTTP (remote)
AuthNoneAPI key
GitHub stars3.0k536
Last commit1 month ago2 months ago
Verified
Actively maintained
Installnpx @bytebase/dbhub@latest --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"brew tap subnetmarco/homebrew-tap && brew install pgmcp
RepoOpen Open

Verdict

Pick DBHub if you prefer the more popular, battle-tested option, and you want a local (stdio) server that keeps data on your machine.

Pick PGMCP - PostgreSQL Model Context Protocol Server if you want a hosted/remote server with nothing to install.

Add DBHub

Install / run
npx @bytebase/dbhub@latest --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

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

Add PGMCP - PostgreSQL Model Context Protocol Server

Install / run
brew tap subnetmarco/homebrew-tap && brew install pgmcp

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "pgmcp---postgresql-model-context-protocol-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:8080/mcp"
      ]
    }
  }
}

Claude Desktop connects to remote servers through the `mcp-remote` proxy (installed on first run via npx). Restart Claude Desktop after saving.

FAQ

DBHub or PGMCP - PostgreSQL Model Context Protocol Server — which is better?

Pick DBHub if you prefer the more popular, battle-tested option, and you want a local (stdio) server that keeps data on your machine. Pick PGMCP - PostgreSQL Model Context Protocol Server if you want a hosted/remote server with nothing to install.

Can I use both DBHub and PGMCP - PostgreSQL Model Context Protocol Server?

Yes — MCP clients let you enable multiple servers at once. Add both configs to your client's mcpServers and use whichever tool fits the task.

Do DBHub and PGMCP - PostgreSQL Model Context Protocol Server work with Claude, Cursor and Windsurf?

Both do. Copy the per-client config below into Claude Desktop, Cursor, or Windsurf.