mcpbeat Sign in

Database MCP Postgres MCP Server

local only

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.

Installs per day peak 375 · avg 24 · -81% w/w
a month agotoday
114
Installs / week
npm · @database-mcp/postgres
5
Stars
1 open issue
17 Oct 2026
Last commit
2 releases in 90 days
MIT
License
Rust

What the code does

We read the source, 1 d ago · rules 995398eba69f

In the project's build, not in the package

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.

Claims read-only, but the code runs commands conformance/leak-check.mjs:23, conformance/run.mjs:101
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.

Nothing serious here today

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.

Three servers free · no card

Connect this server

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.

run in your terminal
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
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "database-mcp-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/postgres"
      ],
      "env": {
        "POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
        "POSTGRES_HOST": "<POSTGRES_HOST>",
        "POSTGRES_USER": "<POSTGRES_USER>"
      }
    }
  }
}
~/.codex/config.toml
[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>" }
.cursor/mcp.json
{
  "mcpServers": {
    "database-mcp-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/postgres"
      ],
      "env": {
        "POSTGRES_DATABASE": "<POSTGRES_DATABASE>",
        "POSTGRES_HOST": "<POSTGRES_HOST>",
        "POSTGRES_USER": "<POSTGRES_USER>"
      }
    }
  }
}
.vscode/mcp.json
{
  "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)).

Alternatives to Database MCP Postgres

same job, measured the same way
Database MCP Mariadb
by arifulislamat

MCP server for MariaDB. Read-only by default, row caps, timeouts, secrets never logged.

99 installs/wk local only
Database MCP Mysql
by arifulislamat

MCP server for MySQL. Read-only by default, row caps, statement timeouts, secrets never logged.

147 installs/wk local only
Database MCP Libsql
by arifulislamat

MCP server for libSQL/Turso, local or remote. Read-only by default, row caps, timeouts.

96 installs/wk local only
Database MCP Sqlite
by arifulislamat

MCP server for SQLite databases. Read-only by default, row caps, statement timeouts.

137 installs/wk local only
Mcpg
by devopam

Production-grade PostgreSQL MCP server — 254 tools for query, tuning & ops, read-only by default.

220 installs/wk local only
Rowbase
by djstreet11

Safe, read-only-by-default MySQL, PostgreSQL & SQLite access for AI agents. TOON output.

95 installs/wk local only
NexQL Postgres MCP
by nexql-oss

Standalone Postgres MCP server — schema-aware, read-only by default, installable everywhere.

50 installs/wk local only
Read Only Local Postgres MCP Server
by hove

MCP server for read-only PostgreSQL database queries in Claude Desktop

143 installs/wk local only

Database MCP Postgres — questions

Answers built from our own checks of this server.

Why is there no uptime for Database MCP Postgres?
Database MCP Postgres runs on your own machine over stdio — there is no network address to reach, so uptime cannot be measured for it by anyone. What can be measured is adoption: the npm package @database-mcp/postgres was installed 114 times last week.
How do I connect Database MCP Postgres?
Copy the ready config from this page. We generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each in the form that client actually reads. It runs locally, so the command pulls @database-mcp/postgres straight from npm; nothing to host, nothing to sign up for.
How many people use Database MCP Postgres?
The npm package @database-mcp/postgres was installed 114 times in the last week. Week over week that is -81%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is Database MCP Postgres open source?
Yes — it is published under the MIT licence, written in Rust, 5 stars on GitHub and 1 open issue. The source link is on this page, so you can read exactly what it does with your data before you connect it.