LocalFree server, account needed

PostgreSQL (hardened, read-only) MCP server

Eszetael/postgres-mcp-hardened

Read-only PostgreSQL access: AST-validated queries in read-only transactions, schema inspection, column redaction, EXPLAIN cost guard and audit log.

3 GitHub stars642 npm downloads / month

Install PostgreSQL (hardened, read-only) in Claude Code

Claude Code
claude mcp add postgresql-hardened-read-only -e DATABASE_URL=... -- npx -y postgres-mcp-hardened
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
{
  "mcpServers": {
    "postgresql-hardened-read-only": {
      "command": "npx",
      "args": [
        "-y",
        "postgres-mcp-hardened"
      ],
      "env": {
        "DATABASE_URL": "..."
      }
    }
  }
}

Replace each ... with your own value.

Frequently asked questions

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

Read-only PostgreSQL access: AST-validated queries in read-only transactions, schema inspection, column redaction, EXPLAIN cost guard and audit log.

Is the PostgreSQL (hardened, read-only) MCP server free?

The server is free, but you will likely need an account. The server itself is free, but it connects to a service that needs an account or API key, which may have paid tiers. Check the provider for current pricing.

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

Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.

How do I add PostgreSQL (hardened, read-only) to Claude Code?

Run: claude mcp add postgresql-hardened-read-only -e DATABASE_URL=... -- npx -y postgres-mcp-hardened

More databases MCP servers

View all