MCP server · Analytics
PostgreSQL AIops MCP server
by AIops-tools
Lets your AI inspect a PostgreSQL database, explain slow queries and locks, and run guarded fixes with an audit trail.

This is a helper for people who look after a PostgreSQL database. It lets your AI look at what the database is doing, explain why it is slow, and, if you allow it, make careful changes. It is handy for database administrators and anyone who has to keep a Postgres server healthy.
What is an MCP server? The 30-second version
On its own, your AI can only chat. An MCP server is a small helper program that gives your AI a new skill or a connection to an app or service. This one connects your AI to a PostgreSQL database, so the AI can look things up and, when you ask, do things there for you. You stay in control because every action is logged and most changes can be undone.
What this MCP server does
You ask your AI a question about your PostgreSQL database. The AI sends that request to this helper program. The helper connects to your database, reads the system information, and works out the answer. Then it sends back a clear explanation or a list, and if you asked for a change, it makes the change and records how to undo it. Everything it does is written to an audit log.
Click to zoomWhat you can do with it
- Find the slowest queries and explain why they are slow
- Check which tables are bloated and need vacuuming
- See which queries are blocking each other and who started it
- List unused or missing indexes
- Check replication lag and WAL status
- Create or drop an index with a preview and an undo
- Terminate a runaway query or backend
Try asking your AI
- “Why is my database slow right now?”
- “Show me the top 5 queries by total time and explain the worst one”
- “Which tables have the most dead rows and should be vacuumed?”
- “Is there a lock chain blocking anything? Who is the root blocker?”
What it gives back to you
You get back plain answers in the chat: a ranked list of slow queries with the reason each one is slow, a table of bloated tables with a recommendation, or a lock chain showing who is blocking whom. For changes, you get a preview first, then a confirmation that the change was made, plus a note that it can be undone. The audit log keeps a record of every call.
Before you start
What you need
- A PostgreSQL database you can connect to
- The connection details (host, port, database name, user, password)
- Python 3.10 or newer, and uv or pipx to install the tool
- A master password to unlock the encrypted credential store
Good to know
Some tools can change your database, for example dropping an index or terminating a query. Always check the preview and make sure you have a backup or a read-only user if you are unsure.
Install it with your AI
Add PostgreSQL AIops MCP server to your AI, no technical skills needed
You don't install anything by hand. You copy one prompt, paste it into an AI that can work on your computer, and it checks, installs and connects the server for you, asking you when it needs something.
Sign in to get the install prompt
Members get a ready-made prompt that lets the Claude desktop app check PostgreSQL AIops MCP server, install it and connect it for them, step by step. You don't need any technical skills: you copy, paste and answer a few questions. Your connected AI can also find and install any of the 4,066 MCP servers here for you.
Who it's for
Database administrators, backend engineers, and anyone responsible for keeping a PostgreSQL server fast and healthy.





