线性回归 MCP
欢迎来到线性回归 MCP !该项目演示了使用 Claude 和模型上下文协议 (MCP) 的端到端机器学习工作流程。
只需上传包含数据集的 CSV 文件, Claude即可自行训练线性回归模型。该系统涵盖整个机器学习模型训练生命周期,包括数据预处理、训练和评估(RMSE 计算)。
设置和安装
1.克隆存储库:
首先,将存储库克隆到本地机器:
2.安装uv
:
uv
是一个极快的 Python 包和项目管理器,用 Rust 编写。它对于管理本项目的服务器和依赖项至关重要。
- 从这里下载并安装
uv
。
3.安装依赖项:
安装 uv 后,运行以下命令安装所有必要的依赖项:
4.配置Claude桌面:
要将服务器与 Claude Desktop 集成,您需要修改 Claude 配置文件。请按照您的操作系统的说明进行操作:
- 对于 macOS 或 Linux:
- 对于 Windows:
- 在配置文件中,找到
mcpServers
部分,并将占位符路径替换为uv
安装目录和线性回归项目目录的绝对路径。如下所示:
- 保存文件后,重新启动 Claude Desktop 以链接 MCP 服务器。
可用工具
该项目提供以下工具来帮助您处理数据集和训练模型:
工具 | 描述 | 参数 |
---|---|---|
upload_file(path) | 上传 CSV 文件并将其存储以供处理。 | path :CSV 文件的绝对路径。 |
get_columns_info() | 检索已上传数据集中的列名。 | 没有争论。 |
check_category_columns() | 检查数据集中的任何分类列。 | 没有争论。 |
label_encode_categorical_columns() | 标签将分类列编码为数值。 | 没有争论。 |
train_linear_regression_model(output_column) | 训练线性回归模型并计算 RMSE。 | output_column :目标列的名称。 |
开放贡献
欢迎大家为这个项目做出贡献!无论是修复错误、添加新功能,还是改进文档,欢迎随时 fork 代码库并提交 Pull 请求。
如果您有任何建议或功能请求,请提出问题,我很乐意讨论它们!
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
MCP 服务器使 Claude 能够通过简单上传 CSV 文件来训练线性回归模型,处理从数据预处理到模型评估的整个 ML 管道。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -235TypeScript
Fused MCP Agentsofficial
-securityAlicense-qualityA Python-based MCP server that allows Claude and other LLMs to execute arbitrary Python code directly through your desktop Claude app, enabling data scientists to connect LLMs to APIs and executable code.Last updated -26MIT License- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude to load CSV files and execute JavaScript data analysis scripts for advanced data exploration and insights generation.Last updated -27PythonMIT License
- -securityFlicense-qualityAn MCP server that allows Claude to interact with local LLMs running in LM Studio, providing access to list models, generate text, and use chat completions through local models.Last updated -8Python