Add your description here
Project description
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
uvfrom 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
mcpServerssection, and replace the placeholder paths with the absolute paths to youruvinstallation 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!
👀
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_heetvekariya_linear_regression_mcp-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_heetvekariya_linear_regression_mcp-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7ab0588a61944df909ef0fd803a28acfc018347c72cc975950a3465168394a
|
|
| MD5 |
7b0249567d8bd319ccbd0bdfca98c24a
|
|
| BLAKE2b-256 |
4f4bfd7b20e5be088544ca39280660fd5a7c7034a36d4e7d739a89602fb75ec8
|
File details
Details for the file iflow_mcp_heetvekariya_linear_regression_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_heetvekariya_linear_regression_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235dcdef229b95cfc09f8f68209682adeb4a0a3335e70ada75465bc27d5f9030
|
|
| MD5 |
76d2f363e8a7726bdc270f23dc1c918e
|
|
| BLAKE2b-256 |
ddc0b0f419252ec8201accc2c698a792c09106abe0796ce36678c891acbffe31
|