Linear Regression MCP
Линейная регрессия МКП
Добро пожаловать в Linear Regression MCP ! Этот проект демонстрирует сквозной рабочий процесс машинного обучения с использованием Claude и Model Context Protocol (MCP).
Клод может обучить модель линейной регрессии полностью самостоятельно, просто загрузив CSV-файл, содержащий набор данных. Система проходит весь жизненный цикл обучения модели ML , обрабатывая предварительную обработку данных, обучение и оценку (вычисление RMSE).
Настройка и установка
1. Клонируйте репозиторий:
Сначала клонируйте репозиторий на локальную машину:
git clone https://github.com/HeetVekariya/Linear-Regression-MCP
cd Linear-Regression-MCP2. Установить uv :
uv — чрезвычайно быстрый пакет Python и менеджер проектов, написанный на Rust. Он необходим для управления сервером и зависимостями в этом проекте.
Загрузите и установите
uvотсюда .
3. Установите зависимости:
После установки uv выполните следующую команду, чтобы установить все необходимые зависимости:
uv sync4. Настройте Claude Desktop:
Для интеграции сервера с Claude Desktop вам необходимо изменить файл конфигурации Claude. Следуйте инструкциям для вашей операционной системы:
Для macOS или Linux:
code ~/Library/Application\ Support/Claude/claude_desktop_config.jsonДля Windows:
code $env:AppData\Claude\claude_desktop_config.jsonВ файле конфигурации найдите раздел
mcpServersи замените пути-заполнители на абсолютные пути к вашей установкеuvи каталогу проекта Linear Regression. Это должно выглядеть так:
{
"mcpServers":
{
"linear-regression":
{
"command": "ABSOLUTE/PATH/TO/.local/bin/uv",
"args":
[
"--directory",
"ABSOLUTE/PATH/TO/YOUR-LINEAR-REGRESSION-REPO",
"run",
"server.py"
]
}
}
}После сохранения файла перезапустите Claude Desktop, чтобы подключиться к серверу MCP.
Related MCP server: MCP File Explorer
Доступные инструменты
В этом проекте доступны следующие инструменты, которые помогут вам работать с набором данных и обучать модель:
Инструмент | Описание | Аргументы |
| Загружает CSV-файл и сохраняет его для обработки. |
|
| Извлекает имена столбцов в загруженном наборе данных. | Никаких аргументов. |
| Проверяет наличие категориальных столбцов в наборе данных. | Никаких аргументов. |
| Метка кодирует категориальные столбцы в числовые значения. | Никаких аргументов. |
| Обучает модель линейной регрессии и вычисляет среднеквадратичную ошибку (RMSE). |
|
Открыт для взносов
Я приветствую вклад в этот проект! Будь то исправление ошибок, добавление новых функций или улучшение документации, не стесняйтесь создавать ответвления репозитория и отправлять запросы на извлечение.
Если у вас есть предложения или пожелания по функциям, создайте тему, и я с удовольствием их обсужу!
Available Tools
5 toolscheck_category_columnsC
This function check if data has categorical columns.
Returns: String which contains list of categorical columns.
Inputs: no named parameters.
get_columns_infoC
This function gives information about columns.
Returns: String which contains column names.
Inputs: no named parameters.
label_encode_categorical_columnsC
This function label encodes all the categorical columns.
Returns: String which confirms success of encoding process.
Inputs: no named parameters.
train_linear_regression_modelC
This function trains linear regression model.
Args: Takes input for output column name.
Returns: String which contains the RMSE value.
Inputs: output_column (required).
upload_fileC
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.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have distinct purposes: checking categorical columns, getting column info, label encoding, training a model, and uploading a file. However, 'check_category_columns' and 'get_columns_info' could be slightly confused as both provide column-related information, but their specific focuses (categorical vs. general) help differentiate them.
The tools use a consistent snake_case format, which is good. However, the naming pattern is mixed: some are verb_noun (e.g., 'upload_file', 'train_linear_regression_model'), while others are noun_verb (e.g., 'check_category_columns', 'get_columns_info', 'label_encode_categorical_columns'). This inconsistency in verb placement reduces predictability.
With 5 tools, the count is reasonable for a linear regression server, covering data upload, inspection, preprocessing, and model training. It's slightly thin as it lacks tools for prediction, model evaluation beyond RMSE, or data splitting, but it's well-scoped for basic workflows.
The toolset covers core steps: data upload, column analysis, encoding, and model training. However, there are notable gaps: no tools for making predictions with the trained model, evaluating model performance beyond RMSE (e.g., R-squared), splitting data into train/test sets, or handling missing values. This limits end-to-end workflow coverage.
Maintenance
Related MCP Connectors
Train AutoML models on CSV files and run predictions from Claude and other MCP clients.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that provides data visualization and machine learning tools, featuring automated intent-based pipeline routing for data cleaning and model training. It enables LLMs to process CSV or JSON data to generate visual charts, perform regressions, or execute clustering analysis.16-
- AlicenseNot gradedqualityDmaintenanceA beginner MCP server that enables Claude to read local text, CSV, and Markdown files. Built as a learning project to understand how to connect AI to local file systems using the MCP protocol.ISC
- FlicenseAqualityDmaintenanceAn MCP server for dataset exploration and analysis, enabling LLM clients to perform summary, correlation, distribution, missing value analysis, data cleaning, and statistical tests directly on CSV files.3-
- AlicenseNot gradedqualityBmaintenanceAn MCP server wrapping AutoGluon's AutoML capabilities, enabling data loading, model training, prediction, evaluation, and model management.Apache 2.0