DevRay DataLab MCP

v0.3.4
io.github.rayklanderman/devray-datalab-mcp Checked 3 hours ago Published 13 days ago

Local-first data science and machine learning MCP server

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_datasets

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.

list_split_manifests

Find stored split manifest IDs and metadata, newest first. Use validate_split_manifest to check an ID against the current dataset.

create_split_manifest

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.

ParameterTypeDescription
name *stringDataset filename.
delimiterstringCSV delimiter (comma, semi, tab, pipe). Auto.
group_columnstringColumn to group splits by (groups stay together).
protected_holdoutbooleanKeep test set as protected holdout (default true).
random_stateintegerRandom seed for reproducibility (default 42).
row_orderbooleanSplit chronologically by original row order.
split_typestringrandom (default), stratified (pass stratify_column), group (requires group_column), or time (requires time_column or row_order=true). grouped and time_series are aliases.
stratify_columnstringColumn to stratify splits by.
task_typestring'classification' or 'regression' (default classification).
test_sizenumberFraction of data for test holdout (default 0.2).
time_columnstringColumn for time-based splitting.
val_sizenumberValidation fraction (default 0); test_size + val_size < 1.

validate_split_manifest

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.

ParameterTypeDescription
manifest_id *stringID of the split manifest to validate.
name *stringDataset filename.

inspect_dataset

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.

ParameterTypeDescription
name *stringDataset filename.
delimiterstringCSV delimiter (comma, semi, tab, pipe). Auto.
max_rowsintegerPreview row count, 1–100. Omit for the server default (25).

analyze_correlations

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.

ParameterTypeDescription
name *stringDataset filename.
delimiterstringCSV delimiter (comma, semi, tab, pipe). Auto.
methodstring'pearson' or 'spearman' (default pearson).
top_nintegerNumber of strongest pairs, clamped to 1–50 (default 10).

analyze_data_quality

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.

ParameterTypeDescription
name *stringDataset filename.
delimiterstringCSV delimiter (comma, semi, tab, pipe). Auto.

detect_potential_leakage

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.

ParameterTypeDescription
name *stringDataset filename.
delimiterstringCSV delimiter (comma, semi, tab, pipe). Auto.
target_columnstringTarget variable column (optional).

analyze_feature_drift

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.

ParameterTypeDescription
current_name *stringCurrent dataset filename.
reference_name *stringReference dataset filename.
alphanumberSignificance level (default 0.05).
columnsarrayColumns to check (default all common).
cur_delimiterstringCurrent CSV delimiter (comma, semi, tab, pipe).
ref_delimiterstringReference CSV delimiter (comma, semi, tab, pipe).

prepare_dataset

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.

ParameterTypeDescription
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
delimiterstringCSV delimiter (comma, semicolon, tab, pipe). Auto.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
random_stateintegerRandom seed (default 42).
stratifybooleanStratify split (classification only, default true).
test_sizenumberTest fraction (default 0.2).

train_baseline

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.

ParameterTypeDescription
model_name *stringModel to train.
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
delimiterstringCSV delimiter (comma, semicolon, tab, pipe). Auto.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.
stratifybooleanStratify split (classification only, default true).
test_sizenumberTest fraction (default 0.2).

compare_models

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.

ParameterTypeDescription
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
cvintegerCross-validation folds (default 5).
delimiterstringCSV delimiter (comma, semicolon, tab, pipe). Auto.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
metricstringSelection metric (default auto).
modelsarrayModels to compare.
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.
test_sizenumberTest fraction (default 0.2).

export_model

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.

ParameterTypeDescription
artifact_name *stringName for the saved artifact.
delimiterstringCSV delimiter (comma, semicolon, tab, pipe). Auto.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
model_handlestringName of a trusted model bundle already saved as an artifact.
model_namestringModel to train and export.
namestringDataset filename (to train and export).
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.
stratifybooleanStratify split (classification only).
target_columnstringTarget variable column.
task_typestring'classification' or 'regression'.
test_sizenumberTest fraction (default 0.2).

