Medical AI Assistant MCP
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., "@Medical AI Assistant MCPWhat are the latest treatments for type 2 diabetes?"
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.
Medical AI Assistant
Sistema RAG desarrollado como proyecto final de AI Engineering.
El proyecto implementa un sistema de Inteligencia Artificial preparado para producción, utilizando recuperación semántica, re-ranking, un agente cíclico con LangGraph, observabilidad mediante LangSmith y Arize Phoenix, y un adaptador MCP para exponer herramientas externas.
Objetivo
Construir un asistente médico capaz de responder preguntas utilizando artículos científicos de PubMed, combinando Retrieval-Augmented Generation (RAG) con un agente basado en LangGraph.
El sistema recupera información desde una base vectorial, prioriza los documentos mediante re-ranking y genera respuestas utilizando un modelo de lenguaje (LLM).
Arquitectura general
Usuario
│
▼
main.py
│
▼
pipeline.py
│
▼
MedicalAIAgent
│
▼
LangGraph
│
├───────────────┐
▼ │
Retrieval │
▼ │
Re-ranking │
▼ │
Construcción │
de contexto │
▼ │
LLM │
▼ │
Evaluación │
│ │
└──── Retry ◄───┘
│
▼
Respuesta finalEstructura del proyecto
Medical_AI_Assistant/
├── retrieval/
├── ranking/
├── orquestacion/
├── agente/
├── adaptadores_mcp/
├── observabilidad/
├── despliegue/
├── data/
├── scripts/
├── test/
├── main.py
├── pipeline.py
├── requirements.txt
├── README.md
└── .env.exampleTecnologías utilizadas
Python 3.11
LangChain
LangGraph
Google Gemini
Sentence Transformers
CrossEncoder (MS MARCO)
Qdrant
LangSmith
Arize Phoenix
OpenTelemetry
MCP (Model Context Protocol)
Docker
Kubernetes
Componentes implementados
Retrieval
Base vectorial Qdrant
Embeddings Sentence Transformers
Recuperación semántica
Related MCP server: GraphRAG MCP Server
Ranking
Re-ranking mediante:
cross-encoder/ms-marco-MiniLM-L-6-v2Orquestación
Implementada utilizando:
LangChain
Agente
Implementado mediante:
LangGraph
Flujo del agente:
Retrieval
↓
Re-ranking
↓
Contexto
↓
LLM
↓
Evaluación
↓
Retry (si es necesario)Observabilidad
Implementada mediante:
✅ LangSmith
✅ Arize Phoenix (OpenTelemetry)
Permite visualizar la ejecución completa del pipeline, las llamadas al modelo, tiempos de ejecución y trazabilidad del agente.
MCP
Se implementó un servidor MCP utilizando FastMCP.
Herramienta disponible:
search_medical_documents()Permite consultar documentos almacenados en Qdrant desde clientes compatibles con Model Context Protocol.
Despliegue
El proyecto incluye:
Dockerfile
Kubernetes Deployment
Kubernetes Service
Los archivos de despliegue están preparados para ejecutarse en un entorno con Docker Engine y un clúster Kubernetes configurado.
Instalación
Crear el entorno:
conda create -n medical_ai python=3.11Activarlo:
conda activate medical_aiInstalar dependencias:
pip install -r requirements.txtVariables de entorno
Crear un archivo .env:
GEMINI_API_KEY=
LANGSMITH_TRACING=true
LANGSMITH_API_KEY=
LANGSMITH_PROJECT=medical-ai-assistant
PHOENIX_TRACING=true
PHOENIX_API_KEY=
PHOENIX_COLLECTOR_ENDPOINT=
PHOENIX_PROJECT_NAME=medical-ai-assistantEjecución
python main.pyPruebas
Grafo:
python test/test_graph.pyServidor MCP:
python test/test_mcp.pyPrueba del LLM:
python test/test_llm.pyPrueba de Gemini:
python test/test_gemini.pyEstado de implementación
Componente | Estado |
Retrieval | ✅ |
Ranking | ✅ |
LangChain | ✅ |
LangGraph | ✅ |
MCP | ✅ |
LangSmith | ✅ |
Arize Phoenix | ✅ |
Docker | ✅ |
Kubernetes | ✅ |
Autor
Gonzalo Matos
Proyecto desarrollado como trabajo final de la asignatura AI Engineering.
El repositorio implementa una arquitectura modular basada en Retrieval-Augmented Generation (RAG), LangChain, LangGraph, Model Context Protocol (MCP) y herramientas de observabilidad para sistemas de IA en producción.
This server cannot be deployed
Maintenance
Related MCP Connectors
Medical RAG: semantic search for clinical guidelines, drug interactions, diagnoses & EHR data.
Medical RAG: semantic search for clinical guidelines, drug interactions, diagnoses & EHR data.
Search 36M+ PubMed biomedical articles and ClinicalTrials.gov studies.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.437 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying a hybrid system that combines Neo4j graph database and Qdrant vector database for powerful semantic and graph-based document retrieval through the Model Context Protocol.63MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying private knowledge bases through a modular RAG pipeline with features like hybrid retrieval, reranking, and observability, exposed via the Model Context Protocol.MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for agents to search, store, ingest, and maintain data in a Qdrant vector database.Apache 2.0