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 | |
|---|---|---|
| Category | Databases | Databases |
| Language | TypeScript | Go |
| Transport | stdio (local) | HTTP (remote) |
| Auth | None | API key |
| GitHub stars | 3.0k | 536 |
| Last commit | 1 month ago | 2 months ago |
| Verified | ||
| Actively maintained | ||
| Install | npx @bytebase/dbhub@latest --transport stdio --dsn "postgres://user:password@localhost:5432/dbname" | brew tap subnetmarco/homebrew-tap && brew install pgmcp |
| Repo | Open | 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
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
brew tap subnetmarco/homebrew-tap && brew install pgmcpPaste 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.