Mcp Ml Lab

io.github.rohithraju-ops由 GitHub 账号 rohithraju-ops 发布v0.1.0更新于 Oct 24, 2026

Run end-to-end ML experiments from natural language (XGBoost, LightGBM, Optuna).

已验证STDIO仅桌面数据与分析AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,让助手剖析 CSV、定义机器学习任务、训练并调优 XGBoost/LightGBM 模型并生成报告。

可以做什么
  • 剖析 CSV:形状、数据类型、空值、统计摘要与类别均衡
  • 根据 CSV、目标列和分类或回归类型注册机器学习任务
  • 训练一个或多个模型,可选使用 Optuna 调参
  • 生成包含指标、超参数和特征重要性的 Markdown 报告
  • 并排比较多次历史实验
适用场景
适合希望助手用自然语言真正跑表格数据机器学习实验的场景,例如剖析数据集、比较 XGBoost 与 LightGBM、用 Optuna 调参,或回顾之前的运行结果,而不只是浏览实验历史。
运行要求
以本地进程通过 stdio 运行,从 PyPI 安装(pip install mcp-ml-lab),需要 Python;在客户端的 MCP 配置中加入 mcp-ml-lab 命令并重启。未声明认证、环境变量或请求头。实验记录保存在用户主目录下的本地 SQLite 文件中。
安装前请注意
训练与调参在本机执行,并把实验记录写入本地 SQLite 存储,因此运行结果会跨会话保留;较长时间的 Optuna 调参会占用较多算力。助手会读取你指定的 CSV 文件,敏感数据集请勿纳入范围。不涉及凭据或付费。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Ml Lab,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-ml-lab

Let AI agents run real ML experiments end-to-end.

[PyPI] [Python] [License]

An MCP server that gives Claude (or any MCP-aware AI agent) the ability to profile a CSV, define an ML task, tune XGBoost and LightGBM with Optuna, and produce a markdown report with feature importance — all from natural language.

Why this exists

The existing ML-related MCP servers wrap MLflow, ZenML, or Weights & Biases and expose them as read-only — agents can browse experiment history but can't actually run anything. mcp-ml-lab fills the gap: it lets agents execute the full experimentation loop from a user's natural-language request.

A user typing "train a model on titanic.csv to predict survival" should not need to know what XGBoost is, what cross-validation is, or how to write a hyperparameter search. The agent handles all of that — mcp-ml-lab is the tools layer that makes it possible.

Quick start

bash
pip install mcp-ml-lab

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "ml-lab": {      "command": "mcp-ml-lab"    }  }}

Restart Claude Desktop. The five tools below are now available.

Example queries

Try these in Claude Desktop with mcp-ml-lab connected:

  • "Profile this CSV and tell me if there's class imbalance"
  • "Compare XGBoost and LightGBM on titanic.csv with 60 seconds of tuning"
  • "Show me the top 10 features the winning model used"
  • "How did my last three experiments on the wine dataset compare?"

Tools

ToolWhat it does
inspect_dataProfile a CSV — shape, dtypes, nulls, summary stats, class balance
define_taskRegister an ML task (CSV + target + classification/regression)
run_experimentTrain one or more models, optionally tuning with Optuna
get_resultsMarkdown report with metrics, hyperparameters, feature importance
compare_runsSide-by-side comparison of multiple experiments

Each tool's full signature is in its docstring; they self-document to the LLM.

How it works

Claude Desktop  ───MCP/stdio───  mcp-ml-lab server                                  │                                  ├── data.py        CSV loading, schema inference, preprocessor                                  ├── trainers/      Pluggable XGBoost + LightGBM adapters                                  ├── search.py      Stratified CV + Optuna TPE tuning                                  ├── metrics.py     Accuracy, F1, AUC, log loss                                  ├── storage.py     SQLite via SQLAlchemy 2.0                                  └── reporting.py   Markdown report generation

All experiments and trials are persisted to ~/.mcp-ml-lab/store.db so an agent can refer back to runs across sessions.

Full design notes in ARCHITECTURE.md.

Roadmap

v0.1.0 ships classification with XGBoost and LightGBM. Planned for v0.2.0+:

  • Regression tasks
  • Time series forecasting (sktime / darts integration)
  • Deep learning baselines (pytorch-tabular)
  • Optuna multi-objective search (accuracy × latency × model size)
  • Persisted model artifacts with Docker reproducibility
  • Permutation feature importance (bias-free alternative to gain importance)
  • Notebook export — emit a Jupyter notebook that reproduces the winning run

Issues and PRs welcome.

Development

bash
git clone https://github.com/rohithraju-ops/mcp-ml-lab.gitcd mcp-ml-labpython -m venv .venv && source .venv/bin/activatepip install -e ".[dev]"pytest -v

Local debugging is easiest with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector mcp-ml-lab

License

MIT.

来源:README.md,提交 486c204

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分