PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.
Connect Runs on your machine
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/[email protected]
{
"mcpServers": {
"postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@edelciomolina/[email protected]"
],
"env": {
"MCP_KEY_HOST": "<MCP_KEY_HOST>",
"MCP_KEY_PORT": "<MCP_KEY_PORT>",
"MCP_KEY_NAME": "<MCP_KEY_NAME>",
"MCP_KEY_USER": "<MCP_KEY_USER>",
"MCP_KEY_PASS": "<MCP_KEY_PASS>",
"MCP_KEY_SSLMODE": "<MCP_KEY_SSLMODE>"
}
}
}
}
{
"mcpServers": {
"postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@edelciomolina/[email protected]"
],
"env": {
"MCP_KEY_HOST": "<MCP_KEY_HOST>",
"MCP_KEY_PORT": "<MCP_KEY_PORT>",
"MCP_KEY_NAME": "<MCP_KEY_NAME>",
"MCP_KEY_USER": "<MCP_KEY_USER>",
"MCP_KEY_PASS": "<MCP_KEY_PASS>",
"MCP_KEY_SSLMODE": "<MCP_KEY_SSLMODE>"
}
}
}
}
{
"servers": {
"postgres-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@edelciomolina/[email protected]"
],
"env": {
"MCP_KEY_HOST": "<MCP_KEY_HOST>",
"MCP_KEY_PORT": "<MCP_KEY_PORT>",
"MCP_KEY_NAME": "<MCP_KEY_NAME>",
"MCP_KEY_USER": "<MCP_KEY_USER>",
"MCP_KEY_PASS": "<MCP_KEY_PASS>",
"MCP_KEY_SSLMODE": "<MCP_KEY_SSLMODE>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
MCP_KEY_HOSTOptional | Name of the .env variable that holds the database host |
MCP_KEY_PORTOptional | Name of the .env variable that holds the database port |
MCP_KEY_NAMEOptional | Name of the .env variable that holds the database name |
MCP_KEY_USEROptional | Name of the .env variable that holds the database user |
MCP_KEY_PASSOptional | Name of the .env variable that holds the database password |
MCP_KEY_SSLMODEOptional | Name of the .env variable that holds the SSL mode (e.g. require) |
Details
| Package | @edelciomolina/[email protected] (NPM, stdio) |
| First published | 11 Jun 2026 |
| Last updated | 11 Jun 2026 |
| Registry name | io.github.edelciomolina/postgres-mcp |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
