mcpbeat Sign in

Pg Readonly MCP Server

local only

Pg Readonly MCP runs on your own machine — the client starts it, so there is no endpoint to ping. 125 installs a week from pypi. Last commit 2 Oct 2026.

A read-only Postgres MCP server that parses SQL rather than pattern-matching it.

Installs per day peak 29 · avg 17 · +2% w/w
a month agotoday
125
Installs / week
pypi · pg-readonly-mcp
0
Stars
0 open issues
2 Oct 2026
Last commit
from GitHub
MIT
License
Python

Connect this server

This server runs on your own machine — install it with the package manager and the client starts it for you. Package name taken from the official registry entry.

run in your terminal
claude mcp add pg-readonly-mcp -e 'PG_READONLY_MCP_DSN=<PG_READONLY_MCP_DSN>' -- uvx pg-readonly-mcp
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "pg-readonly-mcp": {
      "command": "uvx",
      "args": [
        "pg-readonly-mcp"
      ],
      "env": {
        "PG_READONLY_MCP_DSN": "<PG_READONLY_MCP_DSN>"
      }
    }
  }
}
~/.codex/config.toml
[mcp_servers.pg-readonly-mcp]
command = "uvx"
args = ["pg-readonly-mcp"]
env = { PG_READONLY_MCP_DSN = "<PG_READONLY_MCP_DSN>" }
.cursor/mcp.json
{
  "mcpServers": {
    "pg-readonly-mcp": {
      "command": "uvx",
      "args": [
        "pg-readonly-mcp"
      ],
      "env": {
        "PG_READONLY_MCP_DSN": "<PG_READONLY_MCP_DSN>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "pg-readonly-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pg-readonly-mcp"
      ],
      "env": {
        "PG_READONLY_MCP_DSN": "<PG_READONLY_MCP_DSN>"
      }
    }
  }
}

Put your own value in place of <PG_READONLY_MCP_DSN> (Postgres connection string for a role that holds only SELECT. The server refuses to start otherwise). The author’s registry entry marks it as required.

Nothing serious here today

Today is the operative word: we check Pg Readonly MCP every 15 minutes and re-read its code on every release. Watch it and you find out the day that stops being true.

Three servers free · no card

Alternatives to Pg Readonly MCP

same job, measured the same way
RE-call MCP Memory Server
by giulioder

Agent memory on SQLite or Postgres that flags superseded facts and abstains below its threshold.

3 017 installs/wk local only
M
Mssql Reader
by connorbritain

Read-only MCP server for Microsoft SQL Server — schema discovery, profiling, safe querying

2 079 installs/wk local only
DB Mastermind
by elh0m3r0

Explore and query PostgreSQL, SQL Server, Oracle, MySQL, SQLite and more. Read-only by default.

1 359 installs/wk local only
PDQ Deploy
by eredden

An MCP server for read-only access to the PDQ Deploy SQLite database.

903 installs/wk local only
PostgreSQL (hardened, read-only)
by eszetael

Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.

808 installs/wk local only
Mcpg
by devopam

Production-grade PostgreSQL MCP server — 279 tools for query, tuning & ops, read-only by default.

449 installs/wk local only
Pg Checkup
by pgcheckup

Read-only PostgreSQL checkups for your AI assistant. Lists what to fix, in order, with the SQL.

371 installs/wk local only
Postgres (read-only transactions)
by poudel0

Drop-in replacement for @modelcontextprotocol/server-postgres that is actually read-only.

251 installs/wk local only

Pg Readonly MCP — questions

Answers built from our own checks of this server.

Why is there no uptime for Pg Readonly MCP?
Pg Readonly MCP runs on your own machine over stdio — there is no network address to reach, so uptime cannot be measured for it by anyone. What can be measured is adoption: the pypi package pg-readonly-mcp was installed 125 times last week.
How do I connect Pg Readonly MCP?
Copy the ready config from this page. We generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each in the form that client actually reads. It runs locally, so the command pulls pg-readonly-mcp straight from pypi; nothing to host, nothing to sign up for.
How many people use Pg Readonly MCP?
The pypi package pg-readonly-mcp was installed 125 times in the last week. Week over week that is +2%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is Pg Readonly MCP open source?
Yes — it is published under the MIT licence, written in Python and 0 stars on GitHub. The source link is on this page, so you can read exactly what it does with your data before you connect it.