predict

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.

ParameterTypeDescription
artifact_name *stringName of the exported model artifact.
features *One feature-name/value object or a list of them.

system_info

Check the server's CPU, RAM, storage and detected GPUs before a costly run. This does not train or enable GPU acceleration.

list_experiments

Browse recent persisted experiment records, newest first, to find IDs for get_experiment or compare_experiments. Use list_training_jobs for in-process jobs.

ParameterTypeDescription
limitintegerMax experiments to return (default 50).

get_experiment

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.

ParameterTypeDescription
experiment_id *stringExperiment ID.

compare_experiments

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.

ParameterTypeDescription
experiment_ids *arrayList of experiment IDs.

list_models

Find experiment records that reference model artifacts and their identifiers. Use load_model_handle to confirm a bundle is available and read its schema.

load_model_handle

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.

ParameterTypeDescription
artifact_namestringModel artifact name.
experiment_idstringExperiment ID.

start_training_job

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.

ParameterTypeDescription
model_name *stringModel to train.
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
delimiterstringCSV delimiter (comma, semicolon, tab, pipe). Auto.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.
stratifybooleanStratify split (classification only, default true).
test_sizenumberTest fraction (default 0.2).

get_training_status

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.

ParameterTypeDescription
job_id *stringTraining job id.

cancel_training_job

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.

ParameterTypeDescription
job_id *stringTraining job id.

list_training_jobs

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.

ParameterTypeDescription
limitintegerMax jobs to return (default 50).

automl_run

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.

ParameterTypeDescription
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
cvintegerCross-validation folds (default 3).
delimiterstringCSV delimiter character: comma (,), semicolon (;), tab (\t) or pipe (|). Omit to detect it automatically.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
max_time_secondsintegerShared candidate and tuning time budget in seconds (default 600). A trial already in progress may finish after the deadline.
max_trialsintegerTotal candidate and tuning trials, 1–50 (default 10).
metricstringSelection metric. auto (default) uses roc_auc for binary classification, f1 for multiclass classification or r2 for regression. Loss metrics rank lowest first.
modelsarrayOrdered task-specific model IDs. Omit for defaults. Both tasks support decision_tree, random_forest, extra_trees, hist_gradient_boosting, svm, knn. Classification also has logistic_regression; regress…
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.

tune_model

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.

ParameterTypeDescription
model_name *stringModel to tune.
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
cvintegerCross-validation folds (default 3).
delimiterstringCSV delimiter character: comma (,), semicolon (;), tab (\t) or pipe (|). Omit to detect it automatically.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
max_time_secondsintegerShared candidate and tuning time budget in seconds (default 600). A trial already in progress may finish after the deadline.
max_trialsintegerTotal trials including the baseline, 1–50 (default 20).
metricstringSelection metric. auto (default) uses roc_auc for binary classification, f1 for multiclass classification or r2 for regression. Loss metrics rank lowest first.
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.

get_model_leaderboard

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.

ParameterTypeDescription
name *stringDataset filename.
target_column *stringTarget variable column.
task_type *string'classification' or 'regression'.
cvintegerCross-validation folds (default 3).
delimiterstringCSV delimiter character: comma (,), semicolon (;), tab (\t) or pipe (|). Omit to detect it automatically.
exclude_columnsarrayFeature columns to exclude before preprocessing/training.
max_time_secondsintegerShared candidate and tuning time budget in seconds (default 600). A trial already in progress may finish after the deadline.
max_trialsintegerTotal candidate and tuning trials, 1–50 (default 10).
metricstringSelection metric. auto (default) uses roc_auc for binary classification, f1 for multiclass classification or r2 for regression. Loss metrics rank lowest first.
modelsarrayOrdered task-specific model IDs. Omit for defaults. Both tasks support decision_tree, random_forest, extra_trees, hist_gradient_boosting, svm, knn. Classification also has logistic_regression; regress…
random_stateintegerRandom seed (default 42).
split_manifest_idstringID of a validated split manifest to enforce indices.