健康数据分析服务器

一个集成了Whoop API V2的综合模型上下文协议(MCP)服务器,为AI治疗应用提供健康数据分析。

  • by betoui
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 betoui/whoop-mcp

使用说明

Whoop健康数据MCP服务器

一个全面的模型上下文协议(MCP)服务器,与 Whoop API V2 为AI治疗应用提供健康数据分析。

✅ V2就绪:此服务器使用最新的Whoop API V2,带有UUID标识符和增强的数据结构。V1将于2025年10月1日弃用。

特性

🏥 Whoop API V2集成

  • 基于UUID的ID:所有健康数据的面向未来的标识符
  • 增强睡眠数据:性能百分比、一致性指标、呼吸频率
  • 改进的锻炼:运动名称、详细的区域持续时间、高度变化
  • 实时数据:来自Whoop的恢复、睡眠、压力和锻炼数据

🧠 人工智能治疗增强

  • 以治疗为重点的分析:心理健康指标和压力模式
  • 红旗检测:自动识别相关健康模式
  • 压力指标:HRV和心率的生理应激标志物
  • 睡眠影响分析:睡眠质量模式和心理健康影响

🔧 技术卓越

  • MCP协议:与Claude和其他人工智能助手的标准集成
  • 隐私第一:无持久存储的安全数据处理
  • 速率限制:尊重Whoop API的智能缓存限制
  • 并发处理:并行API调用以获得最佳性能

快速开始

1.设置环境:

```bash
cp .env.example .env
# Add your WHOOP_API_KEY to .env
```

2.构建并运行:

```bash
go mod tidy
go build -o bin/whoop-mcp-server
./bin/whoop-mcp-server
```

3.配置Claude桌面:

```json
{
  "mcpServers": {
    "whoop-health": {
      "command": "/path/to/bin/whoop-mcp-server"
    }
  }
}
```

可用工具

get_health_summary:治疗的全面健康概述 get_recovery_data:详细的恢复指标和趋势 get_sleep_analysis:心理健康的睡眠质量分析 get_stress_indicators:生理压力标记 get_activity_patterns:运动和活动行为洞察

API集成

此服务器与Whoop API v1。您需要:

  • 具有开发人员访问权限的Whoop帐户
  • Whoop开发者门户网站的有效API密钥
  • 具有最新数据的主动Whoop设备

发展

```bash
# Run tests
make test

# Run with auto-reload
make dev

# Build for production
make build-prod
```

隐私和安全

  • 无持久数据存储
  • 存储在环境变量中的API密钥
  • 健康数据从未被永久记录或缓存
  • 设计有HIPAA风格的隐私考虑

发展提示

```markdown
# When working on this project, remember:

## For API Integration:
"I'm working on Whoop API integration for an MCP server. Help me implement [specific endpoint] with proper error handling, rate limiting, and therapy-relevant data extraction."

## For Health Analysis:
"I need to analyze Whoop health data for therapeutic insights. Help me implement analysis that identifies [stress patterns/sleep issues/recovery trends] and generates actionable recommendations for therapy sessions."

## For MCP Protocol:
"I'm implementing MCP protocol tools for health data. Help me create a tool that [specific functionality] with proper JSON schema validation and error handling following MCP standards."

## For Testing:
"Help me write comprehensive tests for my Whoop MCP server, including unit tests for [specific component] and integration tests with mocked Whoop API responses."

## For Data Privacy:
"I need to ensure my health data MCP server maintains privacy and security. Help me implement [specific feature] while following best practices for sensitive health information."
```