Install pgops in Claude Code
PyPI (uv)
claude mcp add pgops -e PGOPS_DSN=... -- uvx pgops-mcp{
"mcpServers": {
"pgops": {
"command": "uvx",
"args": [
"pgops-mcp"
],
"env": {
"PGOPS_DSN": "..."
}
}
}
}Docker
claude mcp add pgops -e PGOPS_DSN=... -- docker run -i --rm -e PGOPS_DSN ghcr.io/arzharch/pgops-mcp:0.1.9{
"mcpServers": {
"pgops": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PGOPS_DSN",
"ghcr.io/arzharch/pgops-mcp:0.1.9"
],
"env": {
"PGOPS_DSN": "..."
}
}
}
}Replace each ... with your own value.
Frequently asked questions
What does the pgops MCP server do?
Safe, audited PostgreSQL operations for AI agents: queries, migrations, EXPLAIN, containers
Is the pgops MCP server free?
Yes, most likely. Open source and no paid account or API key is mentioned in the listing. Check the provider for current pricing.
Does pgops run locally or remotely?
Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.
How do I add pgops to Claude Code?
Run: claude mcp add pgops -e PGOPS_DSN=... -- uvx pgops-mcp
More databases MCP servers
View allpgvector
mittalpk/mcp-server-pgvector
Similarity search, hybrid search, and index management for pgvector-backed PostgreSQL tables
Pgmoat
Kitalon-Labs-LLC/pgmoat
Governed, read-only Postgres access for AI agents: SQL safety, RLS, budgets, tamper-evident audit.
PgVouch
Shubh-Sgr/pgvouch
Safe PostgreSQL migrations: schema drift, lock analysis, safe rewrites, data checksums. Read-only.
pgmcp
pascalallen/pgmcp
Read-only Postgres ops/DBA diagnostics: slow queries, EXPLAIN, locks, index and table health.
Polyglot Database
hyperpolymath/poly-db-mcp
Unified MCP for 20 databases: SurrealDB, ArangoDB, Virtuoso, CouchDB, Cassandra, and more
pgbrake
lexang/pgbrake
Postgres brake for AI agents: risky SQL waits for approval, UPDATE/DELETE get one-command undo.