Database MCP Postgres runs on your own machine — the client starts it, so there is no endpoint to ping. 114 installs a week from pypi. Last commit 17 Oct 2026.
MCP server for PostgreSQL. Read-only by default, row caps, timeouts, secrets never logged.
We read the source, 1 d ago · rules 995398eba69f
Found in continuous integration, deployment or infrastructure files, or in a neighbouring package of the same monorepo. None of this is installed when you add the server: it describes how the project is built and released. We list it because a leaked key in a build pipeline is still a real problem, but it is not something this server does on your machine.
const child = spawn(command, args, { env: process.env });
const child = spawn(command, args, { env: process.env });
Is this your server and something here is wrong? Tell us — corrections are free and do not require a plan.
Today is the operative word: we check Database MCP Postgres every 15 minutes and re-read its code on every release. Watch it and you find out the day that stops being true.
This server runs on your own machine — install it with the package manager and the client starts it for you. Package name taken from the official registry entry.
claude mcp add database-mcp-postgres -e 'POSTGRES_HOST=<POSTGRES_HOST>' -e 'POSTGRES_USER=<POSTGRES_USER>' -e 'POSTGRES_DATABASE=<POSTGRES_DATABASE>' -- npx -y @database-mcp/postgres
{
"mcpServers": {
"database-mcp-postgres": {
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres"
],
"env": {
"POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
"POSTGRES_HOST": "<POSTGRES_HOST>",
"POSTGRES_USER": "<POSTGRES_USER>"
}
}
}
}
[mcp_servers.database-mcp-postgres]
command = "npx"
args = ["-y", "@database-mcp/postgres"]
env = { POSTGRES_HOST = "<POSTGRES_HOST>", POSTGRES_USER = "<POSTGRES_USER>", POSTGRES_DATABASE = "<POSTGRES_DATABASE>" }
{
"mcpServers": {
"database-mcp-postgres": {
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres"
],
"env": {
"POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
"POSTGRES_HOST": "<POSTGRES_HOST>",
"POSTGRES_USER": "<POSTGRES_USER>"
}
}
}
}
{
"servers": {
"database-mcp-postgres": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres"
],
"env": {
"POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
"POSTGRES_HOST": "<POSTGRES_HOST>",
"POSTGRES_USER": "<POSTGRES_USER>"
}
}
}
}
Put your own values in place of
<POSTGRES_HOST> (Database host), <POSTGRES_USER> (Database user (a read-only user is recommended)), <POSTGRES_DATABASE> (Database name).
The author’s registry entry marks them as required.
Optional settings from the registry entry, left out of the block above:
POSTGRES_PASSWORD (Database password (or use POSTGRES_PASSWORD_FILE)).
MCP server for MariaDB. Read-only by default, row caps, timeouts, secrets never logged.
MCP server for MySQL. Read-only by default, row caps, statement timeouts, secrets never logged.
MCP server for libSQL/Turso, local or remote. Read-only by default, row caps, timeouts.
MCP server for SQLite databases. Read-only by default, row caps, statement timeouts.
Production-grade PostgreSQL MCP server — 254 tools for query, tuning & ops, read-only by default.
Safe, read-only-by-default MySQL, PostgreSQL & SQLite access for AI agents. TOON output.
Standalone Postgres MCP server — schema-aware, read-only by default, installable everywhere.
MCP server for read-only PostgreSQL database queries in Claude Desktop
Answers built from our own checks of this server.