← Index

PostgreSQL (hardened, read-only)

io.github.Eszetael/postgres-mcp-hardenedv0.1.5Databases

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

In-path gate · all MCP tools

Using PostgreSQL (hardened, read-only) in Claude, Cursor, Gemini CLI, Cline, or Zed?

MCP tool contracts can change remotely with no version bump. The mcpindex gate pins each contract and HOLDs the call when it drifts-before your agent acts. Zero credentials. This is not the package install for this server itself (use Install this server for that).

Install the mcpindex gate (one command)

Rewrites your MCP host config so each server launches behind the gate. Inspect first: curl -fsSL https://mcpindex.ai/install.sh | less

uv tool install mcpindex-gate && mcpindex-config-wire
Trust verdict · v1 advisory · method
NOT YET SCREENEDno verdict on file

Verdict not yet evaluated for this tool. The semantic screen takes adversarial cases first; coverage rolls out as the corpus expands (15/150 labels to graduation). The deterministic conformance probe is built but has not yet run on the public corpus, so a recorded verdict here is REVIEW or UNVERIFIED, never a clearing ALLOW. Until a verdict is recorded, an agent should treat this tool as not-yet-cleared and fall back to its own checks. Method: the eval, four-state verdict, honest limits.

Own this server? Screen its description →

That verdict was true at screening time (snapshot 2026-08-10).

Contracts can change after screening, with no version bump. The gate pins PostgreSQL (hardened, read-only)’s tool contracts on first sight and holds any silent change before your agent acts - the check that keeps being true on Tuesday.

See your first HOLD in 2 minutes →

Related: how to trust an MCP server · screen before install · silent contract drift

Environment variables
DATABASE_URL
requiredsecret

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` prints the SQL that creates one.

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.

DATABASE_URL
requiredsecret

Connection string for a role that cannot write.

MCP_ADDR

Address to bind, default 127.0.0.1:8080.

MCP quality score · maturity, not trust · methodology
freshness
25
completeness
20
installability
25
documentation
15
stability
5
Alternatives in Databases