DataPrep MCP
An MCP server that lets an AI assistant load a tabular dataset, check its quality, explain what it finds, propose preprocessing that you approve step by step, and show the results in an interactive dashboard.
It's a learning project that exercises most of the protocol: tools with structured output, resources and resource templates, prompts, completions, progress and cancellation, approval requests (elicitation / multi-round-trip input), an MCP App (interactive UI), and a remote Streamable HTTP transport with token authentication.
Install
pip install dataprep-mcp # server
pip install "dataprep-mcp[agent]" # plus the example agent client
Python 3.11 or newer.
Use it locally (stdio)
Add it to an MCP client such as Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"dataprep": {
"command": "dataprep-mcp",
"env": { "DATAPREP_ALLOWED_DIRS": "/path/to/your/data" }
}
}
}
Or explore it with the MCP Inspector:
npx @modelcontextprotocol/inspector dataprep-mcp
The server only reads files inside DATAPREP_ALLOWED_DIRS (several folders are
separated by ; on Windows and : elsewhere).
What it offers
| Kind | Names |
|---|---|
| Tools | load_dataset, get_overview, assess_quality, profile_dataset, detect_outliers, analyze_target, set_target, recommend_preprocessing, apply_preprocessing,fill_missing, recommend_ml_approach, show_dashboard, export_dashboard,export_dataset |
| Resources | datasets://list, dataset://{id}/overview, /profile, /quality, /history, /sample{?rows}, /columns/{column} |
| Prompts | analyze_new_dataset, explain_quality_issues, investigate_column, prepare_for_modeling, explain_ml_recommendation |
| App | ui://dataprep/dashboard.html – interactive dashboard in clients that support MCP Apps |
Changes to data always need your approval, and each approved change creates a new
dataset version, so the original is never modified. export_dataset saves any
version as CSV, Parquet or Excel, into the exports folder; it never overwrites a file.
Run it as a remote server (HTTP)
Remote mode requires token authentication. Every dataset belongs to the user named in the token, so users can't see each other's data.
# 1. Create a signing key pair (keys/private.pem stays secret; never commit it)
dataprep-mcp-auth keys --out keys
# 2. Start the server; it only needs the public key
export DATAPREP_AUTH_PUBLIC_KEY_FILE=keys/public.pem # Windows: $env:DATAPREP_AUTH_PUBLIC_KEY_FILE="keys\public.pem"
export DATAPREP_ALLOWED_DIRS=examples
dataprep-mcp --transport http --port 8000 # endpoint: http://127.0.0.1:8000/mcp
# 3. Issue a token for a user (for testing)
dataprep-mcp-auth token --subject alice
With an identity provider (Auth0, Keycloak, Entra ID …) set DATAPREP_AUTH_JWKS_URI,
DATAPREP_AUTH_ISSUER and DATAPREP_AUTH_AUDIENCE instead of a key file.
GET /health needs no token. For quick local experiments only,
--allow-no-auth works when the host is 127.0.0.1.
Docker
dataprep-mcp-auth keys --out keys
docker compose up --build
compose.yaml mounts ./examples and ./data under /data and passes only the
public key into the container.
Configuration
| Variable | Meaning | Default |
|---|---|---|
DATAPREP_ALLOWED_DIRS |
folders the server may read | none (nothing is readable) |
DATAPREP_MAX_FILE_MB |
largest file it will load | 100 |
DATAPREP_REPORTS_DIR |
where export_dashboard writes |
<first allowed folder>/reports |
DATAPREP_EXPORT_DIR |
where export_dataset writes |
<first allowed folder>/exports |
DATAPREP_MAX_DATASETS |
datasets kept per user | 20 |
DATAPREP_AUTH_PUBLIC_KEY_FILE / _PUBLIC_KEY |
verify tokens with this key | – |
DATAPREP_AUTH_JWKS_URI |
verify tokens with a provider's keys | – |
DATAPREP_AUTH_ISSUER / _AUDIENCE |
expected token claims | dataprep-mcp |
DATAPREP_AUTH_REQUIRED_SCOPES |
comma-separated scopes | – |
Example client
dataprep-client connects to every server in mcp_servers.json (same format as
Claude Desktop) and gives you a shell to call tools, read resources and run an
agent (ask …, needs ANTHROPIC_API_KEY). Remote servers look like:
{ "mcpServers": { "remote": { "url": "http://127.0.0.1:8000/mcp", "token_env": "DATAPREP_TOKEN" } } }
Development
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -e . -r requirements-dev.txt
python -m pytest
python -m ruff check src tests
License
MIT
Metadata
Release files for dataprep-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dataprep_mcp-0.2.0.tar.gz | 66.9 kB | Without provenance | Details for dataprep_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dataprep_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dataprep_mcp-0.2.0-py3-none-any.whl |
Total release size: 147.8 kB
Release files / dataprep_mcp-0.2.0.tar.gz
| Download URL | dataprep_mcp-0.2.0.tar.gz |
|---|---|
| Size | 66.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6ebca77d2a798467c74af41f4d81e7877cf0cc209f964ff60f7500c10bab102
|
|
BLAKE2b-256 checksum How to use checksums |
c8a3661ca3e2d770014f0d56ad8975f7bf98f633e4543f7df92df67b633973d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / dataprep_mcp-0.2.0-py3-none-any.whl
| Download URL | dataprep_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 80.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31d8b6c80610d9159e285106e1add5cda374bcd21cc9b7cf72c112f3729b6817
|
|
BLAKE2b-256 checksum How to use checksums |
7072b5e151c66deb9db01bac5092ed7f5f43365373f0903d81bbfa09879cde12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for dataprep-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.