decoder-3am-mcp

decoder-3am-mcp

leep disruption cause classifier using The Longevity Vault's 5-cause framework. Identifies the biological mechanism behind 3am wakeups from symptom descriptions. 4 tools: classify_sleep_cause, get_cause_info, list_causes, get_decoder_url. Built by Kat Fu dual M.S. (Stanford).

Category
访问服务器

README

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.

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

Smithery (recommended)

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选