Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

AI Doctor Assistant Server

БесплатноНе проверен

Provides 12 medical tools for symptom checking, lab report explanation, emergency detection, and health advice, emphasizing safety and disclaimers.

GitHubEmbed

Описание

Provides 12 medical tools for symptom checking, lab report explanation, emergency detection, and health advice, emphasizing safety and disclaimers.

README

Your Virtual Medical Advisor powered by Model Context Protocol (MCP)

Python MCP License


⚠️ IMPORTANT DISCLAIMER

This AI assistant is NOT a replacement for professional medical advice, diagnosis, or treatment.

  • ❌ Cannot diagnose diseases
  • ❌ Cannot prescribe medications
  • ❌ Cannot replace a real doctor
  • ✅ CAN provide health information
  • ✅ CAN detect potential emergencies
  • ✅ CAN explain medical terms

Always consult a qualified healthcare provider for medical decisions.


🌟 Features

12 Medical Tools

Tool Description
🔍 check_symptoms Analyze symptoms, assess risk level, provide self-care tips
🚨 detect_emergency Detect life-threatening situations, provide immediate guidance
🔬 explain_lab_report Explain blood tests, lab values in simple language
💪 health_advice Exercise, sleep, stress management, lifestyle tips
💊 medicine_info Medicine information (NOT prescriptions)
🧠 mental_health_support Anxiety, stress, depression resources, crisis helplines
🥗 diet_nutrition Diet plans for diabetes, heart health, weight loss
🆘 first_aid_guide Step-by-step first aid for emergencies
🤰 pregnancy_guide Trimester-specific pregnancy information
👶 child_health Vaccination schedules, pediatric guidance
🏥 chronic_disease_info Diabetes, hypertension, heart disease management
📍 find_hospital Help finding nearby healthcare facilities

Safety Features

  • Emergency Detection: Automatically detects life-threatening symptoms
  • Medical Disclaimers: Every response includes appropriate warnings
  • No Prescriptions: Never recommends specific medications or dosages
  • Doctor Referral: Always encourages professional consultation
  • Audit Logging: All interactions can be logged for review

🚀 Quick Start

Prerequisites

  • Python 3.11 or higher
  • pip (Python package manager)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd "MCP-Based AI Doctor Assistant"
    
  2. Create virtual environment

    python -m venv venv
    
    # Windows
    .\venv\Scripts\activate
    
    # Mac/Linux
    source venv/bin/activate
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Configure environment variables

    # Copy example env file
    cp .env.example .env
    
    # Edit .env and add your Gemini API key (optional, for enhanced AI responses)
    # Get free key at: https://makersuite.google.com/app/apikey
    
  5. Run the server

    python -m src.server
    

🔧 Configuration

Environment Variables

Variable Description Required
GEMINI_API_KEY Google Gemini API key for AI responses Optional
SERVER_HOST Server host (default: 0.0.0.0) No
SERVER_PORT Server port (default: 8000) No
DEBUG_MODE Enable debug mode (default: true) No
LOG_LEVEL Logging level (default: INFO) No

MCP Configuration

The server can be configured in Claude Desktop or other MCP clients:

{
  "mcpServers": {
    "ai-doctor": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/MCP-Based AI Doctor Assistant"
    }
  }
}

📖 Usage Examples

Checking Symptoms

# Using the MCP tool
{
    "tool": "check_symptoms",
    "arguments": {
        "symptoms": ["headache", "fever", "fatigue"],
        "age": 35,
        "gender": "male",
        "duration": "2 days"
    }
}

Explaining Lab Reports

{
    "tool": "explain_lab_report",
    "arguments": {
        "tests": {
            "hemoglobin": 12.5,
            "wbc": 7500,
            "fasting_glucose": 110
        },
        "gender": "female"
    }
}

Getting Health Advice

{
    "tool": "health_advice",
    "arguments": {
        "topic": "sleep"
    }
}

