MCP server

PostgreSQL

Archived reference server for read-only PostgreSQL access

Archived reference MCP server (no longer maintained, now in servers-archived) providing read-only PostgreSQL access. Exposes table schemas as resources and a query tool that runs inside a read-only transaction.

Connect

  1. 1Add the server to Codex
    codex mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Configs are generated from the publisher's documented endpoint. Check their docs for plan requirements and scopes. New to this? Read the step-by-step tutorial.

Tools 1

query

Things to ask

  • “What tables are in my database?”
  • “Show the schema of the orders table”
  • “How many users signed up last week?”

Related