Skip to main content

MCP server that profiles tabular data files (CSV, TSV, Parquet, Excel, JSON): schema, distributions, data-quality flags, and dtype suggestions for LLM agents.

Project description

data-profiler-mcp

CI PyPI Python License: MIT

An MCP server that lets an LLM understand any tabular data file: point it at a CSV, Parquet, Excel or JSON file and get schema, distributions, data-quality flags and dtype suggestions back as structured JSON.

Stop pasting df.head() and df.info() into chat. Ask your assistant "profile sales.csv" and it reads the file itself, then tells you what is in it, what is wrong with it, and how to load it more efficiently.

data-profiler-mcp demo: one prompt returns severity-ranked data-quality flags and a memory-saving dtype plan

Works with Claude Desktop, Claude Code, Cursor, or any MCP-compatible client.


Features

Six focused tools, all returning clean JSON:

Tool What it does
profile_dataset One-call overview: shape, memory, missing-value summary, duplicate rows, a per-column summary, and plain-language quality flags.
preview_data The first / last / a random sample of n rows as real records.
column_stats Deep dive on one column: full percentiles, skew/kurtosis, outliers (IQR), a histogram, or top values + string lengths for text.
detect_quality_issues A data-quality audit: duplicates, high-missing and constant columns, numbers stored as text, mixed-type columns, whitespace padding, likely IDs, grouped by severity.
suggest_dtypes Memory-saving / type-fixing recommendations (text to numeric, low-cardinality to category, integer/float downcasting) with estimated savings.
compare_datasets Diff two files: added/removed columns, dtype changes, row-count delta, and per-column null-rate and mean side by side.

Supported formats: CSV, TSV, Parquet, Excel (.xlsx/.xls), JSON and JSON Lines. Large files are read up to a row cap and clearly flagged as sampled.


Install

Requires Python 3.10+.

# with uv (recommended)
uv tool install data-profiler-mcp

# or with pip
pip install data-profiler-mcp

Or run it straight from source without installing:

git clone https://github.com/haiiibin/data-profiler-mcp
cd data-profiler-mcp
uv run data-profiler-mcp

Configure your client

Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and add:

{
  "mcpServers": {
    "data-profiler": {
      "command": "data-profiler-mcp"
    }
  }
}

Running from source instead of installing? Point it at the checkout:

{
  "mcpServers": {
    "data-profiler": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/data-profiler-mcp", "run", "data-profiler-mcp"]
    }
  }
}

Restart Claude Desktop and the tools appear under the plug icon.

Claude Code

claude mcp add data-profiler -- data-profiler-mcp

Usage

Once connected, just talk to your assistant:

  • "Profile ~/data/sales_2025.csv and tell me what's in it."
  • "Are there any data-quality problems in customers.parquet?"
  • "Show me 20 random rows from events.jsonl."
  • "Give me full stats for the revenue column, including outliers."
  • "How can I shrink this DataFrame's memory usage?"
  • "What changed between snapshot_jan.csv and snapshot_feb.csv?"

Example: profile_dataset

{
  "file": { "name": "sample.csv", "format": "csv", "size_human": "14.2 KB" },
  "shape": { "rows": 201, "columns": 13, "sampled": false },
  "memory_usage_human": "78.4 KB",
  "missing_summary": { "total_missing_cells": 561, "pct_missing": 21.5, "columns_with_missing": 3 },
  "duplicate_rows": { "count": 1, "pct": 0.5 },
  "columns": [
    {
      "name": "price", "dtype": "float64", "inferred_type": "float",
      "non_null": 201, "null": 0, "unique": 51,
      "stats": { "min": 0.0, "max": 100000.0, "mean": 521.3, "median": 24.0 }
    }
  ],
  "quality_flags": [
    "[high] empty_col: Column is entirely empty (all values missing).",
    "[warning] const: Column holds a single constant value; it carries no information.",
    "[warning] numeric_text: Every value parses as a number but the column is stored as text."
  ]
}

Example: detect_quality_issues

{
  "issue_count": 8,
  "severity_counts": { "high": 2, "warning": 4, "info": 2 },
  "issues": [
    { "column": "empty_col", "issue": "all_missing", "severity": "high",
      "detail": "Column is entirely empty (all values missing)." },
    { "column": "numeric_text", "issue": "numeric_stored_as_text", "severity": "warning",
      "detail": "Every value parses as a number but the column is stored as text." }
  ]
}

How it works

The server is built on FastMCP and reads files with pandas (plus pyarrow for Parquet and openpyxl for Excel). Every tool returns a plain, JSON-serializable dict, with NumPy scalars, NaN/inf and timestamps normalized so the output is safe to hand straight back to a model. Nothing is written to disk and no data leaves your machine.


Development

uv venv
uv pip install -e ".[dev]"
uv run pytest

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

data_profiler_mcp-0.1.1.tar.gz (217.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data_profiler_mcp-0.1.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file data_profiler_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: data_profiler_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 217.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for data_profiler_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 97e43b18358411ee4aaed63fb9a5f7b0a383383a70b1266526844fc5ce0b4c52
MD5 ddfece121d835d85c73997b78a20abe0
BLAKE2b-256 4bebf9b48663e31ae97b3c71362753c555c184b210dcf5e4333c626305e38a98

See more details on using hashes here.

File details

Details for the file data_profiler_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: data_profiler_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for data_profiler_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c16521e9098195a831321c3654928928dcec916449ef18739fa047787a95f938
MD5 13c229bbedf421cfb21e44aaeb08d9f8
BLAKE2b-256 9f46eab506f318f3644b58edd9f4d7032d7729e51f0cf0c09022f48b82a09677

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page