Skip to content
Claude Code

Postgres MCP for Claude Code

io.github.edelciomolina/postgres-mcp

PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.

client:Claude Code transport:stdio runtime:npm

Install Postgres MCP in Claude Code

run in your project directory

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

claude mcp add postgres-mcp -e MCP_KEY_HOST=<MCP_KEY_HOST> -e MCP_KEY_PORT=<MCP_KEY_PORT> -e MCP_KEY_NAME=<MCP_KEY_NAME> -e MCP_KEY_USER=<MCP_KEY_USER> -e MCP_KEY_PASS=<MCP_KEY_PASS> -e MCP_KEY_SSLMODE=<MCP_KEY_SSLMODE> -- npx -y @edelciomolina/postgres-mcp

Adds it for this project only. Append --scope user to make it available everywhere. Claude Code docs

Postgres MCP in other clients