Cover image
Try Now
2025-04-02

用于训练线性回归模型的MCP服务器。

3 years

Works with Finder

1

Github Watches

3

Github Forks

8

Github Stars

Linear Regression MCP

Welcome to Linear Regression MCP! This project demonstrates an end-to-end machine learning workflow using Claude and the Model Context Protocol (MCP).

Claude can train a Linear Regression model entirely by itself, simply by uploading a CSV file containing the dataset. The system goes through the entire ML model training lifecycle, handling data preprocessing, training, and evaluation (RMSE calculation).


Setup and Installation

1. Clone the Repository:

First, clone the repository to your local machine:

git clone https://github.com/HeetVekariya/Linear-Regression-MCP
cd Linear-Regression-MCP

2. Install uv:

uv is an extremely fast Python package and project manager, written in Rust. It is essential for managing the server and dependencies in this project.

  • Download and install uv from here.

3. Install Dependencies:

Once uv is installed, run the following command to install all necessary dependencies:

uv sync

4. Configure Claude Desktop:

To integrate the server with Claude Desktop, you will need to modify the Claude configuration file. Follow the instructions for your operating system:

  • For macOS or Linux:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • For Windows:
code $env:AppData\Claude\claude_desktop_config.json
  • In the configuration file, locate the mcpServers section, and replace the placeholder paths with the absolute paths to your uv installation and the Linear Regression project directory. It should look like this:
{
    "mcpServers":
    {
        "linear-regression": 
        {
            "command": "ABSOLUTE/PATH/TO/.local/bin/uv",
            "args":
            [
                "--directory",
                "ABSOLUTE/PATH/TO/YOUR-LINEAR-REGRESSION-REPO", 
                "run",
                "server.py"
            ] 
        }
    }
}
  • Once the file is saved, restart Claude Desktop to link with the MCP server.

Available Tools

The following tools are available in this project to help you work with the dataset and train the model:

Tool Description Arguments
upload_file(path) Uploads a CSV file and stores it for processing. path: Absolute path to the CSV file.
get_columns_info() Retrieves the column names in the uploaded dataset. No arguments.
check_category_columns() Checks for any categorical columns in the dataset. No arguments.
label_encode_categorical_columns() Label encodes categorical columns into numerical values. No arguments.
train_linear_regression_model(output_column) Trains a linear regression model and calculates RMSE. output_column: The name of the target column.

Open for Contributions

I welcome contributions to this project! Whether it's fixing bugs, adding new features, or improving the documentation, feel free to fork the repository and submit pull requests.

If you have any suggestions or feature requests, open an issue, and I'll be happy to discuss them!

👀

Github Twitter LinkedIn Medium Dev.to Dev.to

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    1 (1)
    Avatar
    user_FNg5yZde
    2025-04-16

    I've been using the Linear-Regression-MCP by HeetVekariya, and it's fantastic! The GitHub repository (https://github.com/HeetVekariya/Linear-Regression-MCP) is well-organized and the implementation in Python is clear and efficient. This tool has greatly simplified my regression analysis tasks and the documentation is superb, making it easy to get started quickly. Highly recommend it for anyone needing a reliable linear regression solution!