Skip to content
Cursor

postgres for Cursor

io.github.marcelo-ochoa/postgres

MCP server for interacting with PostgreSQL databases

client:Cursor transport:stdio runtime:npm

Install postgres 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": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-postgres"
      ],
      "env": {
        "POSTGRES_USER": "<POSTGRES_USER>",
        "POSTGRES_PASSWORD": "<POSTGRES_PASSWORD>"
      }
    }
  }
}

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

postgres in other clients