NestDaddy

Postgres MCP

io.github.edelciomolina/postgres-mcp · v1.7.0

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

Connect Runs on your machine

Terminal
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]
claude_desktop_config.json
{
  "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>"
      }
    }
  }
}
~/.cursor/mcp.json
{
  "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>"
      }
    }
  }
}
.vscode/mcp.json
{
  "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

NameDescription
MCP_KEY_HOST
Optional
Name of the .env variable that holds the database host
MCP_KEY_PORT
Optional
Name of the .env variable that holds the database port
MCP_KEY_NAME
Optional
Name of the .env variable that holds the database name
MCP_KEY_USER
Optional
Name of the .env variable that holds the database user
MCP_KEY_PASS
Optional
Name of the .env variable that holds the database password
MCP_KEY_SSLMODE
Optional
Name of the .env variable that holds the SSL mode (e.g. require)

Details

Package@edelciomolina/[email protected] (NPM, stdio)
First published11 Jun 2026
Last updated11 Jun 2026
Registry nameio.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.