Agentic AutoML Data Scientist MCP
An AI platform that automates the complete machine learning workflow using LangGraph agents and integrates with MCP servers for file, compute, and database operations.
README
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.txt -
Set 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"
- Windows (PowerShell):
-
Generate example datasets:
.venv\Scripts\python backend\datasets\generate_sample_data.py -
Run server:
.venv\Scripts\python run_dev.py- Single-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_here - Build and launch:
docker-compose up --build - Access the web dashboard at http://localhost:8000.
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.