Skip to content
Cursor

Postgres MCP for Cursor

io.github.edelciomolina/postgres-mcp

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

client:Cursor transport:stdio runtime:npm

Install Postgres MCP in Cursor

~/.cursor/mcp.json · windows: %USERPROFILE%\.cursor\mcp.json

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

{
  "mcpServers": {
    "postgres-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@edelciomolina/postgres-mcp"
      ],
      "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>"
      }
    }
  }
}

Use .cursor/mcp.json in a project root instead to scope it to that project. Cursor merges both. Cursor docs

Postgres MCP in other clients