DataSentry

io.github.Jackxiaozhiren由 GitHub 帳號 Jackxiaozhiren 發布v2.0.0更新於 Oct 26, 2026

Local-first MCP server for data-quality discovery, evidence, drift, and controlled repair.

已驗證STDIO僅桌面資料庫資料與分析

概覽

AI 產生的概覽

本地優先的 MCP 伺服器,讓助理掃描資料品質問題、檢視證據、比較漂移並提出可回滾的修復方案。

可以做什麼
  • 掃描檔案、資料庫與雲端物件,讀取附有樣本、數量與信賴度的證據化問題清單
  • 讀取六維品質評分、歷史紀錄,以及結構描述、列數與問題分布的漂移比較
  • 驗證資料契約並管理排程掃描工作
  • 提出、預覽、套用到副本、驗證並回滾修復,不覆寫原始檔案
適用情境
適合面對尚未完全信任的資料、希望在固化成規則前先自動發現問題並取得證據的情境;也適合讓助理對 CSV、Parquet、JSONL、XLSX、DuckDB、SQLite、PostgreSQL、MySQL 或 S3/GCS/Azure 物件執行保守、可回滾的偵測—修復—驗證流程。
執行需求
以本地 stdio 程序執行,從 PyPI 安裝 datasentry-ai,並以 uvx 或 datasentry mcp 指令指定專案路徑啟動。不需要 API 金鑰、雲端服務或 LLM,確定性偵測在本地以 DuckDB 執行;OpenAI 或 Ollama 輔助為選用。
安裝前請注意
修復類工具會變更資料,但流程會將變更套用到副本並保留原始檔案;套用前應檢視預覽與差異,必要時回滾。AI 產生的修復提案應維持人工核准。若啟用選用的 LLM 輔助,資料可能傳送給 OpenAI 或 Ollama,可啟用 PII 去識別化與稽核紀錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DataSentry,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[DataSentry]

DataSentry

Find bad data before your users do.
Automatic data-quality discovery, evidence-backed explanations, and safe reversible repair.
Local-first. Deterministic by default. AI optional.

Live demo · 30-second start · Use cases · FAQ · PyPI · Examples · MCP setup · Contribute

[Release] [PyPI] [Python] [CI] [License]

[DataSentry scans dirty data, explains evidence, and starts a safe repair loop]

中文导读:DataSentry 会先自动发现数据质量问题,再给出样本、比例、置信度等证据。修复采用 propose → preview → apply to a copy → verify → rollback 的保守流程。检测与评分不依赖 LLM,AI 只作为可选辅助,数据可以完全留在本机。

Try it in 30 seconds

Install the current PyPI release and run the zero-config product tour:

bash
pip install --upgrade datasentry-aidatasentry demo

datasentry-demo is also available as a direct console alias.

The demo generates synthetic dirty data, runs the built-in detectors, exports JSON + HTML reports, applies one safe repair to a copy, re-scans the repaired copy, and prints a rollback command. It needs no dataset, cloud service, API key, or LLM.

text
synthetic dirty CSV        ↓39 deterministic detectors        ↓evidence-backed issues + quality score        ↓preview → repaired copy        ↓re-scan → verify new/persistent issues

Prefer scanning your own data immediately?

bash
curl -L https://raw.githubusercontent.com/Jackxiaozhiren/datasentry/main/demo-data/orders.csv -o orders.csvdatasentry scan orders.csvdatasentry issues list --severity high

Or launch the interactive interfaces:

bash
datasentry          # terminal UIdatasentry-server   # Web UI + REST API at http://localhost:8000/ui/

Start with your problem

If you need to...Start here
Find suspicious data before you know every ruledatasentry scan data.csv
See the full discovery → repair → verify loopdatasentry demo
Block severe data issues in CIdocs/GITHUB_ACTIONS.md
Add quality gates to dbt / Airflowexamples/integrations/
Inspect and repair issues without overwriting the sourceSafe repair
Give AI agents deterministic data-quality toolsdocs/MCP.md

The default path is intentionally low-commitment: scan first, inspect evidence, then decide whether a finding deserves a permanent rule or a repair.

Why DataSentry exists

Most data-quality tools are excellent once you already know the expectations, checks, or contracts you want to enforce. Real incidents often start one step earlier: you do not yet know what is wrong.

DataSentry is built around the complete remediation loop:

text
Find → Explain → Fix safely → Verify
  • Find — discover common quality problems without writing every rule first.
  • Explain — attach samples, affected counts/ratios, detector evidence, and confidence.
  • Fix safely — preview changes and apply repairs to a copy instead of mutating the source.
  • Verify — re-scan the repaired copy and surface persistent or newly introduced issues.

DataSentry fits best when you are looking at data you do not fully trust yet, want evidence before codifying checks, or need a conservative remediation path. It complements expectation- and contract-driven tools rather than requiring you to replace them.

What it catches automatically

DataSentry ships with 39 deterministic detectors covering common failure modes such as:

  • missing and placeholder values;
  • invalid emails, URLs, dates, and encodings;
  • duplicate identifiers and uniqueness violations;
  • inconsistent categories and cross-field contradictions;
  • foreign-key and referential-integrity problems;
  • numeric and statistical outliers;
  • schema, row-count, score, and issue-distribution drift.

Every scan produces an evidence-backed issue list and a six-dimension quality score across completeness, validity, uniqueness, consistency, integrity, and timeliness.

