stdio database

PostgreSQL MCP Server

Query and introspect PostgreSQL databases. Connection string is passed as an argument.

Installation

npx -y @modelcontextprotocol/server-postgres

claude_desktop_config.json

{
  "mcpServers": {
    "server-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://localhost/mydb"
      ]
    }
  }
}

Prerequisites

  • Node.js 18 or later

Common Errors

  • Server not found / spawn error — ensure Node.js is on your PATH and the package is accessible via npx.
  • Permission denied — check that the path in args is readable by the process running your AI client.

Related Servers