dq

dbt-style data quality checks, exposed to an agent over the Model Context Protocol.

Source on GitHub

Ask a model about a table it cannot see and it will describe the table it expects.

These checks make it look first. Everything below runs in your browser — the same core.py the MCP server calls, compiled to WebAssembly. Nothing you load leaves this page.

Data

Same JSON the run_suite tool takes. Edit it and run again.

Results appear here. Select one and the rows it caught are highlighted in the table.

Starting Python

Give it to Claude

Clone the repo, then point Claude Desktop at the virtual environment's Python — not a bare python, which is the single commonest reason the server never appears.

// claude_desktop_config.json
{
  "mcpServers": {
    "dq": {
      "command": "/abs/path/dq-mcp/.venv/bin/python",
      "args": ["/abs/path/dq-mcp/dq_server.py"]
    }
  }
}

Then ask it: profile fixtures/orders.csv, suggest a suite, and run it.

Or run it in CI

An MCP server is only reachable from an agent. The same engine has a command line, so a pipeline can fail a build on a broken assertion.

$ dq suggest fixtures/orders.csv > suite.json
$ dq suite fixtures/orders.csv --spec suite.json

  [FAIL]  unique  5 row(s) share a key that
          should be unique — ORD-00013 appears 3 times.

$ echo $?
1

Exit 1 when an assertion fails, 2 when a check could not run at all.

The checks

not_null
Columns that must be fully populated.
unique
One column, or several as a composite key.
relationships
Every foreign key exists in the parent table.
accepted_values
A column stays inside an allowed set.
range
A number stays between bounds. Catches the negative amount that passes everything else.
freshness
The newest row is recent enough. A table can be clean and three days stale.

Reading a result

Status has three values, not two. Error means the check could not run and tells you nothing about the data; fail means it ran and the assertion did not hold. Counting a missing column as a data failure hides the real ones.

A pass means the assertion held on the rows present. It does not mean the data is correct — a fully populated column of wrong values passes not_null cleanly.