PostgreSQL MCP Server

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

Local serverstdioMIT

What is the PostgreSQL MCP Server?

PostgreSQL is an MCP project maintained in the jamesg31/mcp-server-postgres repository. The maintainer describes its purpose as “A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries”. Read the project documentation for the complete scope.

Local setup

The project provides a local client configuration using docker. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
queryExecute read-only SQL queries against the connected database

How to install the PostgreSQL MCP Server

{
  "mcpServers": {
    "postgres": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/postgres",
        "postgresql://host.docker.internal:5432/mydb"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.