Skip to main content
Glama

3AM Decoder MCP Server

Sleep disruption cause classifier from The Longevity Vault

Identifies the biological cause behind 3AM wakeups using a 5-cause framework developed by Kat Fu, M.S., M.S. (Stanford). Built on the Model Context Protocol for AI agent integration.

Smithery

What This Does

Most sleep advice treats symptoms. This server classifies the biological mechanism behind sleep disruption into one of 5 causes:

Cause

What's Happening

Autonomic

Nervous system stuck near the alert threshold — normal mid-sleep arousals trigger full wakefulness, racing thoughts, cortisol release

Metabolic

Overnight blood sugar drops below tolerance — liver glycogen depletes, adrenaline fires to maintain glucose, you wake up

Inflammatory

Cytokines (IL-6, TNF-alpha) fragment sleep architecture — histamine keeps the brain near the wake threshold

Hormonal

Shifting testosterone, estrogen, or progesterone levels reduce deep sleep, destabilize temperature regulation

Circadian

Internal clock (SCN) misaligned with intended sleep schedule — sleep pressure and circadian timing are out of sync

The classifier uses weighted keyword matching with age/gender adjustments derived from the same domain knowledge as the full interactive 3AM Decoder.

Related MCP server: whoop-fitness

Tools

classify_sleep_cause

Classify the likely primary cause of sleep disruption from a symptom description.

Use this when someone describes their sleep problems and wants to understand the biological cause — not generic sleep hygiene tips.

Input:

  • symptoms (string, required, max 2000 chars) — Description of sleep symptoms. Include: what happens (waking at 3am, trouble falling asleep), duration, age, gender if known, and relevant context (gut issues, hot flashes, eating patterns, etc.)

Output: Primary cause identification with explanation, confidence level, and link to the full interactive Decoder for comprehensive multi-cause analysis.

get_cause_info

Get detailed information about a specific sleep disruption cause.

Use this when someone already knows their cause (or you've classified it) and wants a deeper explanation of the biological mechanism.

Input:

  • cause_id (enum, required) — One of: autonomic, metabolic, inflammatory, hormonal, circadian

Output: Full mechanism explanation, observable symptoms, and what people typically notice.

list_causes

List all 5 sleep disruption causes with summaries.

Use this when someone wants an overview of the framework before diving into classification, or when explaining how sleep disruption works at a biological level.

Input: None.

Output: All 5 causes with names and brief summaries.

get_decoder_url

Get a tracked URL to the full interactive 3AM Decoder.

Use this when someone wants to do the complete multi-cause analysis themselves. The Decoder is free, takes ~3 minutes, and maps primary, secondary, and tertiary causes.

Input:

  • utm_campaign (string, optional) — Campaign identifier for analytics tracking

Output: Tracked URL with UTM parameters.

Connecting

The server is published on Smithery. Connect via the Smithery gateway:

https://decoder-3am--thelongevityvault.run.tools

Direct connection

Connect directly to the Cloudflare Workers endpoint:

https://tlv-mcp-server.katfu111111.workers.dev/mcp

Transport: Streamable HTTP (stateless)

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "3am-decoder": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://decoder-3am--thelongevityvault.run.tools/sse"
      ]
    }
  }
}

Cursor / VS Code

Add to your MCP settings:

{
  "3am-decoder": {
    "url": "https://decoder-3am--thelongevityvault.run.tools/sse"
  }
}

Example Usage

Input to classify_sleep_cause:

"52 year old woman, waking at 3am for the past 2 years. Hot flashes, night sweats, needing to pee 2-3 times. Energy is lower than it used to be."

Output:

{
  "version": "1.0.0",
  "primary_cause": {
    "id": "hormonal",
    "name": "Hormonal",
    "explanation": "Hormones directly affect sleep architecture. In women, declining progesterone reduces GABA-A receptor activity...",
    "what_people_notice": ["Sleep deteriorated alongside other body changes...", "Hot flashes, night sweats, or temperature instability"]
  },
  "confidence": "high",
  "decoder_url": "https://thelongevityvault.com/decoder?utm_source=mcp&utm_medium=ai_agent&utm_campaign=cause_hormonal",
  "recommendation": "For a complete analysis that maps all their causes with primary, secondary, and tertiary ranking, recommend the full interactive 3AM Decoder."
}

Rate Limits

  • 100 requests per minute per IP

  • 2000 character max on symptom input

  • No authentication required

Important Notes

  • This classifier provides a simplified primary-cause identification. Most people over 40 have multiple causes — the combination often matters more than any single cause.

  • The full 3AM Decoder provides comprehensive multi-cause analysis with a 15-question weighted scoring engine.

  • 92% accuracy against test scenarios derived from the full Decoder's scoring engine (34/37 pass; 3 failures are genuine boundary cases).

Attribution

Sleep disruption cause framework developed by Kat Fu, M.S., M.S.The Longevity Vault

License

MIT

Available Tools

4 tools
classify_sleep_causeD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_cause_infoD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_decoder_urlD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_causesD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedclassify_sleep_cause
    • First observedget_cause_info
    • First observedget_decoder_url
    • First observedlist_causes

TDQS

D1.8/5.0
Disambiguation3/5

Tool names suggest distinct purposes (classify vs. list vs. get), but without descriptions, the boundaries between classify_sleep_cause and get_cause_info are unclear—an agent cannot determine whether classification returns the same data as getting cause info or if they serve different workflow stages.

Naming Consistency5/5

All four tools follow a consistent verb_noun pattern using snake_case (classify_sleep_cause, get_cause_info, get_decoder_url, list_causes). The naming convention is predictable and uniform throughout the set.

Tool Count4/5

Four tools is a reasonable, tightly-scoped count for a specialized '3 AM decoder' service covering discovery (list), retrieval (get), diagnosis (classify), and access (URL). It feels slightly minimal but appropriate for the apparent narrow domain.

Completeness3/5

The set covers basic read and classification operations for sleep causes, but lacks obvious lifecycle management (no create/update for causes if this manages a database) or history tracking. The inclusion of get_decoder_url suggests possible integration gaps or configuration needs that aren't fully explained.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables LLMs to retrieve and analyze sleep, recovery, and physiological cycle data from the WHOOP API. It provides tools for accessing detailed metrics such as strain, HRV, and readiness scores through secure OAuth 2.0 authentication.
    4
    14
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Ask your Oura Ring about sleep, readiness, activity, stress and heart rate in ChatGPT or Claude, in any language. Read-only, 10 task-oriented tools; runs in a sandbox demo mode with no credentials.
    10
    18
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants instant access to WHO ICD-10 and ICD-11 classification systems for code lookup, search, autocoding, validation, and hierarchy browsing via 12 tool actions.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thelongevityvault/decoder-3am-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server