call518/MCP-PostgreSQL-Ops
Read-only PostgreSQL observability for AI assistants
What it solves
Without it, AI assistants cannot inspect PostgreSQL slow queries, locks, bloat, VACUUM, or replication through natural language.
- Read-only, no arbitrary SQL
- Slow queries, locks, bloat
- PG 12–18, no extensions
Works with
- claude-desktop
- cli
Install
docker compose up -d docker compose ps --all # wait for mcp-server to be healthy and init to exit 0 docker compose -f docker-compose.custom-db.yml up -d uvx --python 3.12 mcp-postgresql-ops --type stdio Copy-ready config
{
"mcpServers": {
"mcp-postgresql-ops": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"mcp_postgresql_ops"
],
"env": {
"POSTGRES_HOST": "127.0.0.1",
"POSTGRES_PORT": "15432",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "changeme",
"POSTGRES_DB": "ecommerce"
}
}
}
} {
"mcpServers": {
"Postgresql-A": {
"command": "uvx",
"args": [
"--python",
"3.12",
"mcp-postgresql-ops"
],
"env": {
"POSTGRES_HOST": "a.foo.com",
"POSTGRES_PORT": "5432",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "postgres",
"POSTGRES_DB": "postgres"
}
},
"Postgresql-B": {
"command": "uvx",
"args": [
"--python",
"3.12",
"mcp-postgresql-ops"
],
"env": {
"POSTGRES_HOST": "b.bar.com",
"POSTGRES_PORT": "5432",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "postgres",
"POSTGRES_DB": "postgres"
}
}
}
} {
"mcpServers": {
"mcp-postgresql-ops": {
"type": "streamable-http",
"url": "http://your-server:8000/mcp",
"headers": {
"Authorization": "Bearer replace-with-a-strong-random-secret"
}
}
}
} Security flags
- Needs API key: Not stated
- Runs locally: Yes
- Network access: Yes
- Needs root: No
Maintenance
| Last commit | 2026-12-05(0d) |
|---|---|
| Stars | 165 |
| Open issues | 0 |
| License | MIT |
| Archived | No |
| Data fetched | 2026-12-05 |
Source excerpt
Verbatim README excerpt, unedited, so you can check the summary above.
MCP-PostgreSQL-Ops lets Claude, OpenWebUI, and other MCP clients inspect a PostgreSQL server through natural-language questions.