Skip to main content
MCP server CX Codex

Scherlok — Claude Code MCP server: what it does, how to install

Scherlok profiles database tables, spots data anomalies, and can fail CI when a critical issue appears.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add scherlok -e SCHERLOK_CONNECTION=<SCHERLOK_CONNECTION> -- uvx scherlok
Open on GitHub

What Scherlok does

Scherlok connects to PostgreSQL, BigQuery, Snowflake, MySQL, or DuckDB and records table characteristics such as row volume, column types, NULL rates, freshness, distributions, and cardinality. It keeps the collected profiles in a local SQLite store. Once five valid profiles exist, later checks can use variation learned from the latest 30 profiles.

The workflow has three commands: connect opens the database connection, investigate builds the profiles, and watch checks for changes. ci combines the process for pipeline use. Detectors cover volume changes, schema drift, NULL surges, distribution shifts, stale tables, and sudden growth in distinct values.

Alerts can go to Slack, Discord, Teams, or a generic HTTP endpoint. With --exit-code --fail-on critical, a critical finding becomes a CI failure. The dbt integration requires scherlok[dbt] and reads target/manifest.json together with profiles.yml. MCP setup requires SCHERLOK_CONNECTION; without it, the database connection is not configured.

What it helps with

  • profile warehouse tables
  • catch sudden row-count changes
  • detect schema drift and NULL spikes
  • flag stale database tables
  • fail CI on critical data anomalies

Example prompts for the agent

  • Ask Scherlok to inspect the database and report critical anomalies.
  • Compare the current tables with their learned profiles and find freshness issues.
  • Check the dbt project at ./my_dbt_project after the models finish running.

How to install Scherlok

Platform CLI

claude mcp add scherlok -e SCHERLOK_CONNECTION=<SCHERLOK_CONNECTION> -- uvx scherlok

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from scherlok <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Scherlok

How do I install Scherlok in Claude Code?

Run claude mcp add scherlok -e SCHERLOK_CONNECTION=<SCHERLOK_CONNECTION> -- uvx scherlok.

What does Scherlok do?

It learns table profiles and then detects changes in volume, schema, NULL rates, distributions, freshness, and cardinality. Findings can be used as a CI gate.

Which databases does Scherlok support?

The listed connectors cover PostgreSQL, BigQuery, Snowflake, MySQL, and DuckDB. dbt projects use the separate scherlok[dbt] installation.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor