Linear Regression
    Linear Regression

    Linear Regression

    MCP server for training Linear Regression Model.

    4.3

    GitHub Stats

    Stars

    10

    Forks

    4

    Release Date

    6/11/2025

    about three weeks ago

    Detailed Description

    mseep.ai security assessment badge

    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).

    verified on mseep

    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!

    About the Project

    Owners:

    Heet VekariyaHeet Vekariya

    Receive Updates

    Security Updates

    Get notified about trust rating changes

    to receive email notifications.