MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with
MCP MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with comprehensive database analysis, performance monitoring, and intelligent maintenance.
postgresql-ops Tool address (e.g., http://localhost:8003/postgresql-ops) to connect MCP Tools. 1. Setup Ollama or OpenAI.Installation goes through your MCP client rather than a global install: point it at mcp-postgresql-ops on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Once MCP is connected, these are the calls the assistant has available:
get_server_info — ❌ Noneget_active_connections — ❌ Noneget_postgresql_config — ❌ Noneget_database_list — ❌ Noneget_table_list — ❌ Noneget_table_schema_info — ❌ Noneget_database_schema_info — ❌ Noneget_table_relationships — ❌ Noneget_user_list — ❌ Noneget_index_usage_stats — ❌ Noneget_database_size_info — ❌ Noneget_table_size_info — ❌ NoneYou will need 5 environment variables: POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP's toolset — get_server_info, get_active_connections, get_postgresql_config and 11 more — is a fair guide to whether it matches your workflow.
This entry was verified against MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| get_server_info | ❌ None |
| get_active_connections | ❌ None |
| get_postgresql_config | ❌ None |
| get_database_list | ❌ None |
| get_table_list | ❌ None |
| get_table_schema_info | ❌ None |
| get_database_schema_info | ❌ None |
| get_table_relationships | ❌ None |
| get_user_list | ❌ None |
| get_index_usage_stats | ❌ None |
| get_database_size_info | ❌ None |
| get_table_size_info | ❌ None |
| get_vacuum_analyze_stats | ❌ None |
| get_current_database_info | ❌ None |
{
"mcpServers": {
"mcp-postgresql-ops": {
"command": "uvx",
"args": ["--python", "3.12", "mcp-postgresql-ops"],
"env": {
"POSTGRES_HOST": "127.0.0.1",
"POSTGRES_PORT": "15432",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "changeme!@34",
"POSTGRES_DB": "ecommerce"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| POSTGRES_HOST | Endpoint or connection string the server talks to. | Optional |
| POSTGRES_PORT | Configuration value read at startup. | Optional |
| POSTGRES_USER | Configuration value read at startup. | Optional |
| POSTGRES_PASSWORD | Configuration value read at startup. | Optional |
| POSTGRES_DB | Configuration value read at startup. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.