# Sleep Restriction Therapy Planner AI Agent Connect

> Sleep Restriction Therapy Planner MCP gives your AI client the clinical logic needed to manage CBT-I protocols. It handles the math for sleep windows, evaluates weekly efficiency to adjust titration, and generates structured schedules for patients. Instead of manual calculations, your agent manages the entire sleep restriction lifecycle.

## Overview
- **Category:** healthcare
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_cLVQ9DSC1GJKTn3gsMcCZIhuE9vGm24fIG7svdNp/ai-agent-connect
- **Tags:** cbt-i, insomnia, sleep-therapy, clinical-planning, sleep-efficiency

## Description

You can now hand off the heavy lifting of CBT-I protocol management to your AI agent. This MCP provides the specific clinical logic required for Sleep Restriction Therapy (SRT). Rather than manually calculating sleep windows or adjusting titration based on efficiency metrics, you let your AI client handle the math. 

You use this MCP to establish starting protocols based on a patient's insomnia metrics. As the treatment progresses, your agent evaluates sleep efficiency to decide whether to expand or contract the sleep window. It keeps the titration process precise and data-driven. Once the parameters are set, your agent can generate the actual daily schedules patients need to follow. It turns a complex, multi-step clinical process into a streamlined interaction within your existing AI workflow.

## Tools

### get_current_protocol_status
This tool pulls the existing parameters from a patient's current sleep restriction plan.

### calculate_initial_window
This tool sets the starting sleep restriction protocol using a patient's specific insomnia data.

### evaluate_titration
This tool calculates how to adjust the sleep window by looking at the previous week's sleep efficiency.

### generate_weekly_schedule
This tool creates a structured daily routine for a patient to follow for the next seven days.

## Prompt Examples

**Prompt:** 
```
Calculate a new sleep window for a patient with 75% efficiency, 420 minutes of sleep, 540 minutes in bed, and a fixed wake-up time of 07:00.
```

**Response:** 
```
The new sleep window is set for 23:00 to 07:00, providing a total duration of 480 minutes.
```

**Prompt:** 
```
The patient's recent sleep efficiency was 90%. Should we adjust the window?
```

**Response:** 
```
Since the efficiency is above the target, the action is to EXPAND the sleep window by increasing the time in bed.
```

**Prompt:** 
```
Generate a weekly schedule for patient ID 123 with a 480-minute window and a 06:30 wake-up time.
```

**Response:** 
```
The daily schedule for the upcoming week is bedtime at 22:30 and wake time at 06:30.
```

## Capabilities

### Initial Protocol Setup
Your agent uses patient metrics to build the first sleep window.

### Automated Titration
The AI adjusts sleep windows based on weekly efficiency scores.

### Schedule Generation
Your agent produces specific daily routines for patient compliance.

### Status Monitoring
The AI retrieves current protocol parameters to maintain continuity.

## Use Cases

### Weekly Titration Adjustments
An agent reviews a patient's weekly sleep efficiency and decides to expand or contract the window.

### New Patient Onboarding
A clinician uses the agent to calculate the very first sleep window for a new insomnia patient.

### Patient Routine Management
The AI generates a clear, structured bedtime and wake time schedule for a patient's upcoming week.

### Protocol Auditing
A specialist checks the current status of a patient's sleep plan to ensure it matches the intended protocol.

## Benefits

- Removes manual calculation errors during sleep window titration.
- Standardizes the application of SRT protocols.
- Reduces the time spent generating weekly patient schedules.
- Provides data-driven adjustments based on efficiency metrics.

## How It Works

Connect your AI client to Vinkius to start managing sleep protocols immediately.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide the patient's sleep metrics to your AI agent.
3. The agent uses the MCP tools to calculate windows or adjust titration.
4. The agent generates the final schedule or protocol status for your review.

## Frequently Asked Questions

**What is this MCP used for?**
It is a clinical tool for managing Sleep Restriction Therapy (SRT) protocols within CBT-I.

**Which AI clients can use this MCP?**
You can use this with any MCP-compatible client like Claude, Cursor, or Windsurf.

**How does the titration adjustment work?**
The agent evaluates the previous week's sleep efficiency to determine if the sleep window should be expanded or contracted.

**Can it create patient schedules?**
Yes, the generate_weekly_schedule tool produces structured daily routines for patients to follow.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP so it is ready to use as soon as you connect.

**How do I start a new sleep protocol?**
You can use the `calculate_initial_window` tool by providing the patient's current sleep efficiency, total sleep time, time in bed, and fixed wake-up time.

**How is the sleep window adjusted?**
The window is adjusted using `evaluate_titration`, which determines if the sleep window should be expanded, contracted, or maintained based on recent sleep efficiency.

**Can I see the current status of a patient's plan?**
Yes, use `get_current_protocol_status` with the patient's unique identifier to retrieve their current sleep window and efficiency targets.
