- Home
- MCP servers
- Linear Regression
Linear Regression
- python
11
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"heetvekariya-linear-regression-mcp": {
"command": "uv",
"args": [
"--directory",
"ABSOLUTE/PATH/TO/YOUR-LINEAR-REGRESSION-REPO",
"run",
"server.py"
]
}
}
}You can run an MCP server that orchestrates a complete linear regression workflow using a CSV dataset. It handles data preprocessing, model training, and evaluation (RMSE) through a streamlined, textarea-friendly interface that connects to Claude-like clients via MCP. This server enables you to upload your data, train a model, and retrieve evaluation metrics in a repeatable, programmable way.
How to use
To use the Linear Regression MCP server, connect with an MCP client and follow these practical steps. First, prepare a CSV file containing your dataset. Upload it and let the server extract columns, detect categorical data, and prepare the numeric features. Then train a linear regression model by selecting your target column. The server will compute RMSE on the validation set and provide you with the evaluation results.
How to install
Prerequisites: you need Python, a modern shell, and the uv project manager available on your system.
# 1) Clone the project repository
git clone https://github.com/HeetVekariya/Linear-Regression-MCP
cd Linear-Regression-MCP
# 2) Install uv (Rust-based project manager)
# Follow the installer for your platform and ensure `uv` is on your PATH
# 3) Install dependencies with uv
uv sync
Configure the MCP server integration in your Claude Desktop configuration. Add or modify the MCP server entry so it points to the local Linear Regression project, using the runtime command shown below.
{
"mcpServers":
{
"linear-regression":
{
"command": "ABSOLUTE/PATH/TO/.local/bin/uv",
"args":
[
"--directory",
"ABSOLUTE/PATH/TO/YOUR-LINEAR-REGRESSION-REPO",
"run",
"server.py"
]
}
}
}
Additional configuration notes
The server exposes a simple, practical workflow through MCP. You can upload a CSV via the provided tool, inspect the dataset columns, encode any categorical features, train the model by specifying the target column, and receive the RMSE value as feedback. The configuration example above shows how to launch the local MCP server with uv and your project directory.
Troubleshooting and tips
If you encounter issues starting the server, verify that uv is correctly installed and accessible from your shell. Ensure the absolute paths in the configuration are correct and that the server.py script exists in your Linear Regression repository. Check that the target column you specify for training exists in your dataset and is properly named.
Security and maintenance
Keep dependencies up to date and restrict access to the local MCP instance to trusted clients. Regularly validate uploaded CSVs for unexpected formats and handle missing values in preprocessing before training.
Available tools
upload_file
Uploads a CSV file and stores it for processing.
get_columns_info
Retrieves the column names in the uploaded dataset.
check_category_columns
Checks for any categorical columns in the dataset.
label_encode_categorical_columns
Label encodes categorical columns into numerical values.
train_linear_regression_model
Trains a linear regression model and calculates RMSE.