mcpbeat Sign in

pgops MCP Server

local only

pgops runs on your own machine — the client starts it, so there is no endpoint to ping. 201 installs a week from pypi. Last commit 1 Sep 2026.

Safe, audited PostgreSQL operations for AI agents: queries, migrations, EXPLAIN, containers

Installs per day peak 83 · avg 30 · -25% w/w
a month agotoday
201
Installs / week
pypi · pgops-mcp
0
Stars
0 open issues
1 Sep 2026
Last commit
from GitHub
MIT
License
Python

Nothing serious here today

Today is the operative word: we check pgops 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

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 pgops-mcp -e 'PGOPS_DSN=<PGOPS_DSN>' -- uvx pgops-mcp
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "pgops-mcp": {
      "command": "uvx",
      "args": [
        "pgops-mcp"
      ],
      "env": {
        "PGOPS_DSN": "<PGOPS_DSN>"
      }
    }
  }
}
~/.codex/config.toml
[mcp_servers.pgops-mcp]
command = "uvx"
args = ["pgops-mcp"]
env = { PGOPS_DSN = "<PGOPS_DSN>" }
.cursor/mcp.json
{
  "mcpServers": {
    "pgops-mcp": {
      "command": "uvx",
      "args": [
        "pgops-mcp"
      ],
      "env": {
        "PGOPS_DSN": "<PGOPS_DSN>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "pgops-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pgops-mcp"
      ],
      "env": {
        "PGOPS_DSN": "<PGOPS_DSN>"
      }
    }
  }
}

Put your own value in place of <PGOPS_DSN> (PostgreSQL connection string for the database to operate on). The author’s registry entry marks it as required.

Optional settings from the registry entry, left out of the block above: PGOPS_READONLY_DSN (Optional separate DSN for the read-only pool. Use a role with no write grants to enforce read-only at the database rather than only in the server), PGOPS_READ_ONLY (Set to 1 to withhold every mutating tool. Write tools are not registered at all, so an agent cannot call them), PGOPS_APPROVAL_MODE (Set to 1 to register container.restart and container.exec. Off by default: Docker socket access is root-equivalent on the host), PGOPS_AUDIT_LOG (Path to the append-only JSONL audit log), PGOPS_DEFAULT_TIMEOUT_MS (Statement timeout applied to every query unless a tool call overrides it), PGOPS_MAX_TIMEOUT_MS (Ceiling a caller-supplied timeout is clamped to), PGOPS_DEFAULT_ROW_LIMIT (Rows returned by query.read when the caller does not specify a limit).

Alternatives to pgops

same job, measured the same way
MCP Database Doctor
by petrovicistefan

Offline PostgreSQL query, migration and EXPLAIN diagnostics for AI agents.

44 installs/wk local only
Locksmith
by cxk280

Lints PostgreSQL migrations for dangerous locking operations and suggests safe rewrites.

13 installs/wk local only
QueryBear
by spencerpauly

Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.

answering
D
Dataxplan MCP
by arikanatakan

Read PostgreSQL EXPLAIN plans for AI agents: bottlenecks, estimation errors, fixes, charts.

96 installs/wk local only
Midplane
by midplane

Safe-by-default SQL guardrails for AI agents: AST-checked queries, per-table policy, audit log.

34 installs/wk local only
nlqdb — analytical memory for AI agents
by nlqdb

Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

answering
PostgreSQL MCP Server
by yawlabs

PostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants

654 installs/wk local only
Pgmoat
by kitalon-labs-llc

Governed, read-only Postgres access for AI agents: SQL safety, RLS, budgets, tamper-evident audit.

local only

pgops — questions

Answers built from our own checks of this server.

Why is there no uptime for pgops?
pgops 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 pgops-mcp was installed 201 times last week.
How do I connect pgops?
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 pgops-mcp straight from pypi; nothing to host, nothing to sign up for.
How many people use pgops?
The pypi package pgops-mcp was installed 201 times in the last week. Week over week that is -25%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is pgops 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.