Skip to content
mcp/skillhub

pgops MCP Server

by arzharchio.github.arzharch/pgops-mcpv0.1.9

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

0Pythonstdioofficial registry

context tax

queued

security

queued

cold start

queued

freshness

Maintained39d ago

Install pgops MCP server

Install in Claude Code

claude mcp add pgops -e PGOPS_DSN='<pgops-dsn>' -e PGOPS_READONLY_DSN='<pgops-readonly-dsn>' -- uvx pgops-mcp

Configuration

VariableRequiredSecretDescription
PGOPS_DSNyesyesPostgreSQL connection string. From inside a container, localhost is the container itself — use host.docker.internal or the compose service name.
PGOPS_READ_ONLY——Set to 1 to withhold every mutating tool.
PGOPS_AUDIT_LOG——Path to the audit log inside the container. Mount a volume at this path or the log dies with the container.
PGOPS_READONLY_DSN—yesOptional 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_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_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.

Freshness

Maintained — last maintenance signal 39d ago. The newest of the signals below sets the band.

  1. Last commit (default branch)

    2026-09-01 · 39d ago · GitHub

  2. Latest release

    2026-09-01 · 39d ago · GitHub · v0.1.9

  3. Package published

    no data · npm/PyPI

  4. Registry entry updated

    2026-09-01 · 39d ago · official registry · v0.1.9

FAQ

›How do I install the pgops MCP server in Claude Code?

Run: claude mcp add pgops -e PGOPS_DSN='<pgops-dsn>' -e PGOPS_READONLY_DSN='<pgops-readonly-dsn>' -- uvx pgops-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.

›Does pgops require an API key?

Yes. It expects PGOPS_DSN, PGOPS_READONLY_DSN, of which 2 are secrets.

›Can I use pgops as a remote (hosted) MCP server?

No hosted endpoint is published; it runs locally over stdio.

›Is pgops in the official MCP registry?

Yes, as io.github.arzharch/pgops-mcp.

Alternatives to pgops

Other database MCP servers.

View all