Scherlok logo

Scherlok

by rbmuller

Read-only MCP monitoring for database profiling and anomaly detection across five warehouses, with optional dbt lineage.

Install Scherlok

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "rbmuller-scherlok": {
      "command": "uvx",
      "args": [
        "--from",
        "scherlok[duckdb]",
        "scherlok"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

rbmuller/scherlok connects AI agents to PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB for read-only data quality monitoring. It profiles tables, learns historical baselines, and detects volume, schema, freshness, NULL-rate, distribution, and cardinality anomalies without requiring rules or thresholds. Optional dbt support uses a project manifest and can resolve connections from profiles.yml. Reach for it when an agent needs to inspect warehouse health without receiving database credentials through the model.

Use cases

  • Monitor warehouse tables for unexpected data changes
  • Gate CI pipelines on critical data anomalies
  • Inspect dbt models after a build
  • Send anomaly alerts to team webhooks

Key features

  • Read-only database profiling
  • Historical anomaly detection
  • Schema, freshness, NULL, distribution, and cardinality checks
  • dbt manifest and lineage support
  • Webhook alerts and CI exit codes
  • JSON output for automation

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

26/30 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · scherlok (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars14Stargazers on the source repository.
Last commit12d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Scherlok works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Scherlok

rbmuller/scherlok is an MCP server that connects AI agents to PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB for read-only data quality monitoring. Its main capabilities are profiling tables and detecting volume, schema-drift, freshness, NULL-rate, distribution, and cardinality anomalies, with optional dbt manifest lineage.

Install it with `pip install scherlok`; Python 3.10 or newer is supported. Add the `duckdb`, `schedule`, or `dbt` extra when those capabilities are needed, such as `pip install 'scherlok[dbt]'` for dbt workflows.

It supports PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB. The CLI accepts a database connection URL, and dbt workflows support the same adapters through profiles.yml or an explicitly supplied connection string.

It profiles tables, stores observations in SQLite, and compares later runs with learned historical baselines. It checks volume, schema, freshness, NULL rates, distributions, and cardinality, using conservative defaults until enough valid profile history is available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewScherlok AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/rbmuller-scherlok?style=directory)](https://allmcps.com/mcp/rbmuller-scherlok)
HTML Embed
<a href="https://allmcps.com/mcp/rbmuller-scherlok"><img src="https://allmcps.com/api/badge/rbmuller-scherlok?style=directory" alt="Scherlok on AllMCPs" /></a>