
Data Profiler
io.github.Ridadata由 GitHub 帳號 Ridadata 發布v0.1.1更新於 Oct 24, 2026
Profile local CSV, Parquet, JSON and Excel files into a compact data-quality summary.
概覽
一個本機 MCP 伺服器,將 CSV、Parquet、JSON 與 Excel 檔案剖析成精簡的資料品質摘要,讓助理不必讀取原始資料就能了解資料集。
- 可以做什麼
- 將本機資料檔案剖析為結構化摘要,包含欄位型別、空值數量、相異值計數、樣本值、數值四分位數與日期範圍
- 標記可能的資料品質問題,例如固定值欄位、全空欄位、疑似識別碼、混合型別,以及以文字儲存的數字或日期
- 可透過取樣列數、欄位數上限、高頻值數量與 Excel 工作表名稱控制剖析結果
- 啟動時指定根目錄可將剖析範圍限制在單一目錄內
- 適用情境
- 適合助理需要理解過大或過於雜亂、無法直接貼進對話的本機資料集時使用,也適合在分析或建模前快速檢查資料品質。
- 執行需求
- 以本機程序執行,透過 PyPI 安裝,需要 Python 3.10 以上版本;不需要資料庫、索引或 API 金鑰。僅讀取本機檔案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Data Profiler,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-data-profiler
Let an AI agent understand a dataset without reading it.
An MCP server that turns a CSV, Parquet, JSON, or Excel file into a compact structured profile — types, ranges, missing values, and likely data-quality problems — instead of raw rows.
Overview
To let an AI agent reason about a data file, you normally paste rows into the conversation. That is expensive, truncates on anything large, and still leaves the model guessing at column types and null rates.
This server answers the question directly. One tool call returns a structured summary that is orders of magnitude smaller than the data and says more about it:
The 645 MB file cannot go into a context window at any price. It is fully characterised here in under two seconds.
Demo
python demo.py generates a deliberately messy dataset, profiles it, and reports what came back:
The same profiler seen from an MCP client — one question, one profile_dataset call, and the file
is characterised without a single row entering the conversation:
Three real problems surfaced before any analysis began: a column that never varies, one that is
entirely empty, and a date column that sorts as text — so "2024-10-01" < "2024-9-01" — silently
corrupting any time-based result.
Features
- Six data-quality flags — constant, all-null, probable ID, mixed types, and numbers or dates stored as text.
- Full column statistics — dtype, null count and percentage, distinct count, sample values, quartiles for numerics, ranges for dates, frequent values for categories.
- Bounded output — the response stays small no matter how wide the input, and always reports what it truncated.
- Honest sampling — large files are sampled, but never silently; the true row count is always included.
- Five formats, eleven extensions —
.csv.tsv.txt.parquet.pq.json.jsonl.ndjson.xlsx.xlsm.xls, plus.gzvariants of the text formats. - Path confinement — optional
--rootrestricts profiling to a single directory. - Zero configuration — no database, no index, no warm-up. Point it at a file.
Architecture
All profiling logic lives in profiler.py, which imports nothing from MCP. It is unit-testable
without a protocol harness and usable as an ordinary Python library. server.py is only the
adapter.
Installation
Requires Python 3.10+.
Install the development version
Claude Code
Claude Desktop and other MCP clients
Add to your client's MCP configuration:
To confine the server to one directory, add "args": ["--root", "/path/to/your/data"].
Usage
Once registered, ask in plain language:
- "Profile
data/orders.csv" - "Which columns have missing values?"
- "Is this dataset clean enough to model?"
Tool reference
profile_dataset(path, sample_rows=50000, max_columns=100, top_k=5, sheet=None)
Quality flags
As a Python library
Example output
Verbatim output for the sample dataset produced by python demo.py, with three of the six
columns shown:
Note that order_id carries no top_values: for a near-unique column every count would be 1,
so the list is omitted rather than padding the response with noise.
When a file is sampled, the profile also carries "sampled": true, the true total_rows, and a
sampling_note saying so.
Design notes
Bounded output. The tool must cost less than the data it describes, so the response is capped
regardless of input width and long strings are truncated. Near-unique columns skip the
frequent-values list, since every count would be 1.
Honest sampling. Large files are profiled from a sample, but the result always carries
"sampled": true alongside the true row count — a silently sampled statistic is a wrong
statistic. Row counts come from Parquet metadata or a raw newline scan, never a full parse into
memory.
No silent wrong answers. The same rule governs every default that could mislead. A workbook's first sheet is often a title page, so Excel profiles always name the sheet used and list the others rather than reporting an untouched sheet as a clean dataset. CSV delimiters are inferred by testing candidates for a stable column count, which handles the semicolon files common in European open data without the header-mangling that character-frequency sniffers cause. Compressed files are decompressed before either check, since inspecting gzip bytes as text yields a plausible-looking answer that is entirely wrong.
Path safety. --root confines profiling to one directory. Paths are canonicalised before the
check, so .. and symlinks cannot escape it.
Limitations
- Read-only, local files. No databases, no URLs, no writes.
- Sampled by default. Statistics reflect the first 50,000 rows unless you pass
sample_rows=null. - Row-oriented. No cross-column correlations, outlier detection, or plots.
- pandas parsing rules apply. The profile shows what pandas sees, which is what your own code
will see. Notably
"NA","N/A", and"None"are read as missing, so a region column containing"NA"for North America will report nulls. That trap is surfaced, not hidden. - Nested JSON is not flattened. Unhashable cells make the duplicate check inapplicable, and it
is reported as
null. - One Excel sheet per call. The profile names the sheet read and lists the rest; pass
sheetto switch.
Development
CI runs the suite on Python 3.10–3.13 (Linux) plus Windows and macOS, and performs a real stdio handshake against the built server to confirm it starts and advertises its tool.
Releasing
Publishing to PyPI is automated via Trusted Publishing, so no API token is stored in this
repository. Publishing a GitHub Release triggers .github/workflows/release.yml, which builds the
distributions, verifies the built wheel actually installs and imports, and uploads it.
Issues and pull requests are welcome.
Roadmap
- Publish to PyPI
- Gzip-compressed inputs (
.csv.gz,.jsonl.gz) - List on the official MCP registry
- Cross-column correlation summary for numeric features
- Multi-sheet Excel profiling in a single call
- Remote sources (
s3://,https://)
License
MIT © Rida Aderkane
來源:README.md,提交 5d41081
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分