PostgreSQL (hardened, read-only) MCP Server

The official Postgres MCP server was deprecated in 2024 and still gets 391k downloads a month. Its entire defence is one database-level read-only transaction - and that alone does not stop every write. This is a maintained Rust replacement with defence in depth. Its 6 documented tools cluster into explain, database, analyze, top. It runs locally over stdio via the published package.

People who work with audit log, database and postgres and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in Rust.

VERIFIED ACTIVE

LAST COMMIT 2026-09-13 · ★ 3 · #41 OF 168 MAINTAINED DATABASE · VERIFIED 2026-09-18

MIT · Rust servers · how we verify → /methodology

01 · Install PostgreSQL (hardened, read-only)

before you install - you'll need

Set MCP_ADDR, MCP_BEARER_TOKEN before connecting. DATABASE_URL is optional or environment-specific per the README.

Claude Code

claude mcp add eszetael-postgres-mcp-hardened -- npx -y postgres-mcp-hardened

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "eszetael-postgres-mcp-hardened": {
      "command": "npx",
      "args": [
        "-y",
        "postgres-mcp-hardened"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions · container (OCI image) - can be sandboxed away from your filesystem

repo age created 2026-07-24 - young repo, little track record yet

license MIT - declared in the repository

npm package postgres-mcp-hardened - unscoped; check the name against the project README before installing

registry namespace io.github.Eszetael is GitHub-verified and matches the repo owner

03 · What PostgreSQL (hardened, read-only) can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

An agent gets 6 documented tools across explain, database, analyze, including explain_query, database_health, analyze_indexes, top_queries.

Capability map

Tools grouped from the project's README - what PostgreSQL (hardened, read-only) lets an agent do.

Explain

1 tool - e.g. the execution plan; with analyze it runs the statement and reports real

explain_query

Database

1 tool - e.g. cache hit ratio, connections (this database and the cluster), the longest

database_health

Analyze

1 tool - e.g. unused indexes, duplicates, and tables scanned sequentially often enough

analyze_indexes

Top

1 tool - e.g. the heaviest statements, from pg_stat_statements.

top_queries

Security

1 tool - e.g. what this deployment is actually able to do to your database, asked of

security_posture

read & search

1 tool - e.g. run a read-only SQL query (validated, auto-LIMIT, cost-guarded). The response

query

Latest releases

v0.1.10 · 2026-09-04

v0.1.9 · 2026-08-18

v0.1.8 · 2026-08-18

04 · Who maintains PostgreSQL (hardened, read-only)

PostgreSQL (hardened, read-only) is maintained by eszetael. It's the only MCP server we track from this author; the repo dates to Jul 2026.

05 · Facts

category
database - ranked #41 of 168 actively-maintained database servers as of 2026-09-18.
release cadence
10+ releases in the last 90 days (latest 2026-09-04)
registry
io.github.Eszetael/postgres-mcp-hardened (active, first published 2026-08-09 · 6 versions)
packages
npm:postgres-mcp-hardened · oci:ghcr.io/eszetael/postgres-mcp-hardened:0.1.10

06 · PostgreSQL (hardened, read-only) FAQ

Is PostgreSQL (hardened, read-only) still maintained?

Yes - as of 2026-09-18, its last commit was 2026-09-13 and it shipped 10+ releases in the last 90 days. We re-verify nightly.

What can PostgreSQL (hardened, read-only) do?

An agent gets 6 documented tools across explain, database, analyze, including explain_query, database_health, analyze_indexes, top_queries.

How do I install PostgreSQL (hardened, read-only)?

Run `npx -y postgres-mcp-hardened`. The README documents 3 environment variables (DATABASE_URL, MCP_ADDR, MCP_BEARER_TOKEN) to set first. Set MCP_ADDR, MCP_BEARER_TOKEN before connecting. DATABASE_URL is optional or environment-specific per the README. You can also paste the ready-made client config above.

Does PostgreSQL (hardened, read-only) run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to PostgreSQL (hardened, read-only)

More database MCP servers · Bagel · Query Weaver · Bibelstudium MCP · Kin · Florentine Ai MCP Server

More Rust MCP servers · Ontomics · Factum · Glass · Llmtrim · see all