California Housing MCP Agent
Allows interaction with the MLflow model registry to retrieve and serve the best California Housing model for predictions.
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., "@California Housing MCP Agentpredict house: MedInc=8, HouseAge=30, AveRooms=6, AveBedrms=1, Pop=1000, Occup=3, Lat=34, Lon=-118"
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.
California Housing MCP Agent
Practica end-to-end de MLOps con el dataset California Housing. El proyecto entrena modelos de regresion, registra el mejor en MLflow, sirve predicciones con FastAPI, expone herramientas MCP y ofrece un frontend HTML para inferencia individual, batch y chat con agente.
Componentes
training/train.py: entrena candidatos, evalua metricas y registra el modelo ganador en MLflow.api/main.py: aplicacion FastAPI con lifespan, CORS, observabilidad basica y servidor MCP embebido opcional.api/routes/v1/: endpoints de health, prediccion, batch, metadatos y chat del agente.agent/runtime.py: runtime del agente conectado a MCP mediante OpenAI Agents SDK y LiteLLM.frontend/index.html: interfaz local para probar predicciones y batch scoring.
Related MCP server: GoldenGate MCP Server
Requisitos
Python 3.11 o superior.
uvinstalado.Una clave de Gemini si
FREE_MODEL=true, o una clave de OpenAI siFREE_MODEL=false.
Configuracion
uv sync
Copy-Item .env.example .envEdita .env y define solo las claves que vayas a usar:
GEMINI_API_KEYcuandoFREE_MODEL=true.OPENAI_API_KEYcuandoFREE_MODEL=false.
Entrenar y registrar el modelo
En una terminal, arranca MLflow:
uv run --env-file .env -- mlflow server --backend-store-uri sqlite:///mlflow.db --default-artifact-root ./mlruns --host 127.0.0.1 --port 5000En otra terminal, ejecuta el entrenamiento:
uv run --env-file .env -- python training/train.pyEl script compara candidatos, registra el modelo si mejora el historico y asigna el alias configurado en MLFLOW_MODEL_ALIAS.
Ejecutar la API
Con MLflow disponible y un modelo registrado:
uv run --env-file .env -- uvicorn api.main:app --reload --host 127.0.0.1 --port 8000Endpoints principales:
GET /api/v1/healthPOST /api/v1/predictPOST /api/v1/batch-predictGET /api/v1/model-infoGET /api/v1/schemaPOST /api/v1/agent/chatPOST /mcpcuandoENABLE_MCP_SERVER=1
La documentacion OpenAPI queda disponible en http://127.0.0.1:8000/docs.
Frontend
Abre frontend/index.html en el navegador y usa http://127.0.0.1:8000/api/v1 como base URL. La pantalla permite:
prediccion individual,
subida de CSV para batch scoring,
chat con el agente,
inspeccion de request/response JSON y metricas de entrada.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceDeploys an MCP server on Azure Container Apps that exposes Azure ML managed online endpoints as tools, enabling AI agents like Azure AI Foundry to invoke machine learning models via natural language.MIT
- FlicenseNot gradedqualityDmaintenanceA production-grade MCP server that exposes real-time banking data replicated via Oracle GoldenGate CDC as structured tools for AI agents, enabling read, score, and write operations on customer, account, transaction, and alert data.1-
- FlicenseNot gradedqualityCmaintenanceA production-grade MCP server enabling Claude to perform comprehensive NJ real estate workflows including property search, valuation, neighborhood intelligence, investment analysis, and agent tools via 20 tools and 15+ data sources.-
- AlicenseNot gradedqualityCmaintenanceChains FRED, BLS, ATTOM, and HUD APIs to provide housing intelligence data through a single MCP server.2 npm1MIT