LABSCO SUMMARY
Read-only by default, and the database is chosen before the agent sees it.
Both of those are safety properties, not features. The connection lives in the launch arguments, so the agent cannot point itself at a different host, and the default mode means an exploratory question cannot become a write. The friction is real too: one server per database, drivers installed separately, and on some clients only one of these servers at a time.
What it is
One MCP server that fronts whichever database you point it at. You choose the engine and the connection URI on the command line when the server starts, so the agent sees a single database rather than a menu of them, and the default mode is read-only. Results can be exported to CSV or JSON rather than only returned inline.
What you get
- Queries against the connected database, in read-only mode by default so exploration cannot write
- One server per database, selected at launch with
--dband--uri—sqlite,mysql,elasticsearchand the rest are all the same binary with different arguments - Elasticsearch treated as a first-class target alongside the SQL engines, with the index named in the URI
- Results exported as CSV or JSON when the answer is bigger than a chat window
- Standard connection-string formats for each engine, so the URI you already have for your app works here
Requirements
Python 3.10+, installed with pip install db-query-mcp, or pip install "db-query-mcp[elasticsearch]" for the Elasticsearch build. The database driver is separate and yours to install: pymysql for MySQL, psycopg2-binary for PostgreSQL, cx_Oracle for Oracle, pyodbc or pymssql for SQL Server; SQLite needs nothing. Run it as uvx db-query-mcp --db sqlite --uri sqlite:///example.db, or with the installed db-query-mcp command. One caveat the README states plainly: on some clients, Cursor among them, only one db-query-mcp server can run at a time.
Setup effort
One command — pip install db-query-mcp
USE CASES
01
Letting someone ask questions of a database without SQL
Point the server at the database in read-only mode and let the assistant translate the question, with no write path available.
02
Getting an answer out as a file
Export the result to CSV or JSON when it is a report rather than a number, instead of copying rows out of a chat.
03
Searching an Elasticsearch index conversationally
Launch with the Elasticsearch engine and put the index and CA certificate in the URI, then query it the same way you would a table.
04
Keeping production out of reach
Give each server a URI scoped to the database and account you are willing to expose — that decision is made at launch, not by the model.
BEFORE YOU INSTALL
What to know first
Requires
uvx on PATH
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
JSON
{
"mcpServers": {
"sqlite_db_mcp": {
"command": "uvx",
"args": [
"db-query-mcp",
"--db",
"sqlite",
"--uri",
"sqlite:///sqlite_company.db"
]
}
}
}pip
TERMINAL
pip install db-query-mcp