Skip to content
VS Code

postgres mcp for VS Code

io.github.sparta2025/postgres-mcp

PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.

client:VS Code transport:stdio runtime:pypi

Install postgres mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "database-url",
      "description": "DATABASE_URL",
      "password": true
    }
  ],
  "servers": {
    "postgres-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "postgres-mcp-pro"
      ],
      "env": {
        "DATABASE_URL": "${input:database-url}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

postgres mcp in other clients