Linear Regression MCP
Train a Linear Regression model by uploading a CSV dataset file, demonstrating an end-to-end machine learning workflow.
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!
👀
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
TeamCity MCP Server
MCP server for JetBrains TeamCity with 87 tools for builds, tests, agents, and CI/CD pipeline management.
TradesAPI
Real-time contractor license verification across 45 US states. Verifies license status, expiration, and disciplinary history directly against state licensing board portals.
Remote MCP Server (Authless)
An example of a remote MCP server without authentication, deployable on Cloudflare Workers.
GameCode MCP2
A Model Context Protocol (MCP) server for tool integration, configured using a tools.yaml file.
NestJS MCP Server Module
A NestJS module for building MCP servers to expose tools and resources for AI, with support for multiple transport types.
llm-advisor-mcp
Real-time LLM/VLM model comparison with benchmarks, pricing, and personalized recommendations from 5 data sources. No API key required.
VULK MCP Server
Build, edit, and deploy full-stack web applications from any AI assistant. 9 MCP tools with real AI generation via SSE streaming.
mcpproxy-go
Open-source local MCP proxy server. Routes multiple MCP servers through a single endpoint with BM25 tool filtering, quarantine security, activity logging, and web UI.
Remote MCP Server (Authless)
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
Scorecard
Access Scorecard's AI model evaluation and testing tools via a Cloudflare Workers deployment.
