MediAssist AI
README.md
# MediAssist AI
Educational healthcare information assistant built with:
- Python
- FastAPI backend
- Streamlit frontend
- MCP (Model Context Protocol) tool server
- Ollama
- Llama 3.2
> This application is for educational/general health information only. It does not diagnose disease, prescribe treatment, or replace a qualified healthcare professional. For emergencies, contact local emergency services.
## Architecture
```text
Streamlit UI
|
| HTTP
v
FastAPI Backend
|
+---- Ollama / llama3.2
|
+---- MCP Client ---- stdio ---- MCP Server
|
+-- medication_info
+-- interaction_check
+-- symptom_guidance
+-- health_topic_search
```
The LLM receives the user question and MCP tool results. Medication and interaction tools use the included local educational dataset; the model is instructed not to invent clinical facts.
## Features
- Chat UI with conversation history
- FastAPI REST endpoints
- Ollama health check
- MCP server/client integration
- Local medication information lookup
- Local interaction examples
- Symptom guidance with conservative red-flag routing
- Health topic search
- API validation and error handling
- Basic tests
- No paid LLM API key
## Requirements
- Python 3.11+
- Ollama installed locally
Pull Llama 3.2:
```bash
ollama pull llama3.2
```
## Installation
### Windows PowerShell
```powershell
cd mediassist_AI
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
```
### macOS/Linux
```bash
cd mediassist_AI
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
```
## Run
Terminal 1:
```bash
uvicorn backend.main:app --reload --port 8000
```
Terminal 2:
```bash
streamlit run frontend/app.py
```
Open Streamlit, normally at:
```text
http://localhost:8501
```
FastAPI Swagger:
```text
http://localhost:8000/docs
```
## Example questions
- What is paracetamol commonly used for?
- Check the included interaction information for warfarin and ibuprofen.
- I have a mild headache. What general self-care guidance is appropriate?
- Search the knowledge base for hypertension.
- Explain diabetes in simple language.
## Important design choice
The medication and interaction database is deliberately small and educational. Production medical software should use validated clinical data sources, governance, audit trails, clinician review, privacy controls, security testing, and jurisdiction-specific compliance.
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues