DistillQL docs
DistillQL is a Python package. It runs SQL across the databases a company already has, each part under the login of the person who asked. It drafts a glossary of the company's terms from past queries and records how it got every answer. You can use it from the command line and Python, or let an AI app call its six tools over MCP.
Version 0.1.14 is an alpha. It runs on Python 3.11 to 3.13.
pip install distillql
distillql demo
Three ways to use it
- On its own, from the command line or Python.
pip install distillqlis all you need.distillql crawl,glossary,review,sqlandgapsrun in a terminal, andimport distillqlgives the same engine and tools to a script or notebook. No AI is involved. - With any LLM.
distillql ask distillql.yaml "your question" --model gpt-oss:20banswers with a model on this machine (Ollama or LM Studio) or, if the config allows it, a cloud model. DistillQL runs the conversation and keeps personal columns and most rows back from the model. See use any LLM. - Through an AI app. Install the MCP extra too:
pip install 'distillql[mcp]'. Your app, such as Claude Code or Cursor, then startsdistillql mcpitself and calls the six tools. There is nothing to keep running: the server starts and stops with the app.
Where to start
- Quickstart: the sample shop, from install to an agent's answer, in about five minutes.
- Connect a database: Postgres or DuckDB, with no password stored in DistillQL's files.
- Connect an AI app: Claude Code, Claude Desktop, ChatGPT and other MCP apps.
- Glossary and review: how the glossary is drafted and how a person confirms it.
- The explain record: what ran where, as whom, and where each column came from.
The configuration, command line and Python API pages list every option.
What it does not do
- It calls no model. Your AI app brings the model, under your own plan or API key. DistillQL needs no key.
- It writes nothing to your databases. On every engine, the planner refuses any query that is not one SELECT before it runs. Postgres also runs each query in a read-only transaction that is rolled back. A DuckDB file opened with
read_only: truerefuses writes itself. On Trino, Snowflake, BigQuery and Databricks the planner's check and the user's own rights are the only guards. Thewritetool saves to the local DuckDB session or to a file inwrite_dir, never to a connected database. - It sends nothing to us. It runs in your Python process and keeps its state in local files.
Reporting a problem
Use the form at distillql.com/interest. Say what you ran and what happened. For a security problem, say so in the form and leave out the details until we reply.