# rbmuller/scherlok [Health: Active]

**Category:** 📊 Data Platforms  
**Repository:** https://github.com/rbmuller/scherlok  
**GitHub Stars:** 14  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/rbmuller-scherlok

## Description
Zero-config data quality monitoring across Postgres, BigQuery, Snowflake, MySQL, and DuckDB. Profile a warehouse, detect anomalies (volume, schema drift, freshness, NULLs, distribution, cardinality), with optional dbt manifest lineage. Read-only — connection resolved server-side, never passed via the model.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "scherlok": {
    "command": "uvx",
    "args": ["--from","scherlok[duckdb]","scherlok"]
  }
}
```

## Documentation

## What rbmuller/scherlok does

rbmuller/scherlok provides read-only data quality monitoring over PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB. It profiles database tables and compares later observations with learned historical behavior. The server-side connection model keeps the database connection away from the model: the agent can request monitoring operations without passing credentials as model content.

Checks cover row-volume changes, schema changes, table freshness, NULL-rate increases, numeric distribution shifts, and changes in distinct-value counts. Findings receive INFO, WARNING, or CRITICAL severity. The system is designed for anomaly discovery rather than manually authored validation rules, so it can identify changes that were not anticipated in a configuration file.

## How it works

An initial investigation collects table-level and column-level information, including row counts, types, NULL rates, distributions, freshness cadence, and cardinality. These profiles are stored locally in SQLite. Subsequent watches compare new observations with the stored history.

After at least five valid profiles, Scherlok can estimate metric-specific variability from recent history. The historical window covers the latest 30 profiles and applies to volume, numeric means, NULL rates, and distinct counts. Before enough history exists, or when the history cannot be used, conservative fixed defaults are applied.

The command-line workflow has separate connection, investigation, and watch stages, while `scherlok ci <url>` combines the process for pipeline use. Watches can return a failing exit code when anomalies are found and can send alerts to Slack, Discord, Microsoft Teams, or a generic webhook endpoint.

## Setup and configuration

Install the Python package with `pip install scherlok`; Python 3.10 or newer is supported. DuckDB demo functionality is available through the `duckdb` extra. Scheduling support is installed with the `schedule` extra, and dbt features use the `dbt` extra.

A database connection can be supplied to the CLI with a connection URL. Profile data can be kept in a configured local or S3-backed SQLite store, which allows CI jobs or repeated watches to use shared history. Webhook URLs are passed to the watch or CI commands.

## Tools and capabilities

- Profile all tables in a supported database.
- Detect volume drops and spikes.
- Identify schema drift and freshness changes.
- Track NULL-rate, distribution, and cardinality anomalies.
- Send formatted or generic webhook alerts.
- Produce CI exit codes and JSON output for automation.
- Read dbt materialized models from `target/manifest.json` and resolve supported adapters through `profiles.yml`.

The dbt workflow can profile models after `dbt run`, or use a wrapper that runs dbt and watches successful model nodes. It supports `table`, `incremental`, and `view` models. A separate dbt package provides native tests such as row-count, recency, uniqueness, NULL-proportion, and volume-anomaly checks.

## Limitations and notes

Scherlok is read-only and intended for observation rather than repairing data or changing schemas. Automatic detection depends on collected profile history; early runs use fallback defaults until sufficient valid observations exist. dbt adapter support includes PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB, while other adapters require an explicit connection string. The project is released under the MIT license.

_Full upstream README: https://allmcps.com/mcp/rbmuller-scherlok/readme_

