Vital Intelligence Health System
Biometric-aware AI assistant that reads your body and adapts assistance to your physiological state
The Problem
AI assistants ignore your body. They schedule deep work when you slept 4 hours. They push notifications during recovery. They treat you the same at 6am after great sleep and at 3pm in a cortisol crash. The body has data — AI should use it.
The Solution
Deploy a Vital Intelligence MCP server that ingests wearable data via HealthKit/Oura/Whoop APIs, computes a cognitive state model, and exposes tools that any Claude agent can call: get_energy_level, suggest_task_timing, check_stress, recommend_recovery. The agent becomes body-aware.
Overview
A production health integration system that connects wearable devices (Apple Watch, Oura Ring, Whoop) to your AI assistant. The system ingests biometric data — sleep quality, heart rate variability, stress markers, activity levels — and uses it to adapt AI behavior in real time. When you're sleep-deprived, it reschedules cognitive tasks. When your HRV drops, it suggests recovery. When your energy peaks, it queues your hardest work. Deploys as an MCP server that any Claude agent can connect to.
Architecture
Components
Wearable Data Ingest
externalConnects to Apple HealthKit, Oura API, Whoop API, and Garmin Connect. Pulls sleep, HRV, resting HR, activity, and recovery data.
Service: OAuth2 integrations
Vitals Processor
computeNormalizes biometric data from multiple sources. Computes rolling averages, trend detection, and anomaly flags.
Service: Railway (Node.js)
Cognitive State Model
ai-serviceMaps biometric signals to cognitive states: focus capacity, creativity window, recovery need, stress level. Uses Claude for interpretation.
Service: Claude Haiku + custom model
Vitals Time-Series DB
databaseStores biometric history with per-user isolation. Time-series optimized for trend queries and pattern detection.
Service: Supabase (TimescaleDB extension)
Vital Intelligence MCP
gatewayMCP server exposing health tools to any Claude agent. Tools: get_energy_level, suggest_task_timing, check_stress, recommend_recovery, get_sleep_report.
Service: Railway (MCP SDK)
Adaptive Scheduler
computeReorders task queue based on cognitive state. Moves deep work to high-energy windows, admin to low-energy periods.
Service: Vercel Cron + Calendar API
Wellness Interventions
ai-serviceGenerates personalized recovery suggestions: breathing exercises calibrated to HR, movement breaks, hydration reminders.
Service: Claude Sonnet
Health Dashboard
gatewayReal-time vitals dashboard showing energy levels, sleep trends, stress patterns, and AI adaptation history.
Service: Next.js on Vercel
Implementation Steps
Wearable Integration
2 weeks
Connect to health data sources and build the ingest pipeline
Tasks
- Implement Apple HealthKit OAuth flow
- Add Oura Ring API connector
- Add Whoop API connector
- Build data normalization layer (unified schema)
- Deploy time-series storage on Supabase
Deliverables
Cognitive State Model
2 weeks
Build the model that maps biometrics to cognitive states
Tasks
- Define cognitive state dimensions (energy, focus, creativity, stress)
- Build scoring algorithm from biometric inputs
- Train pattern detection on personal history
- Implement anomaly detection (unusual HRV, poor sleep)
- Create adaptive thresholds per user
Deliverables
MCP Server & Interventions
2 weeks
Deploy the MCP server and wellness intervention system
Tasks
- Build Vital Intelligence MCP server (5 tools)
- Deploy on Railway with auto-scaling
- Implement adaptive scheduling integration
- Create wellness intervention library (breathing, movement, hydration)
- Build health dashboard with real-time charts
Deliverables
Code Examples
Vital Intelligence MCP Server — Health Tools
MCP server that exposes biometric-aware tools to any Claude agent
import { Server } from '@modelcontextprotocol/sdk/server'
import { StdioTransport } from '@modelcontextprotocol/sdk/server/stdio'
const server = new Server({ name: 'vital-intelligence', version: '1.0.0' })
server.tool('get_energy_level', 'Current energy level based on sleep, HRV, and activity', {
type: 'object', properties: {}, required: []
}, async () => {
const vitals = await getLatestVitals(userId)
const energy = computeEnergyScore(vitals)
return {
content: [{
type: 'text',
text: JSON.stringify({
score: energy.score, // 0-100
level: energy.level, // 'high' | 'medium' | 'low' | 'critical'
factors: {
sleep: vitals.sleepScore,
hrv: vitals.hrvTrend,
activity: vitals.activityLevel,
},
recommendation: energy.recommendation,
})
}]
}
})
server.tool('suggest_task_timing', 'Optimal time windows for different task types', {
type: 'object',
properties: { taskType: { type: 'string', enum: ['deep-work', 'creative', 'admin', 'exercise'] } },
required: ['taskType']
}, async ({ taskType }) => {
const schedule = await getOptimalWindows(userId, taskType)
return { content: [{ type: 'text', text: JSON.stringify(schedule) }] }
})
const transport = new StdioTransport()
await server.connect(transport)Cost Estimate
$400
per month
$4,800
per year
Assumptions: 1 user (personal), ~100 biometric syncs/day, 5 MCP tool calls/hour
Use Cases
Technologies
Ready to Build?
Deploy this architecture in minutes, or get the production-ready template with full source code.