postgres-mcp-server

Level CLocal

MCP (Model Context Protocol) Server for postgres Database

⭐ 31DatabaseTypeScriptRepo ↗Updated 2025-07-14

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "ahmedmustahid-postgres-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@ahmedmustahid/postgres-mcp-server",
        "stdio"
      ],
      "env": {
        "POSTGRES_USERNAME": "",
        "POSTGRES_PASSWORD": "",
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": ""
      }
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/ahmedmustahid/postgres-mcp-server

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "ahmedmustahid-postgres-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@ahmedmustahid/postgres-mcp-server",
        "stdio"
      ],
      "env": {
        "POSTGRES_USERNAME": "",
        "POSTGRES_PASSWORD": "",
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": ""
      }
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers