Vetted-communitystdio● online

Postgres Safe SQL MCP
by Crystal DBA (community) · Database
Read-only Postgres MCP with query allowlisting and row-limit guards. Safe for production.
Works with:Claude CodeCursorWindsurfOpenCode
sqlreadallowlist
Install
Run this command in your terminal:
claude mcp add --transport stdio mcp-postgres-safe -- uvx postgres-mcp --access-mode=restricted
Before running, set: DATABASE_URI
Authentication
API key
Required environment variables:
- DATABASE_URI
See the setup guide for step-by-step instructions on obtaining these credentials.
Read-only guard rails make this safe for production DB access. Popular community pick.
Skills that use this MCP
postgres (safe SQL)
Safe SQL skill executes read-only Postgres queries through the safe-SQL MCP.
sql-queries
Postgres Safe SQL MCP gives this skill a safe execution environment for generated queries.
claude-code-subagents (DB experts)
DB expert subagents can query Postgres via safe-SQL MCP for read-only introspection.

