DevRay DataLab MCP
Local-first MCP server for data science/ML on local datasets via stdio, with tools to inspect, analyze, train, compare, tune, export, predict, and track experiments.
List and profile workspace datasets (CSV/Parquet/Excel) with previews, types, missingness, and stats.
Analyze correlations, data quality, potential leakage, and feature drift between datasets.
Prepare datasets and create/validate/list reproducible train/validation/test split manifests.
Train baseline models, run non-blocking training jobs, poll status, cancel jobs, and list jobs.
Compare multiple algorithms with cross-validation and select a winner by metric.
Run AutoML/tuning/leaderboard searches with cross-validation and optional Optuna hyperparameter search.
Export fitted model bundles and generate predictions from saved artifacts.
Track/list/compare experiments and inspect saved models/artifacts.
Check system CPU, RAM, storage, and GPU detection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DevRay DataLab MCP inspect sample_classification.csv and summarize missing values"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DevRay DataLab MCP
Local-first Data Science & Machine Learning for AI Assistants
DevRay DataLab MCP is a local-first Model Context Protocol (MCP) server that lets AI assistants such as OpenAI Codex, Cursor, Claude Desktop, Cline, Kilo Code, and others perform real data science and machine learning on your own computer — no cloud services, no API keys, no paid subscriptions.
Everything runs locally via stdio: dataset loading, exploratory data analysis, preprocessing, classification/regression training, model comparison, export, and prediction. Your datasets never leave your machine.
Installation
Method A — uvx (simplest, no virtualenv)
uvx devray-datalab-mcpRequires uv. Install uv if needed:
# Windows PowerShell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Method B — pip in a virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install devray-datalab-mcp
devray-datalab-mcpLinux / macOS:
python3 -m venv .venv
source .venv/bin/activate
pip install devray-datalab-mcp
devray-datalab-mcpMethod C — from GitHub source
pip install git+https://github.com/rayklanderman/devray-datalab-mcp.git
devray-datalab-mcpA stdio MCP server waits for input from an MCP client. Launching
devray-datalab-mcpdirectly without a connected client will appear to do nothing — this is expected. Connect it through an MCP-compatible client (see client configuration below).
Configure where datasets and model artifacts live with environment variables:
Variable | Default | Meaning |
|
| Dataset directory on the machine running the server |
|
| Directory for saved model artifacts |
|
| SQLite experiment database path. Its parent directory must be writable. |
Related MCP server: Kaggle Dataset Analyst
MCP client configuration
Add the server to your MCP-compatible client. Replace C:\MLData with your own paths.
1. OpenAI Codex (CLI & VS Code)
DevRay DataLab MCP connects to the OpenAI Codex CLI and its VS Code extension through local stdio execution. Codex and its VS Code extension share configuration, so registering the server once makes it available in both.
Prerequisites
Install the Codex CLI (
codexon PATH).Install uv (provides
uvx).Create the dataset and artifact directories before registering:
New-Item -ItemType Directory -Force "C:\MLData\datasets","C:\MLData\artifacts"
Copy-Item "examples\sample_classification.csv" "C:\MLData\datasets\"Register the server
codex mcp add devray-datalab `
--env DEVRAY_WORKSPACE_DIR=C:\MLData\datasets `
--env DEVRAY_ARTIFACTS_DIR=C:\MLData\artifacts `
-- uvx --from devray-datalab-mcp devray-datalab-mcpDEVRAY_WORKSPACE_DIR— directory containing your CSV datasets.DEVRAY_ARTIFACTS_DIR— directory where trained model artifacts are saved.Replace
C:\MLDatawith your own paths.
Verify registration
codex mcp list
codex mcp get devray-datalabExpected output shows enabled: true, transport: stdio, command: uvx, and the devray-datalab-mcp args.
Manual config.toml configuration
Codex also reads ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml):
[mcp_servers.devray-datalab]
command = "uvx"
args = ["--from", "devray-datalab-mcp", "devray-datalab-mcp"]
[mcp_servers.devray-datalab.env]
DEVRAY_WORKSPACE_DIR = "C:/MLData/datasets"
DEVRAY_ARTIFACTS_DIR = "C:/MLData/artifacts"Codex CLI and its VS Code extension share this configuration. Register once, use everywhere.
2. Cursor
Cursor uses the standard MCP client configuration format.
Add to your Cursor MCP settings (settings.json):
{
"mcp.servers": {
"devray-datalab": {
"command": "devray-datalab-mcp",
"args": [],
"env": {
"DEVRAY_WORKSPACE_DIR": "C:\\MLData\\datasets",
"DEVRAY_ARTIFACTS_DIR": "C:\\MLData\\artifacts"
}
}
}
}Replace C:\MLData with your own paths. Save the file and restart Cursor for changes to take effect.
3. Claude Desktop
Add to your Claude Desktop MCP settings (claude_desktop_config.json, typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"devray-datalab": {
"command": "devray-datalab-mcp",
"args": [],
"env": {
"DEVRAY_WORKSPACE_DIR": "C:\\MLData\\datasets",
"DEVRAY_ARTIFACTS_DIR": "C:\\MLData\\artifacts"
}
}
}
}Replace C:\MLData with your own paths. Save the file and restart Claude Desktop for changes to take effect.
4. Cline
Add to your Cline MCP settings (settings.json):
{
"mcp.servers": {
"devray-datalab": {
"command": "devray-datalab-mcp",
"args": [],
"env": {
"DEVRAY_WORKSPACE_DIR": "C:\\MLData\\datasets",
"DEVRAY_ARTIFACTS_DIR": "C:\\MLData\\artifacts"
}
}
}
}Replace C:\MLData with your own paths. Save the file and restart Cline for changes to take effect.
5. VS Code / GitHub Copilot MCP
Add to your VS Code MCP settings (settings.json):
{
"mcp.servers": {
"devray-datalab": {
"command": "devray-datalab-mcp",
"args": [],
"env": {
"DEVRAY_WORKSPACE_DIR": "${workspaceFolder}/datasets",
"DEVRAY_ARTIFACTS_DIR": "${workspaceFolder}/artifacts"
}
}
}
}6. Other MCP clients
DevRay DataLab MCP works with any MCP-compatible client that supports stdio transport. Use devray-datalab-mcp as the command with no arguments, and set DEVRAY_WORKSPACE_DIR and DEVRAY_ARTIFACTS_DIR as environment variables.
7. Kilo Code
{
"mcpServers": {
"devray-datalab": {
"command": "uvx",
"args": [
"--from",
"devray-datalab-mcp",
"devray-datalab-mcp"
],
"env": {
"DEVRAY_WORKSPACE_DIR": "C:\\MLData\\datasets",
"DEVRAY_ARTIFACTS_DIR": "C:\\MLData\\artifacts"
}
}
}
}Available tools
Tool | What it does | Category |
| List CSV datasets in the workspace | Dataset |
| Load a CSV; report types, missing values, stats, preview | Dataset |
| Pearson/Spearman correlations, strongest pairs | Analysis |
| Missing values, duplicates, constants, outliers, recommendations | Analysis |
| Flag potential data-leakage issues in a dataset | Analysis |
| Detect feature drift between reference and current datasets | Analysis |
| Define target + task type; fit preprocessing on train data only | Preprocessing |
| Train a classification or regression model | Training |
| Submit a training job (non-blocking); returns a job id | Training |
| Return the status and result of a training job | Training |
| Request cancellation of a queued or running training job | Training |
| List training jobs, newest first | Training |
| Compare multiple algorithms; select best by metric (with cross-validation) | Training |
| Run automated ML: train candidates with CV, rank by objective | AutoML |
| Tune hyperparameters of a single model with cross-validation | AutoML |
| Run a fresh AutoML search and return ranked trials and the winner | AutoML |
| Save model with pipeline, metadata, and schema | Models |
| Generate predictions from a saved local model | Models |
| List recorded training experiments, newest first | Experiments |
| Get a single recorded experiment by ID | Experiments |
| Compare multiple recorded experiments by ID | Experiments |
| List experiments that produced a model artifact | Experiments |
| Load a previously exported model artifact by experiment ID or name | Experiments |
| Create a reproducible train/validation/test split manifest | Data Splits |
| Validate a stored split manifest against a dataset | Data Splits |
| List all stored split manifests, newest first | Data Splits |
| CPU, RAM, storage, GPU detection | System |
Supported algorithms
Classification: Logistic Regression, Decision Tree, Random Forest, Extra Trees, HistGradientBoosting, SVM, K-Nearest Neighbors.
Regression: Linear Regression, Ridge Regression, Decision Tree, Random Forest, Extra Trees, HistGradientBoosting, SVM, K-Nearest Neighbors.
Additional models (XGBoost, LightGBM) are available via the optional devray-datalab-mcp[boosting] extra.
Optional dependencies:
devray-datalab-mcp[boosting]— XGBoost, LightGBMdevray-datalab-mcp[explain]— SHAP explanationsdevray-datalab-mcp[parquet]— Parquet file support (pyarrow)devray-datalab-mcp[excel]— Excel file support (openpyxl)
What's new in v0.3.4
All 27 tool descriptions explain when to use them, what they return, and where they read or write data.
get_model_leaderboardnow acceptsmodels, for example["decision_tree", "logistic_regression"]for classification. Omit it for the default candidates. The search evaluates explicit IDs in order within the available budget and ranks completed trials by the selection metric.automl_run,tune_model, andget_model_leaderboardhonor explicit CSV delimiters. Installoptunainto the server's Python environment to enable hyperparameter search. The base install scores the selected candidates with cross-validation.The reliability repairs cover chronological CV, reproducible tuning with a shared deadline, cancellation, model coverage, and prediction validation.
See the v0.3.4 release notes draft for details.
What's new in v0.3.2
Faster native MCP initialization: tool modules load lazily on first call, keeping server startup fast; no heavy ML imports at startup.
All 27 MCP tools correctly registered: every tool listed in the server spec is available via
tools/list.Leakage-safe training with excluded features:
exclude_columnshonored across prepare/train/compare/export/jobs/automl; preprocessing fitted on train data only.Chronological splitting and reusable split manifests:
row_ordertime-based splitting pluscreate_split_manifest/validate_split_manifest/list_split_manifestswith dataset fingerprints.Protected test-holdout isolation: test set kept as protected holdout, isolated from training.
AutoML, tuning and background-job safeguards: cooperative cancellation, trial and time limits.
Model export metadata improvements: schema, fingerprint, and library versions recorded with exported artifacts.
Unseen-category warnings in predictions: warns when categorical features were not seen during training.
What's new in v0.3.1
CSV delimiter detection: Automatic detection of comma, semicolon, tab, and pipe delimiters, with explicit override support.
Package version consistency:
__version__now correctly reports0.3.1.CSV parsing regression tests: 7 new tests covering all delimiter types including semicolon-delimited data with 21 columns.
Full tool compatibility: All 27 MCP tools work correctly with the new loader.
What's new in v0.3.0
Non-blocking training jobs:
start_training_job,get_training_status,cancel_training_job,list_training_jobs— training runs off the MCP request loop with cooperative cancellation.Automated Machine Learning:
automl_run,tune_model,get_model_leaderboard— train candidates with CV, rank by objective, and optionally tune with Optuna.More dataset formats: Parquet (
.parquet) and Excel (.xlsx/.xls) via optional[parquet]/[excel]dependencies.Reproducible split manifests:
create_split_manifest,validate_split_manifest,list_split_manifests— stratified/group/time-ordered splits with dataset fingerprints; test set is a protected holdout.Feature diagnostics:
detect_potential_leakage,analyze_feature_drift— flag potential target leakage and distribution drift.
What's new in v0.2.0
Real cross-validation:
compare_modelsnow performs actual cross-validation (thecvparameter was previously ignored). Preprocessing is fitted independently inside each fold to prevent data leakage. Strategies: KFold, StratifiedKFold, GroupKFold, StratifiedGroupKFold, TimeSeriesSplit.Richer metrics: balanced accuracy, macro/weighted F1, PR-AUC, log loss, Brier score, confusion matrix (classification); median absolute error, MAPE (regression).
Calibration: probability calibration with sigmoid or isotonic methods.
Threshold optimization: maximize F1/precision/recall or minimize a cost matrix, with optional precision/recall constraints.
Feature importance: permutation importance with baseline score and per-feature mean/std.
Experiment tracking: SQLite-backed recording of training runs (dataset fingerprint, feature schema, algorithm, hyperparameters, library versions, metrics, duration, artifacts). Tools:
list_experiments,get_experiment,compare_experiments,list_models,load_model_handle.
Quickstart workflow
Using the included sample_classification.csv (target purchased):
Inspect:
inspect_datasetwith{"name": "sample_classification.csv"}Data quality:
analyze_data_qualitywith{"name": "sample_classification.csv"}Correlations:
analyze_correlationswith{"name": "sample_classification.csv", "method": "pearson"}Train & compare:
compare_modelswith{"name": "sample_classification.csv", "target_column": "purchased", "task_type": "classification", "metric": "f1"}Export:
export_modelwith{"artifact_name": "churn_model", "name": "sample_classification.csv", "target_column": "purchased", "task_type": "classification", "model_name": "random_forest"}Predict:
predictwith{"artifact_name": "churn_model", "features": {"age": 40, "income": 80000, "credit_score": 720, "category": "electronics", "region": "east"}}
A full step-by-step tutorial with copy-ready prompts is available in docs/quickstart.md.
Links
Security and privacy
All processing is local; no data leaves your machine. File access is confined to the configured workspace/artifacts directories. Path traversal is blocked, file sizes and extensions are validated, and only artifacts created by this application are loaded for prediction. No cloud hosting, no paid AI APIs, no external downloads.
License
MIT License. See LICENSE.
Available Tools
27 toolsanalyze_correlationsA
Rank numeric column pairs by correlation strength within one dataset. Use Pearson for linear association or Spearman for rank association; neither establishes causation. For changes between datasets, use analyze_feature_drift.
Inputs: name (required), top_n, method, delimiter.
analyze_data_qualityA
Check a workspace dataset for missing data, duplicates, constants and other quality issues before modeling. Returns recommendations without modifying the dataset. Use inspect_dataset for a raw row preview.
Inputs: name (required), delimiter.
analyze_feature_driftA
Compare feature distributions in a reference (baseline) and current workspace dataset, using shared columns unless a subset is supplied. Reports statistical drift flags at alpha without modifying data; use analyze_data_quality for one dataset.
Inputs: current_name (required), reference_name (required), alpha, columns, +2 more.
automl_runA
Run a fresh, synchronous cross-validation search and return ranked trials, winner and run metadata. Optionally tune the leading candidate when Optuna and budget remain. Provide a split_manifest_id to reserve its test rows. Use tune_model for one algorithm. Search returns scores and parameters without saving fitted models.
Inputs: name (required), task_type (required), target_column (required), cv, +8 more.
cancel_training_jobA
Request cancellation of a queued or running job by job_id. Running work stops cooperatively, so poll get_training_status to confirm the terminal state. A request does not undo finished work.
Inputs: job_id (required).
compare_experimentsA
Compare saved metrics for experiment IDs from list_experiments without retraining. Interpret scores only across comparable datasets, splits and metrics; use compare_models to run a new comparison on one dataset.
Inputs: experiment_ids (required).
compare_modelsA
Fit and compare candidate algorithms on a dataset using cross-validation (CV). Returns fold metrics and selects a winner by the requested metric. Provide a split_manifest_id to reserve its test rows. Records experiments when possible. Use compare_experiments for saved metrics or automl_run for hyperparameter search.
Inputs: name (required), task_type (required), target_column (required), cv, +7 more.
create_split_manifestA
Save reproducible row indices and a dataset fingerprint before training. Pass the returned ID as split_manifest_id to compatible training tools; keep test rows out of tuning. Use validate_split_manifest to check a saved split without rewriting it.
Inputs: name (required), val_size, delimiter, row_order, +8 more.
detect_potential_leakageA
Screen a workspace dataset before fitting for potential leakage, such as ID-like columns and, when target_column is supplied, predictors suspiciously related to the label. These flags need domain review; the dataset is not modified.
Inputs: name (required), delimiter, target_column.
export_modelA
Write a named local model bundle with fitted preprocessing and feature schema for predict. Supply name, target_column, task_type and model_name to train, or pass a trusted existing bundle name as model_handle to copy it. Reusing artifact_name can overwrite a saved bundle.
Inputs: artifact_name (required), name, stratify, delimiter, +8 more.
get_experimentA
Read one saved experiment's metrics and metadata by ID from list_experiments. Use compare_experiments for several runs; this does not fit or load a model.
Inputs: experiment_id (required).
get_model_leaderboardA
Run fresh cross-validation and return ranked trials plus the winner's model ID, parameters and score. Pass models to restrict candidates. Use automl_run for full run metadata or list_experiments to find saved training records. Use export_model to fit and save a model bundle.
Inputs: name (required), task_type (required), target_column (required), cv, +8 more.
get_training_statusA
Poll a job_id from start_training_job or list_training_jobs for state and any available result or error. Job IDs are process-local.
Inputs: job_id (required).
inspect_datasetA
Profile a named workspace dataset: shape, column types, missingness, summaries and a bounded preview that includes raw values. Use analyze_data_quality for remediation recommendations. CSV is built in; Parquet and Excel readers need optional packages.
Inputs: name (required), max_rows, delimiter.
list_datasetsA
Discover dataset filenames, formats and sizes in the configured workspace without reading rows. Lists CSV, Parquet and Excel files; use inspect_dataset to profile one.
Inputs: no named parameters.
list_experimentsA
Browse recent persisted experiment records, newest first, to find IDs for get_experiment or compare_experiments. Use list_training_jobs for in-process jobs.
Inputs: limit.
list_modelsC
Find experiment records that reference model artifacts and their identifiers. Use load_model_handle to confirm a bundle is available and read its schema.
Inputs: no named parameters.
list_split_manifestsA
Find stored split manifest IDs and metadata, newest first. Use validate_split_manifest to check an ID against the current dataset.
Inputs: no named parameters.
list_training_jobsA
Discover recent jobs in this server process, newest first. Use get_training_status for one job's result or list_experiments for persistent run history.
Inputs: limit.
load_model_handleA
Inspect feature schema, metrics and metadata from a trusted saved model bundle. Supply an artifact_name or an experiment_id with a tracked artifact. This loads the bundle but does not score rows; use predict for inference.
Inputs: artifact_name, experiment_id.
predictA
Score a feature object or array of feature objects with a trusted local model bundle, without fitting. Match feature keys to the stored schema; use load_model_handle to inspect it. Never load artifacts from untrusted sources.
Inputs: features (required), artifact_name (required).
prepare_datasetA
Split a named dataset for classification or regression and fit preprocessing on training rows only. Saves a preprocessing artifact and returns its handle and schema. Training tools fit their own preprocessing.
Inputs: name (required), task_type (required), target_column (required), stratify, +4 more.
start_training_jobA
Queue one named model fit and return a job_id without waiting for training. Supply a dataset, target and task, then poll get_training_status for results. Use train_baseline when you want the metrics in the same call.
Inputs: name (required), task_type (required), model_name (required), target_column (required), +6 more.
system_infoA
Check the server's CPU, RAM, storage and detected GPUs before a costly run. This does not train or enable GPU acceleration.
Inputs: no named parameters.
train_baselineA
Fit one named model and return evaluation metrics and feature metadata. Supply a dataset, target and task. Use start_training_job for background evaluation or export_model to fit and save a reusable bundle.
Inputs: name (required), task_type (required), model_name (required), target_column (required), +6 more.
tune_modelA
Score one model by cross-validation, then search its hyperparameters if Optuna is installed and budget remains. Without Optuna, only the baseline is scored. Returns scores and parameters. Use automl_run to search across model families.
Inputs: name (required), task_type (required), model_name (required), target_column (required), +8 more.
validate_split_manifestA
Check a saved manifest against the named workspace dataset before reuse. Returns valid and any errors for fingerprint or split mismatches; does not repair the file. Find IDs with list_split_manifests.
Inputs: name (required), manifest_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Most tools have distinct roles and descriptions actively cross-reference siblings (e.g. inspect_dataset vs analyze_data_quality, list_experiments vs list_training_jobs). However several fit-and-score tools are near-duplicates: automl_run, get_model_leaderboard, compare_models, tune_model and train_baseline all fit models on a dataset and return metrics, and automl_run vs get_model_leaderboard are especially hard to tell apart (both return ranked CV trials plus a winner). An agent can usually reason it out from descriptions, but the boundaries are genuinely blurry.
The dominant pattern is verb_noun in snake_case (list_datasets, inspect_dataset, create_split_manifest, export_model, cancel_training_job), applied consistently across most of the surface. The notable outlier is automl_run, which inverts to noun_verb and stands out against the rest of the set.
At 27 tools the surface is heavy, though the domain genuinely spans dataset profiling, quality/leakage/drift analysis, split manifests, training, tuning, experiment history, job management and inference. The count is inflated by redundant fitting paths (train_baseline/start_training_job/compare_models/tune_model/automl_run/get_model_leaderboard) that could be consolidated.
Coverage of the ML lifecycle is strong end to end: discovery, profiling, quality and leakage screening, splits, training (sync and async), tuning, experiment comparison, bundle export, load-handle inspection and prediction. Gaps are minor — no dataset write/delete or model artifact deletion, and no way to enumerate supported algorithms or feature-importance results outside experiment metadata.
Maintenance
Related MCP Connectors
Train AutoML models on CSV files and run predictions from Claude and other MCP clients.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Use your own trained text and picture classification models from any AI assistant.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with local CSV and Parquet data files through natural language queries, facilitating tasks like summarizing datasets or retrieving specific information.4-
- FlicenseAqualityDmaintenanceEnables exploratory data analysis and machine learning on CSV datasets with tools for profiling, missing values, correlation, plotting, model training, and prediction.8-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to perform data analysis on local datasets through natural language, orchestrating Python, R, SQL, Spark, Jupyter, Power BI, and Tableau engines for statistics, machine learning, dashboard generation, and batch processing.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to analyze large CSV files locally by importing them into SQLite, profiling columns, and running read-only SQL queries without data leaving the machine.MIT