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.
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.
- Queries against the connected database, in read-only mode by default so exploration cannot write
- One server per database, selected at launch with `--db` and `--uri` — `sqlite`, `mysql`, `elasticsearch` and 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
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.
One command — pip install db-query-mcp