Safe repair, not blind mutation

bash
# inspect the highest-severity findingsdatasentry issues list --severity high
# propose a repair without changing datadatasentry repair propose <issue_id> --file orders.csv
# preview the exact effectdatasentry repair preview <issue_id> --file orders.csv
# apply to a repaired copy; the original is not overwrittendatasentry repair apply <issue_id> --file orders.csv
# re-scan the repaired copy and detect regressionsdatasentry repair verify <run_id>
# inspect or undo the repairdatasentry repair diff <run_id>datasentry repair rollback <run_id>

Repairs are fingerprinted, auditable, and reversible. AI-generated repair proposals remain human-approved state changes.

Quality gates for CI

bash
datasentry scan orders.csv --fail-on high

For GitHub repositories, reuse DataSentry's maintained workflow_call gate instead of duplicating installation and exit-code handling:

yaml
jobs:  datasentry:    uses: Jackxiaozhiren/datasentry/.github/workflows/datasentry-quality-gate.yml@main    with:      path: data/orders.csv      fail_on: high

See docs/GITHUB_ACTIONS.md for inputs, artifacts, security boundaries, and version-pinning guidance.

Reports can be exported as JSON, Markdown, HTML, JUnit, and SARIF. The versioned, machine-readable JSON report Schema is included for downstream validation. The GitHub Actions example fails the workflow on severe findings while still uploading an HTML report for review.

Give AI agents deterministic data-quality tools

DataSentry includes an MCP stdio server:

bash
datasentry mcp --project /path/to/project

MCP-capable clients can scan files, inspect evidence-backed issues, read quality scores and trends, compare drift, validate contracts, manage scheduled jobs, and call DataSentry tools without bypassing the same underlying safety rules used by the CLI and REST API.

Copy-paste setup recipes for VS Code and Claude Desktop are in docs/MCP.md.

Boundary: AI may propose; humans approve state-changing repairs.

Where it fits next to popular data-quality projects

This is a positioning guide, not a winner/loser feature scorecard. These projects solve overlapping but different jobs; check their upstream documentation for current capabilities.

ProjectCore mental modelA strong fit when you want...
DataSentrydiscover → explain → repair → verifyautomatic issue discovery plus a controlled, reversible remediation loop
Great ExpectationsExpectations / expressive data testsexplicit validation rules, validation results, and generated data-quality documentation
Soda Coredata contracts and quality checksYAML contracts and verification across a broad data stack
Deequ“unit tests for data” on Sparklarge-scale data verification in Spark-centric environments
ydata-profilingone-line profiling / EDAfast exploratory profiling and shareable analysis reports

DataSentry is intentionally not trying to replace a metadata catalog, lineage platform, or every validator. Its focus is narrower: find bad data, show why it was flagged, and close the repair loop without gambling on the source.

Local-first by design

  • deterministic detection and scoring run locally;
  • DuckDB powers core local execution;
  • OpenAI/Ollama assistance is optional;
  • PII redaction, encrypted mappings, and LLM audit records are available when AI is enabled;
  • the original source file is not overwritten by repair workflows.

Data sources

  • CSV, Parquet, JSONL, XLSX
  • DuckDB and SQLite
  • PostgreSQL and MySQL
  • s3://, gs://, and az:// objects
  • single files, batches, and globs

History and drift

Persist scans and compare data over time:

bash
datasentry drift latest ordersdatasentry score

Tracked signals include schema changes, row-count movement, quality-score changes, and issue-distribution drift.

Architecture

mermaid
flowchart LR    Sources[Files / DBs / cloud objects] --> DuckDB[Local execution]    DuckDB --> Detect[39 detectors]    Detect --> Evidence[Evidence fusion]    Evidence --> Score[6-dimension score]    Score --> Reports[Reports / history / gates]    Reports --> CLI[CLI / TUI]    Reports --> Web[Web / REST]    Reports --> MCP[MCP]    Evidence --> Proposal[Repair proposal]    Proposal --> Preview[Preview]    Preview --> Apply[Apply to copy]    Apply --> Verify[Verify by re-scan]    Verify --> Rollback[Rollback artifact]    LLM[Optional OpenAI / Ollama] -. proposes .-> Proposal

Reproducible benchmark

bash
uv syncuv run python benchmarks/bench_scan.py 1000000 42

The benchmark generates synthetic dirty data and measures profiling, detection/fusion/scoring, numeric-outlier detection, JSONL reading, sampling, score drift, and memory high-water marks. See docs/BENCHMARKS.md.

Development

bash
uv syncmake check          # lint + mypy --strict + tests/coveragemake demo           # exercise the public datasentry demo pathmake bench          # benchmarkmake build          # distributions

Contributing

Useful contributions include new detectors, connectors, integration examples, reproducible benchmark cases, documentation/translations, minimal bug reproductions, and CLI/TUI/Web usability improvements.

Want a small first contribution? Start with good first issue #14 or good first issue #15.

See CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, and ROADMAP.md. Small contributions are tracked with good first issue and help wanted labels.

Documentation

License

Apache-2.0 — see LICENSE.


If DataSentry helps you catch bad data before it reaches production, consider giving the repository a ⭐.
It helps other data engineers discover the project.

來源:README.md,提交 8c1a89b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v2.0.0最新Oct 19, 2026
  2. v1.0.5Oct 19, 2026
  3. v1.0.4Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分