Emergency Detection

{
    "tool": "detect_emergency",
    "arguments": {
        "symptoms": ["chest pain", "shortness of breath"],
        "context": "Started suddenly while walking"
    }
}

🏗️ Project Structure

MCP-Based AI Doctor Assistant/
├── src/
│   ├── __init__.py
│   ├── server.py           # Main MCP server
│   ├── config.py           # Configuration
│   │
│   ├── core/
│   │   ├── safety_engine.py    # Emergency detection, disclaimers
│   │   ├── llm_client.py       # Gemini API client
│   │   └── memory.py           # Conversation memory
│   │
│   └── tools/
│       ├── symptom_checker.py
│       ├── emergency_detector.py
│       ├── lab_report.py
│       ├── health_advisor.py
│       ├── medicine_info.py
│       ├── mental_health.py
│       ├── diet_nutrition.py
│       ├── first_aid.py
│       ├── pregnancy.py
│       ├── child_health.py
│       ├── chronic_disease.py
│       └── hospital_finder.py
│
├── requirements.txt
├── mcp_config.json
├── .env.example
└── README.md

🔒 Safety & Compliance

Emergency Detection

The system automatically detects critical symptoms like:

  • Chest pain / Heart attack signs
  • Difficulty breathing
  • Signs of stroke (FAST)
  • Severe bleeding
  • Loss of consciousness
  • Suicidal thoughts
  • Poisoning

When detected: AI reasoning stops immediately, emergency instructions are provided.

Medical Disclaimers

Every response includes:

  • Clear statement that this is not medical advice
  • Recommendation to consult healthcare providers
  • Emergency contact numbers when appropriate

What This System Does NOT Do

  • ❌ Diagnose diseases
  • ❌ Prescribe medications
  • ❌ Recommend specific dosages
  • ❌ Replace professional medical judgment
  • ❌ Store personal health information persistently

🌐 Free Deployment Options

Option 1: Render.com

  1. Create account at render.com
  2. New Web Service → Connect GitHub
  3. Add environment variables
  4. Deploy (Free tier: 750 hours/month)

Option 2: Railway.app

  1. Create account at railway.app
  2. New Project → Deploy from GitHub
  3. Add environment variables
  4. Deploy (Free tier: $5 credit/month)

🧪 Testing

# Run tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=src --cov-report=html

📞 Emergency Contact Numbers

Country Service Number
🇮🇳 India National Emergency 112
🇮🇳 India Ambulance 108
🇺🇸 USA Emergency 911
🇬🇧 UK Emergency 999
🇪🇺 EU Emergency 112
🌍 International Varies IASP Directory

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Guidelines

  • Always maintain safety features
  • Add appropriate disclaimers
  • Test emergency detection
  • Document new features

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Built using Model Context Protocol (MCP)
  • Medical information sourced from WHO, CDC, NIH public guidelines
  • Emergency protocols based on standard first aid guidelines

⚠️ Final Reminder

This AI assistant provides INFORMATION, not MEDICAL ADVICE.

For any health concerns:

  1. 🏥 Consult a qualified healthcare provider
  2. 📞 Call emergency services for urgent situations
  3. 🚑 Visit the nearest hospital for serious symptoms

Your health matters. Trust professionals, not AI.


Made with ❤️ for better health awareness

from github.com/pashaarshad/MCP-Based-AI-Doctor-Assistant

Установка AI Doctor Assistant Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/pashaarshad/MCP-Based-AI-Doctor-Assistant

FAQ

AI Doctor Assistant Server MCP бесплатный?

Да, AI Doctor Assistant Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для AI Doctor Assistant Server?

Нет, AI Doctor Assistant Server работает без API-ключей и переменных окружения.

AI Doctor Assistant Server — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить AI Doctor Assistant Server в Claude Desktop, Claude Code или Cursor?

Открой AI Doctor Assistant Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare AI Doctor Assistant Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai