MCP server wrapper for PostgreSQL - reads credentials from .env with configurable key mapping and safe read-only defaults.
README
<table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="110"> <img src="https://raw.githubusercontent.com/edelciomolina/postgres-mcp/main/icon.png" width="96" alt="Postgres MCP icon"/> </td> <td> <h1>Postgres MCP</h1> <p>🔌 Native MCP server for PostgreSQL - reads credentials from <code>.env</code> at runtime with flexible key mapping, configurable tool selection, and <strong>safe read-only defaults</strong>.</p> <a href="https://www.npmjs.com/package/@edelciomolina/postgres-mcp"><img src="https://img.shields.io/npm/v/@edelciomolina/postgres-mcp" alt="npm version"/></a> <a href="https://www.npmjs.com/package/@edelciomolina/postgres-mcp"><img src="https://img.shields.io/npm/l/%40edelciomolina%2Fpostgres-mcp" alt="license"/></a> <a href="https://github.com/edelciomolina/postgres-mcp/actions/workflows/ci.yml"><img src="https://github.com/edelciomolina/postgres-mcp/actions/workflows/ci.yml/badge.svg" alt="CI"/></a> </td> </tr> </table>🌐 English | Português
This is a native MCP server built directly with @modelcontextprotocol/sdk and pg (node-postgres). It provides:
.env file at startup, so no secrets are stored in mcp.json.env variable names; tell the server which ones to use via env in mcp.jsontool=<name> args to choose exactly which MCP tools to expose.env file with the database credentials (anywhere in the project tree - see .env discovery)