MCP SERVER PROFILE · Database
DatabaseArchived

PostgreSQL MCP Server

Read-only PostgreSQL access for LLM agents. Inspect schemas, run analytics queries, and retrieve relational data with safe, connection-pooled access to production or staging databases.

Archived implementation

FreeMCP lists this implementation as archived. Review maintained alternatives before installing.

GitHub stars18400
Setup options1
Documented tools1
Maintained bymodelcontextprotocol

Overview

Archived read-only PostgreSQL MCP server with SQL query and schema tools.

postgresqldatabasesqlanalyticslangchain

Installation & configuration 1 documented option

Choose the configuration documented for your client. Replace placeholders with your own values, and review the maintainer documentation before connecting.

Legacy NPX

Claude Desktop

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

Maintainer-documented example; not runtime tested by FreeMCP. Replace all placeholders before use.

Read maintainer installation documentation ↗

Before you install

  • A reachable PostgreSQL database and connection URL.
  • Use a database account with read-only permissions.
  • Protect database credentials and avoid exposing production data unnecessarily.

Documented tools 1

Capabilities provided in the listing metadata. Check upstream documentation for current availability and parameters.

query

Execute SQL queries within a read-only transaction.

Listed on FreeMCP badge

Maintaining this MCP server? Add this optional badge to your GitHub README so visitors can find its FreeMCP listing. Listing is not a security certification or independent verification.

MCP — Listed on FreeMCP

[![Listed on FreeMCP](https://freemcp.in/badges/listed.svg)](https://freemcp.in/servers/postgres-mcp)

Security & permissions

  • Archived implementation; no security updates.
  • Use a dedicated read-only database role and avoid embedding credentials in shared configurations.

See the installation and security guide for a setup checklist.

Buy me a beer