MCP server · Analytics
codeDB Lens MCP server
by codedb-io
Ask your AI to run a read-only health check on your SQL Server or PostgreSQL database and explain what to fix.
codeDB Lens is a free tool that looks at your SQL Server or PostgreSQL database and gives it a grade from A to F, with the evidence behind every finding. It connects with a read-only login, so it can look but never change anything. It is handy if you look after a database but are not a database expert, and you would like a plain explanation of what is wrong.
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. Here it connects your AI to your database through codeDB Lens, using the connection profiles you already saved. So when you ask a question, your AI can actually look things up in your database and answer with real numbers instead of guesses.
What this MCP server does
You ask your AI something about your database, like whether the backups are healthy. Your AI passes that request to the codeDB Lens helper running on your own computer. The helper connects to your database with a read-only login and runs the health check or a single safe query. Then it hands the results back to your AI, which explains them to you in normal words. Nothing about your database leaves your machine.
What you can do with it
- Run a full health check and get an A to F grade
- Explain what each finding means and what to do next
- Read recordings that watched your database for up to 24 hours
- Compare two health checks to see what changed
- List and describe the tables in a database you allow
- Answer questions with one SELECT query at a time
- Keep queries inside row and time limits you set
Try asking your AI
- “Run a health check on my prod profile and tell me the grade”
- “Which findings are the most urgent and why”
- “List the tables in the app database and describe the biggest one”
- “How many orders were placed last month”
- “Compare this week's check with last week's and tell me what got worse”
What it gives back to you
You get a short written answer in the chat, in plain language. For a health check, that includes the A to F grade, the list of findings, and the evidence behind each one. For data questions, you get the rows you asked for, kept inside the limits you set. It can also point you to the full HTML report if you want to share it.
Before you start
What you need
- codeDB Lens installed on your computer
- A saved connection profile for your database, with the password stored in your operating system's keychain
- A read-only login on the database (the README shows the exact permissions to grant)
- An AI client that supports MCP, such as Claude Desktop, VS Code, Cursor or Claude Code
Good to know
It is read-only by design, but the data mode can read the tables you allow, so only point it at databases and logins you are comfortable sharing with your AI client.
Install it with your AI
Add codeDB Lens 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 codeDB Lens 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 5,044 MCP servers here for you.
Who it's for
Anyone who looks after a SQL Server or PostgreSQL database without being a database specialist, such as a developer, a small IT team, or an analyst who wants plain answers about database health.





