
Linear Regression MCP
An MCP server that enables Claude to train a linear regression model by simply uploading a CSV file, handling the entire ML pipeline from data preprocessing to model evaluation.
Tools
check_category_columns
This function check if data has categorical columns. Returns: String which contains list of categorical columns.
label_encode_categorical_columns
This function label encodes all the categorical columns. Returns: String which confirms success of encoding process.
train_linear_regression_model
This function trains linear regression model. Args: Takes input for output column name. Returns: String which contains the RMSE value.
upload_file
This function read the csv data and stores it in the class variable. Args: Absolute path to the .csv file. Returns: String which shows the shape of the data.
get_columns_info
This function gives information about columns. Returns: String which contains column names.
README
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).
<br>
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 youruv
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.
<br>
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!
<h3 align="center">👀</h3> <p align="center"> <a href="https://github.com/HeetVekariya" target="_blank"> <img alt="Github" src="https://img.shields.io/badge/GitHub-%2312100E.svg?&style=for-the-badge&logo=Github&logoColor=white" /> </a> <a href="https://twitter.com/heet_2104" target="_blank"> <img alt="Twitter" src="https://img.shields.io/badge/twitter-%231DA1F2.svg?&style=for-the-badge&logo=twitter&logoColor=white" /> </a> <a href="https://www.linkedin.com/in/heet-vekariya-16326024b" target="_blank"> <img alt="LinkedIn" src="https://img.shields.io/badge/linkedin-%230077B5.svg?&style=for-the-badge&logo=linkedin&logoColor=white" /> </a> <a href="https://medium.com/@heetvekariya50" target="_blank"> <img alt="Medium" src="https://img.shields.io/badge/medium-%2312100E.svg?&style=for-the-badge&logo=medium&logoColor=white" /> </a> <a href="https://dev.to/heetvekariya" target="_blank"> <img alt="Dev.to" src="https://img.shields.io/badge/devto-%2312100E.svg?&style=for-the-badge&logo=devto&logoColor=white" /> </a> <a href="mailto:heetvekariya50@gmail.com" target="_blank"> <img alt="Dev.to" src="https://img.shields.io/badge/gmail-%2312100E.svg?&style=for-the-badge&logo=gmail&logoColor=white" /> </a> </p>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.