Skip to main content
Glama
G0nza92

Medical AI Assistant MCP

by G0nza92

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 final

Estructura 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.example

Tecnologí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-v2

Orquestació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.11

Activarlo:

conda activate medical_ai

Instalar dependencias:

pip install -r requirements.txt

Variables 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-assistant

Ejecución

python main.py

Pruebas

Grafo:

python test/test_graph.py

Servidor MCP:

python test/test_mcp.py

Prueba del LLM:

python test/test_llm.py

Prueba de Gemini:

python test/test_gemini.py

Estado 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.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    A 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.
    Last updated
    4
    122
    4
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables 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.
    Last updated
    63
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Enables semantic search and document management using a local Qdrant vector database with OpenAI embeddings. Supports natural language queries, metadata filtering, and collection management for AI-powered document retrieval.
    Last updated
    64
    34
    MIT

View all related MCP servers

Related MCP Connectors

  • Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.

  • Search your knowledge bases from any AI assistant using hybrid RAG.

  • Agentic search over your Dewey document collections from any MCP-compatible client.

View all MCP Connectors

Latest Blog Posts

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/G0nza92/Medical_AI_Assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server