AU

AutoML MCP Server for Model Selection and Tuning

Automate model selection and hyperparameter tuning with an MCP server that delivers data analysis, preprocessing, and optimized AutoML workflows.

Quick Install
npx -y @emircansoftware/MCP_Server_DataScience

Overview

AutoML MCP Server for Model Selection and Tuning is an MCP (Model Context Protocol) compatible microservice that automates common end-to-end tasks for tabular machine learning projects: dataset inspection, preprocessing, model selection and hyperparameter tuning. It exposes a set of MCP tools so external clients (MCP-aware UIs or agents) can call individual capabilities — e.g., read a CSV, run feature preprocessing, compare candidate models, or run a tuning experiment — without embedding the AutoML logic into the client.

This server is useful for data scientists and developers who want to standardize and automate repetitive workflows (EDA → preprocessing → model selection → optimization) and integrate those steps into toolchains or conversational agents. The project is lightweight, built on familiar Python ML libraries, and intended to be run locally or inside a development environment that supports MCP servers.

Repository: https://github.com/emircansoftware/MCP_Server_DataScience

Features

  • Data exploration and diagnostics
    • dataset summary (shape, dtypes, missing values, memory usage)
    • visual correlation matrices, outlier detection
    • CSV loading with pandas/pyarrow support
  • Automated preprocessing
    • missing value handling, categorical encoding, numeric scaling
    • duplicate detection and basic data validation
    • transformations tailored for regression and classification
  • Model selection and evaluation
    • built-in comparisons across multiple algorithms
    • standardized metrics (R², MAE, MSE for regression; accuracy, F1 for classification)
    • confusion matrix and side-by-side model comparison visualization
  • Hyperparameter tuning
    • automated search and trial control
    • configurable scoring functions and trial budgets
  • Extensible MCP endpoints
    • discrete tools (functions) exposed as MCP actions so external controllers can orchestrate workflows

Installation / Configuration

Prerequisites:

  • Python 3.8+
  • pip

Clone and install:

git clone https://github.com/emircansoftware/MCP_Server_DataScience.git
cd MCP_Server_DataScience
pip install -r requirements.txt

Run the MCP server (examples):

  • Using the included main entrypoint:
python main.py
  • Or run the server module directly (if server exposes an mcp object):
# server.py defines `mcp`
from server import mcp
mcp.run()
  • Example: start with uv (if installed and preferred):
pip install uv
uv --directory $(pwd) run main.py

Configuration tips:

  • Update the CSV data path in utils/read_csv_file.py (path variable) to point at your local data folder.
  • If integrating with a client (e.g., Claude Desktop), add an MCP server entry in the client configuration specifying the command and args to start this server.

Project layout (high level)

PathPurpose
data/Example datasets used for demos and tests
tools/all_tools.pyMCP tool definitions exposed to clients
utils/Core logic: preprocessing, model selection, tuning, visualization
main.pyApplication entry point that registers MCP tools and starts server
server.pyMCP server configuration (mcp instance)
requirements.txtPython dependencies

Available Tools / Resources

The server exposes multiple MCP tools grouped by capability. Common callable functions include:

Data analysis:

  • information_about_data(file_name)
  • reading_csv(file_name)
  • visualize_correlation_num(file_name)
  • visualize_correlation_cat(file_name)
  • visualize_correlation_final(file_name, target_column)
  • visualize_outliers(file_name)
  • visualize_outliers_final(file_name, target_column)

Preprocessing & feature engineering:

  • preprocessing(file_name, target_column)
  • before_model(file_name, target_column)
  • check_duplicates(file_name)

Modeling & evaluation:

  • model_selection(file_name, target_column, problem_type)
  • prediction(model_name, X_new)
  • external_test(file_name, model_name) — run an external evaluation

Hyperparameter tuning:

  • hyperparameter_tuning(model_name, X, y, trials, scoring_metric)
  • trial_management controls number of trials and search strategy

Visualization / utilities:

  • feature_importance(file_name, model_name)
  • visualize_results(comparison_dataframe)

(Refer to tools/all_tools.py to discover exact function signatures and parameters.)

Supported Algorithms

Examples of algorithms included in the pipeline:

Regression: Linear Regression, Ridge, Lasso, ElasticNet, Random Forest, XGBoost, SVR, KNN, CatBoost
Classification: Logistic Regression, Ridge Classifier, Random Forest, XGBoost, SVM, KNN, Decision Tree, Naive Bayes, CatBoost

Use Cases

  • Quick exploratory analysis
    • Call reading_csv() and information_about_data() to get a basic EDA report for a new dataset before modeling.
  • Automated model comparison
    • Use preprocessin() then model_selection() to train several algorithms and get a ranked comparison (R²/MAE for regression; accuracy/F1 for classification).
  • Hyperparameter search for a single model
    • Invoke hyperparameter_tuning() with a chosen model (e.g., XGBoost or RandomForest), set the trial budget and scoring metric, and retrieve the best hyperparameters and evaluation results.
  • Integration with conversational agents or dashboards
    • Because the functionality is exposed as MCP tools, an external UI or conversational agent can run end-to-end AutoML workflows via RPC-like tool calls without embedding ML code.

Next steps / tips

  • Adjust preprocessing logic and feature transformations in utils/preprocessing.py to match domain specifics.
  • Extend tools/all_tools.py to add custom endpoints (e.g., custom scoring, dataset versioning).
  • Use the example datasets in data/ to validate workflows and tuning parameters locally before running on production data.

For full code, API signatures and examples, see the repository: https://github.com/emircansoftware/MCP_Server_DataScience

Common Issues & Solutions

Received an automated GitHub issue saying our repo is listed on Spark with instructions to "claim" the listing. I wasn't sure whether the message and the claim link were legitimate or what the claim process entailed.

✓ Solution

I ran into this too! What fixed it for me was directly visiting the claim URL asserted in the issue, signing in through GitHub, and checking the OAuth scopes and that I actually had push access to the repo before authorizing. Once verified I clicked the claim button in the Spark dashboard, edited the title/description/tags to be accurate, and copied the provided "Listed on Spark" badge markdown into our README. After confirming changes and reviewing the analytics UI, I closed the GitHub issue. If you’re unsure, verify the sender domain and don’t authorize until you confirm push permissions.

用 Cherry Studio 安裝後沒有任何反應。啟動器似乎提取了檔案但伺服器未啟動,沒有顯示錯誤或連線失敗提示。

✓ Solution

I ran into this too! The fix for me was checking the install path and Java runtime: the installer extracted files but didn’t set the working directory so the server jar never launched. I ran the server jar manually (java -jar server.jar) from the extracted folder to inspect the logs and found it required Java 17. After installing Java 17, setting CHERRY_STUDIO_HOME to the correct folder, and re-running the installer as administrator, I also allowed the server port through the firewall and confirmed eula=true in server.properties. After those steps the server started and the Cherry Studio launcher showed status.