$ timeahead.in
mcp/pg-mcp-server/install/vscode

install pg-mcp-server on VS Code

Requires Node 18+ on your system so npx can fetch the package on first run. VS Code (Copilot) uses a `servers` root key with an explicit `type` field — different from the `mcpServers` shape used by Claude Desktop and Cursor. Paste the config below, then follow the reload step to register pg-mcp-server.

paste into
workspace: .vscode/mcp.json (project root — committed with the repo)
user: ~/.vscode/mcp.json
{
  "servers": {
    "postgres": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "--yes",
        "pg-mcp-server",
        "--transport",
        "stdio"
      ],
      "env": {
        "DATABASE_URL": "postgresql://postgres:postgres@localhost:5432/postgres"
      }
    }
  }
}
then: VS Code picks up the change. Run 'MCP: List Servers' from the command palette to verify.
other clients
Claude DesktopCursorWindsurfClaude Code
← back to pg-mcp-server