P

PostgreSQL (hardened, read-only)

MCP server Β· by Eszetael

Databases npmDocker v0.1.10

Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.

View source β†— Website β†— Generate config for multiple servers More servers

Install

registry version 0.1.10

npm
npx -y postgres-mcp-hardened
Docker
docker run -i --rm ghcr.io/eszetael/postgres-mcp-hardened:0.1.10

Setup by client

Pick your client β€” the config below is generated for this server (local stdio). Copy respects the β€œPin version” switch above.

claude_desktop_config.json

{
  "mcpServers": {
    "postgres-mcp-hardened": {
      "command": "npx",
      "args": [
        "-y",
        "postgres-mcp-hardened"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_DATABASE_URL>"
      }
    }
  }
}

Format verified against the official Claude Desktop docs β†—.

Environment variables

Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.

  • DATABASE_URL required secret β€” Connection string for the role the server connects as. Use a role that cannot write β€” the server refuses writes twice, but a read-only role is the layer that does not depend on us being correct. `--print-setup-sql` print
  • MCP_STATEMENT_TIMEOUT β€” Server-side statement timeout, e.g. `5s`. A question that would pin the database is cancelled by PostgreSQL, not by hope.
  • MCP_ALLOW_TABLES β€” Comma-separated allowlist. A table off the list is refused by name, and hiding it inside a CTE, a view or a join does not help.
  • MCP_AUDIT_LOG β€” Path to the tamper-evident audit log. Entries are chained by hash and survive a restart; `--verify-audit` checks the chain against an off-host anchor.
  • MCP_ADDR β€” Address to bind, default 127.0.0.1:8080.

GitHub

⭐ 3 stars Β· ζœ€θΏ‘ζ›΄ζ–°δΊŽ 18 倩前 Β· MIT license

About this server

postgres mcp hardened 🚧 Version 0.1.10 β€” the rest of an outside review, and a fix that was too blunt Published: binaries for five platforms with checksums, Sigstore signatures and build provenance; .mcpb bundles for one click install; an image on ghcr.io for amd64 and arm64; a package on npm; and a…

Summary from the project README β€” github.com/Eszetael/postgres-mcp-hardened

Distributed as npm, Docker, listed under Databases. Review our MCP security guide before granting access to real data.

Frequently asked questions

What does the PostgreSQL (hardened, read-only) MCP server do?

postgres mcp hardened 🚧 Version 0.1.10 β€” the rest of an outside review, and a fix that was too blunt Published: binaries for five platforms with checksums, Sigstore signatures and build provenance; .mcpb bundles for one click install; an image on ghcr.io for amd64 and arm64; a package on npm; and a

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

Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.

Is PostgreSQL (hardened, read-only) free to use?

The MCP server itself is free to install. The source is public on https://github.com/Eszetael/postgres-mcp-hardened. Any third-party service it calls may require its own API key and account.

Which clients support PostgreSQL (hardened, read-only)?

Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.

Add this badge

Publish this server? Link back with a badge on your README or site β€” copy either snippet.

Listed on MCPNav

Markdown

[![Listed on MCPNav](https://mcpnav.net/badge/postgres-mcp-hardened.svg)](https://mcpnav.net/server/postgres-mcp-hardened/)

HTML

<a href="https://mcpnav.net/server/postgres-mcp-hardened/"><img src="https://mcpnav.net/badge/postgres-mcp-hardened.svg" alt="Listed on MCPNav" height="20"></a>