FastMCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FastMCPpredict housing prices from this CSV and show feature importance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AutoML Agent š¤
An agentic AutoML system that takes any CSV dataset and a natural language goal, runs a full ML pipeline autonomously, and returns a human-readable report with SHAP feature importance visualization ā exposed as a remote MCP server and accessible via a Streamlit UI.
What It Does
You upload a CSV and type a goal like "predict survival of passengers" or "forecast sales revenue". The agent does everything else:
ā Understands the problem type (classification, regression, clustering)
ā Cleans and preprocesses the data intelligently
ā Engineers new features using LLM reasoning
ā Trains multiple ML models and selects the best one
ā Generates SHAP explainability plots
ā Returns a full structured report in plain English
If any step fails, the self-correction loop catches the error, asks the LLM for a fix, and retries automatically ā up to 3 times.
Related MCP server: mcp-data-summary
Live Demo
Streamlit UI: Run streamlit run app.py locally ā connects to the remote MCP server automatically
MCP Server: https://web-production-3340c.up.railway.app/mcp ā permanently deployed on Railway
Architecture
User (Streamlit UI)
ā uploads CSV + enters goal
ā calls Remote MCP Server (Railway)
ā LangGraph Agent runs 7 nodes:
1. understand_problem ā LLM identifies problem type, target, features
2. clean_data ā LLM decides cleaning steps, pandas applies them
3. feature_engineering ā LLM suggests new features, eval() creates them
4. train_models ā sklearn trains 3 models, evaluates each
5. select_best_model ā picks best by accuracy (classification) or RMSE (regression)
6. explain_with_shap ā generates SHAP values and summary plot
7. generate_report ā LLM writes plain-English analysis report
ā self_correct node catches errors and retries (max 3 times)
ā returns report + SHAP plot to Streamlit UITech Stack
Tool | Purpose |
LangGraph | Agentic workflow orchestration and self-correction loop |
LangChain + Groq (GPT-OSS 20B) | LLM for problem understanding, cleaning decisions, report generation |
Scikit-learn | ML model training (LogisticRegression, RandomForest, GradientBoosting) |
SHAP | Model explainability and feature importance |
FastMCP | MCP server framework for exposing the agent as a callable tool |
Railway | Remote deployment of the MCP server (permanent URL) |
Streamlit | Frontend UI for CSV upload and results display |
Pandas / NumPy | Data processing and feature engineering |
Python-dotenv | Secure credential management |
Why LangGraph?
Each step in the ML pipeline is a clearly defined node with explicit edges between them. The conditional self-correction loop ā where any node can fail, get diagnosed by the LLM, and retry ā would be deeply messy to implement in a plain script. LangGraph makes this clean, traceable, and extensible.
Why MCP?
Exposing the agent as an MCP server means any MCP client (Claude Desktop, Cursor, or a custom Streamlit client like this one) can call it as a tool. The architecture separates the intelligence (server) from the interface (client) ā the same agent can serve multiple frontends without changing a line of backend code.
Why SHAP?
Accuracy alone doesn't explain WHY a model makes decisions. SHAP assigns credit to each feature for each prediction, making the model's reasoning transparent to non-technical stakeholders ā a critical requirement in real-world ML deployments.
Project Structure
Auto_ML/
āāā agent.py # LangGraph nodes, AgentState, graph wiring
āāā server.py # FastMCP server exposing analyse_dataset tool
āāā app.py # Streamlit client connecting to remote MCP server
āāā requirements.txt # Python dependencies
āāā Procfile # Railway deployment config
āāā nixpacks.toml # System dependencies for Railway (cairo, pango)
āāā .env # API credentials (never commit this)
āāā .gitignore
āāā README.mdKey Design Decisions
LLM-guided preprocessing: Instead of hardcoding cleaning rules, the LLM analyzes df_info and returns JSON instructions (columns to drop, encoding strategy, null handling). This makes the pipeline work on ANY dataset, not just Titanic.
available_features filter: After feature engineering, column names in state may not match the cleaned CSV. A filter resolves this dynamically so training never crashes on missing columns.
Base64 SHAP plot transfer: The SHAP plot is generated on the server, encoded as base64, embedded in the return string, and decoded by the Streamlit client. No file system sharing needed between server and client.
Temp file for CSV: The Streamlit client reads the uploaded CSV as a string and sends it to the MCP server. The server writes it to a temporary file, processes it, then cleans up. This avoids filesystem path issues between client and server environments.
What I'd Add Next
LangSmith tracing and evaluation dashboard
Support for clustering problems (currently classification and regression only)
Model versioning ā save trained models and allow reuse on new data
Deploy Streamlit UI to Railway so the entire project runs in the cloud
OAuth so multiple users can connect their own datasets securely
Author
Prarabdha Namdeo
GitHub: @PrarabdhaNamdeo
Threads: @prarabdha_namdeo
This server cannot be deployed
Maintenance
Related MCP Connectors
Give any MCP-compatible AI assistant a builder for live, hosted web tools and workflows.
Free public MCP for AI agents ā 193 tools, 44 workflows. No API key.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Related MCP Servers
- AlicenseBqualityFmaintenanceEnables autonomous data exploration on .csv-based datasets, providing intelligent insights with minimal effort.2544MIT
- FlicenseAqualityDmaintenanceEnables LLMs to generate visual summary reports from CSV datasets using MCP Resources, Tools, and Prompts, without exposing raw data to the model.10-
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives AI agents the ability to profile a CSV, define an ML task, tune XGBoost and LightGBM with Optuna, and produce a markdown report with feature importance, all from natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables any MCP client to run a complete data-science pipeline on a CSV: exploration, cleaning, model comparison, training, tuning, and plain-language analysis. Exposes nine tools that turn raw data into trained models and reports.1MIT