Agentic AutoML Data Scientist MCP
Agentic AutoML Data Scientist using MCP
An advanced, production-ready AI platform that automates the complete machine learning workflow (data analysis, cleaning, EDA, feature engineering, model selection, hyperparameter tuning, evaluation, explainability, and PDF report compilation) using multiple AI agents orchestrated with LangGraph and integrated with Model Context Protocol (MCP).
The platform mimics a junior data scientist, logging every step, comparing standard Scikit-learn models (SVM, Random Forests, KNN, Linear/Logistic regression, Gradient Boosting), and producing interactive dashboards and downloadable models/PDF reports.
Architecture Diagram
flowchart TD
UI["Web Dashboard (HTML5 / CSS3 / JS)"] <-->|REST API| FastAPI["FastAPI Server (:8000)"]
subgraph Orchestrator ["FastAPI Backend (LangGraph Orchestrator)"]
Planner["Planner Agent"]
Analyzer["Dataset Analysis Agent"]
EDA["EDA Agent"]
Cleaner["Data Cleaning Agent"]
FE["Feature Engineering Agent"]
Selector["Model Selection Agent"]
Tuner["Hyperparameter Tuning Agent"]
Evaluator["Evaluation Agent"]
Explain["Explainability Agent"]
Reporter["Report Generation Agent"]
end
FastAPI <-->|MCP Protocol / stdio| FS_MCP["Filesystem MCP Server"]
FastAPI <-->|MCP Protocol / stdio| PY_MCP["Python MCP Server"]
FastAPI <-->|MCP Protocol / stdio| DB_MCP["SQLite MCP Server"]
FS_MCP <-->|Read / Write| Disk[("Local Filesystem")]
PY_MCP <-->|Execute ML| ML["Scikit-Learn / Pandas"]
DB_MCP <-->|Log History| SQLite[("SQLite DB")]Core Components
1. LangGraph Agents
Planner Agent: Understands the user's optimization request, analyses the dataset preview, selects the target column, and sets the regression/classification type.
Dataset Analysis Agent: Summarizes the columns, null counts, shapes, and types.
EDA Agent: Generates figures (missingness, correlations, target distribution) and writes findings.
Data Cleaning Agent: Configures and executes missing values imputation, encoding, and scaling.
Feature Engineering Agent: Writes custom python pandas statements to drop useless columns (like IDs) and generate derived features.
Model Selection Agent: Iterates and trains candidate models to compare performance.
Hyperparameter Tuning Agent: Fine-tunes the best model using cv grid/randomized search.
Evaluation Agent: Finalizes metrics (Accuracy/F1/ROC AUC or MAE/RMSE/R2) and generates fit curves.
Explainability Agent: Generates textual model explanations and identifies top feature importances.
Report Generation Agent: Compiles findings into a PDF and logs metrics to SQLite history.
2. MCP Server Integrations
Rather than tightly coupling operations, all file, compute, and database actions go through standard Model Context Protocol tool calls:
Filesystem MCP Server: Manages disk files (CSV datasets, serialized model binaries, and PDF reports).
Python MCP Server: Executes isolated Pandas preprocessing, trains Scikit-learn models, tunes hyperparameters, and outputs Matplotlib figures. It also has a code interpreter tool (
execute_python_code) to run dynamic feature engineering code.SQLite MCP Server: Logs and retrieves historical experiment statistics.
Tech Stack
Python 3.11
FastAPI (Backend REST API & Static File Server)
LangGraph (Agent flow graph)
LangChain & Google Gemini 2.5 Flash (LLM brains)
Model Context Protocol (MCP) (SDK for client-server tool calls)
Scikit-learn, Pandas, NumPy (Machine Learning & Data Processing)
Plotly, Matplotlib, Seaborn (Data Visualizations)
ReportLab (PDF document compilation)
HTML5 / CSS3 / JavaScript (Responsive Single-Page Web App)
SQLite3 (Historical experiment logging database)
Docker & Docker Compose (Containerization)
Local Setup
Prerequisites
Python 3.11 installed.
A Google Gemini API Key. Get one from Google AI Studio.
Installation
Clone this repository to your workspace.
Initialize virtual environment and install packages:
python -m venv .venv .venv\Scripts\activate pip install --upgrade pip pip install -r requirements.txtSet your API Key in your
.envfile or environment:Windows (PowerShell):
$env:GEMINI_API_KEY="your-api-key-here"Linux/macOS:
export GEMINI_API_KEY="your-api-key-here"
Generate example datasets:
.venv\Scripts\python backend\datasets\generate_sample_data.pyRun server:
.venv\Scripts\python run_dev.pySingle-Page Web Dashboard & API: http://localhost:8000
Swagger API Documentation: http://localhost:8000/docs
Docker Deployment
You can run the entire platform with a single command using Docker:
Create a
.envfile in the root directory:GEMINI_API_KEY=your_actual_gemini_api_key_hereBuild and launch:
docker-compose up --buildAccess the web dashboard at http://localhost:8000.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Harishrajan77/Agentic-AutoML-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server