Intelligent Medical Assistant MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/sp2learn/medical-mcp-server.git
cd medical-mcp-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "MEDICAL_MODEL=${MEDICAL_MODEL}" -e "GOOGLE_API_KEY=${GOOGLE_API_KEY}" medical-mcp-server -- python "<FULL_PATH_TO_MEDICAL_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_MEDICAL_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:MEDICAL_MODELGOOGLE_API_KEY+ 1 optional
README.md

A Patient-Centric Medical Intelligence System powered by Gemini AI

šŸ„ Intelligent Medical Assistant

A comprehensive Patient-Centric Medical Intelligence System that combines MCP (Model Context Protocol) server capabilities with an intelligent web interface. This system provides natural language medical queries, patient data analysis, and professional medical insights powered by Gemini AI.

✨ Key Features

šŸ¤– **Intelligent Medical Assistant**

  • Natural Language Processing - Ask questions like "What is Ben's sleep summary?"
  • Automatic Tool Routing - AI decides which patient data to access
  • Conversational Interface - Single input for all medical queries
  • Professional Medical Responses - Evidence-based information with disclaimers

šŸ‘„ **Patient Data Management**

  • Real Patient Data - CSV-based patient records and biometrics
  • Comprehensive Tracking - Sleep patterns, vital signs, lab results, medications
  • Trend Analysis - Historical data analysis and insights
  • Multi-Patient Support - Manage multiple patient records

šŸ”§ **Dual Architecture**

  • MCP Server - Integration with Kiro IDE and other MCP clients
  • Web Application - Professional web interface with authentication
  • RESTful API - Programmatic access to medical data and insights

šŸ“Š **Available Patient Data**

  • Ben Smith (34M) - Hypertension, Type 2 Diabetes
    • 15 days of detailed sleep data (duration, quality, efficiency)
    • Vital signs tracking (BP, heart rate, glucose, weight)
  • Sarah Jones (28F) - Asthma
  • Mike Wilson (45M) - High Cholesterol

šŸš€ Quick Start

1. **Installation**

# Clone and setup
git clone https://github.com/sp2learn/medical-mcp-server.git
cd medical-mcp-server

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

2. **Configuration**

# Copy environment template
cp .env.example .env

# Edit .env with your API keys
MEDICAL_MODEL=gemini
GOOGLE_API_KEY=your_gemini_api_key_here
DISPLAY_TIMEZONE=America/New_York

3. **Run the System**

Web Application:

python web_app.py
# Visit: http://localhost:8000
# Login: demo/password, doctor/secret123, admin/admin2024

MCP Server:

python server.py
# For integration with Kiro IDE or other MCP clients

šŸŽÆ Usage Examples

**Natural Language Queries**

The intelligent assistant understands natural language and automatically routes to appropriate tools:

🩺 "What is Ben's sleep summary for the past week?"
→ Analyzes sleep data, provides trends and insights

šŸ“Š "Show me Ben's blood pressure trends"
→ Reviews vital signs, identifies patterns

šŸ’Š "What medications is Ben taking?"
→ Lists current medications and adherence data

šŸ” "What are the symptoms of diabetes?"
→ Provides general medical information

šŸ“ˆ "Compare Ben's glucose levels over time"
→ Analyzes lab data and trends

**MCP Integration**

Add to your Kiro IDE configuration (.kiro/settings/mcp.json):

{
  "mcpServers": {
    "medical-query": {
      "command": "/path/to/medical-mcp-server/venv/bin/python",
      "args": ["/path/to/medical-mcp-server/server.py"],
      "disabled": false,
      "autoApprove": [
        "medical_query",
        "symptom_checker", 
        "get_patient_sleep_pattern",
        "get_patient_vitals",
        "get_patient_labs",
        "get_medication_adherence",
        "get_patient_activity",
        "get_patient_overview"
      ]
    }
  }
}

šŸ› ļø Available Tools

**MCP Tools (8 total)**

Tool Description Example Usage
medical_query General medical Q&A "What causes hypertension?"
symptom_checker Symptom analysis Analyze: headache, fever, fatigue
get_patient_sleep_pattern Sleep data analysis Ben's sleep for 30 days
get_patient_vitals Vital signs summary Ben's latest BP readings
get_patient_labs Laboratory results Ben's glucose trends
get_medication_adherence Medication compliance Ben's medication adherence
get_patient_activity Physical activity data Ben's activity levels
get_patient_overview Complete patient summary Ben's full medical profile

**Tool Management**

# List all tools and their status
python manage_tools.py list

# Show detailed tool information  
python manage_tools.py details get_patient_sleep_pattern

# Enable/disable tools
python manage_tools.py enable medical_query
python manage_tools.py disable symptom_checker

šŸ“ Project Structure

medical-mcp-server/
ā”œā”€ā”€ šŸ¤– Core Intelligence
│   ā”œā”€ā”€ intelligent_medical_assistant.py  # Natural language processing
│   ā”œā”€ā”€ medical_client.py                 # AI model integration
│   └── patient_data_manager.py           # Patient data management
ā”œā”€ā”€ 🌐 Web Interface  
│   ā”œā”€ā”€ web_app.py                        # FastAPI web application
│   ā”œā”€ā”€ templates/

Tools (8)

medical_queryGeneral medical Q&A
symptom_checkerSymptom analysis
get_patient_sleep_patternSleep data analysis
get_patient_vitalsVital signs summary
get_patient_labsLaboratory results
get_medication_adherenceMedication compliance
get_patient_activityPhysical activity data
get_patient_overviewComplete patient summary

Environment Variables

MEDICAL_MODELrequiredThe AI model to use (e.g., gemini)
GOOGLE_API_KEYrequiredAPI key for Gemini AI
DISPLAY_TIMEZONETimezone for data display

Configuration

claude_desktop_config.json
{"mcpServers": {"medical-query": {"command": "python", "args": ["/path/to/medical-mcp-server/server.py"]}}}

Try it

→What is Ben's sleep summary for the past week?
→Show me Ben's blood pressure trends
→What medications is Ben taking?
→What are the symptoms of diabetes?
→Compare Ben's glucose levels over time

Frequently Asked Questions

What are the key features of Intelligent Medical Assistant?

Natural language processing for medical queries. Automatic tool routing for patient data access. Comprehensive tracking of sleep, vitals, labs, and medications. Historical trend analysis for patient biometrics. Multi-patient record management.

What can I use Intelligent Medical Assistant for?

Quickly retrieving patient vital sign trends for clinical review. Analyzing patient sleep quality and efficiency over a 30-day period. Checking medication adherence for diabetic patients. Performing preliminary symptom analysis using AI-driven tools.

How do I install Intelligent Medical Assistant?

Install Intelligent Medical Assistant by running: git clone https://github.com/sp2learn/medical-mcp-server.git && cd medical-mcp-server && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt

What MCP clients work with Intelligent Medical Assistant?

Intelligent Medical Assistant works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Intelligent Medical Assistant docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare