Medical Research Intelligence Assistant
An agentic RAG system for answering medical questions with PubMed citations. It combines Adaptive RAG (query routing) and Self-RAG (relevance grading, query rewriting, hallucination checks) in a pipeline.
接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
An agentic RAG system for answering medical questions with PubMed citations. It combines Adaptive RAG (query routing) and Self-RAG (relevance grading, query rewriting, hallucination checks) in a pipeline.
Medical Research Intelligence Assistant is an agentic RAG system that answers medical questions using PubMed literature with evidence-based citations. Built with LangGraph, it combines Adaptive RAG, Self-RAG, ChromaDB, and an MCP server to provide grounded responses for AI agents and developers.
Data source: PubMed abstracts
LLM: Mistral API
Embeddings: HuggingFace BAAI/bge-small-en-v1.5 (local, CPU)
Vector store: ChromaDB (local)
[PMID] citations and confidence scores
Visualize the graph:
python visualize_graph.py
medical_rag/
├── main.py # CLI entry point
├── requirements.txt
├── rag_graph.mmd # Mermaid graph definition
├── visualize_graph.py
├── data/ # ChromaDB persistence (gitignored)
└── src/
├── graph/
│ ├── graph.py # LangGraph definition
│ └── nodes.py # Pipeline nodes
├── rag/
│ ├── pubmed_fetcher.py
│ ├── vector_store.py
│ ├── retriever.py
│ ├── graders.py
│ └── generator.py
├── mcp/
│ └── server.py # MCP tools (SSE)
└── utils/
├── config.py
├── llm.py
├── ingest.py
├── state.py
└── http_ssl.py
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
pip install -r requirements.txt
Create a .env file in the project root:
# Required
MISTRAL_API_KEY=your_mistral_api_key
[email protected]
# Optional
MISTRAL_MODEL=mistral-small-latest
EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
CHROMA_PERSIST_DIR=./data/chroma_db
PUBMED_MAX_RESULTS=10
RELEVANCE_THRESHOLD=0.6
MAX_REWRITE_ATTEMPTS=2
MAX_REGEN_ATTEMPTS=2
MCP_HOST=0.0.0.0
MCP_PORT=8000
Get a Mistral API key at console.mistral.ai.
NCBI requires a contact email for PubMed API access (PUBMED_EMAIL).
python main.py ask "What are the first-line treatments for type 2 diabetes?"
JSON output:
python main.py ask "What is metformin?" --json
python main.py chat
Speeds up cold-start by loading seed topics into ChromaDB. The pipeline also fetches papers automatically when the store has fewer than 20 documents.
python main.py ingest
python main.py ingest --topics "diabetes,hypertension" --max 15
Expose the RAG pipeline as MCP tools for AI agents.
python main.py serve
The server listens at http://localhost:8000/sse (SSE transport).
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"medical-rag": {
"url": "http://localhost:8000/sse"
}
}
}
Create .vscode/mcp.json:
{
"servers": {
"medical-rag": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}
Use Copilot Agent mode and keep python main.py serve running in a terminal.
{
"mcpServers": {
"medical-rag": {
"url": "http://localhost:8000/sse"
}
}
}
ingest).simple, complex, or multi_hop.[PMID] citations.Medical Research Intelligence Assistant is an agentic RAG system that answers medical questions using PubMed literature with evidence-based citations. Built with LangGraph, it combines Adaptive RAG, S
總覽
Medical Research Intelligence Assistant is an agentic RAG system that answers medical questions using PubMed literature with evidence-based citations. Built with LangGraph, it combines Adaptive RAG, Self-RAG, ChromaDB, and an MCP server to provide grounded responses for AI agents and developers.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Agentic Medical Rag 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 Medical Research Intelligence Assistant is an agentic RAG system that answers medical questions using PubMed literature with evidence-based citations. Built with LangGraph, it combines Adaptive RAG, Self-RAG, ChromaDB, and an MCP server to provide grounded responses for AI agents and developers.