io.github.mitchhankins01/oura-ring-mcp

编码与调试

by mitchhankins01

将 Oura Ring 连接到 Claude AI 助手,获取健康指标并结合智能分析工具进行解读,支持更便捷的健康洞察。

什么是 io.github.mitchhankins01/oura-ring-mcp

将 Oura Ring 连接到 Claude AI 助手,获取健康指标并结合智能分析工具进行解读,支持更便捷的健康洞察。

README

Oura MCP Server

npm version MCP Registry CI

An MCP server that connects your Oura Ring to Claude and other AI assistants. Get human-readable insights about your sleep, readiness, and activity—not just raw JSON.

Features

<img src="docs/outputs/demo.gif" width="500" alt="Demo">
  • Smart formatting - Durations in hours/minutes, scores with context ("85 - Optimal")
  • Sleep analysis - Sleep stages, efficiency, HRV, and biometrics
  • Readiness tracking - Recovery scores and contributor breakdown
  • Activity data - Steps, calories, and intensity breakdown
  • Health metrics - Heart rate, SpO2, stress, cardiovascular age
  • Smart analysis - Anomaly detection, correlations, trend analysis
  • Tags support - Compare metrics with/without conditions

See example outputs — what Claude returns for sleep, readiness, weekly summaries, and smart analysis

Quick Start

1. Install

bash
npm install -g oura-ring-mcp

Or use directly with npx (no install needed):

bash
npx oura-ring-mcp

2. Authenticate with Oura

Option A: Personal Access Token (simpler)

  1. Go to cloud.ouraring.com/personal-access-tokens
  2. Create a new token
  3. Set OURA_ACCESS_TOKEN in your Claude Desktop config (see below)

Option B: OAuth CLI Flow

  1. Create an OAuth app at developer.ouraring.com
    • Set Redirect URI to http://localhost:3000/callback
  2. Run the auth flow:
    bash
    export OURA_CLIENT_ID=your_client_id
    export OURA_CLIENT_SECRET=your_client_secret
    npx oura-ring-mcp auth
    
  3. Credentials are saved to ~/.oura-mcp/credentials.json

3. Configure Claude Desktop

Add to claude_desktop_config.json:

With Personal Access Token:

json
{
  "mcpServers": {
    "oura": {
      "command": "npx",
      "args": ["oura-ring-mcp"],
      "env": {
        "OURA_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

With OAuth (after running npx oura-ring-mcp auth):

json
{
  "mcpServers": {
    "oura": {
      "command": "npx",
      "args": ["oura-ring-mcp"]
    }
  }
}

The server reads credentials from ~/.oura-mcp/credentials.json. To enable automatic token refresh, add your OAuth credentials:

json
{
  "mcpServers": {
    "oura": {
      "command": "npx",
      "args": ["oura-ring-mcp"],
      "env": {
        "OURA_CLIENT_ID": "your_client_id",
        "OURA_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Restart Claude Desktop. Requires Node >=18.

What Can I Ask?

Daily check-ins:

  • "How did I sleep last night?"
  • "Am I recovered enough to work out today?"
  • "What's my body telling me right now?"

Patterns & trends:

  • "Do I sleep better on weekends?"
  • "What time should I go to bed for optimal sleep?"
  • "Is my HRV improving or declining?"

Correlations & insights:

  • "Does alcohol affect my sleep quality?"
  • "What predicts my best sleep nights?"
  • "How does exercise timing affect my recovery?"

Comparisons:

  • "Compare my sleep this week vs last week"
  • "How do I sleep after meditation vs without?"
  • "What changed when I started taking magnesium?"

Anomalies:

  • "Are there any unusual readings in my data?"
  • "Why was my readiness so low yesterday?"
  • "Find days where my metrics were off"

Available Tools

Data Retrieval

ToolDescription
get_sleepSleep data with stages, efficiency, HR, HRV
get_daily_sleepDaily sleep scores with contributors
get_readinessReadiness scores and recovery metrics
get_activitySteps, calories, intensity breakdown
get_workoutsWorkout sessions with type and intensity
get_sessionsMeditation and relaxation sessions
get_heart_rateHR readings throughout the day
get_stressStress levels and recovery time
get_spo2Blood oxygen and breathing disturbance
get_tagsUser-created tags and notes

Smart Analysis

ToolDescription
detect_anomaliesFind unusual readings using outlier detection
analyze_sleep_qualitySleep analysis with trends, patterns, debt
correlate_metricsFind correlations between health metrics
compare_periodsCompare this week vs last week
compare_conditionsCompare metrics with/without a tag
best_sleep_conditionsWhat predicts your good vs poor sleep
analyze_hrv_trendHRV trend with rolling averages

Resources

ResourceDescription
oura://todayToday's health summary
oura://weekly-summaryLast 7 days with averages
oura://baselineYour 30-day averages and normal ranges
oura://monthly-insights30-day analysis with trends and anomalies
oura://tag-summaryYour tags and usage frequency

Prompts

PromptDescription
weekly-reviewComprehensive weekly health review
sleep-optimizationIdentify what leads to your best sleep
recovery-checkShould you train hard or rest today?
compare-weeksThis week vs last week comparison
tag-analysisHow a specific tag affects your health

Remote Deployment (Railway)

Deploy the MCP server for remote access. The server proxies OAuth through Oura, so users authenticate directly with their Oura account — no PAT needed.

1. Create an Oura OAuth App

  1. Go to Oura OAuth Applications
  2. Create a new application
  3. Set the Redirect URI to: https://your-app.railway.app/oauth/callback
  4. Note the Client ID and Client Secret

2. Deploy

bash
# Install Railway CLI
npm install -g @railway/cli

# Login, init, and deploy
railway login
railway init
railway up

3. Set Environment Variables

In the Railway dashboard, add:

VariableDescription
OURA_CLIENT_IDFrom your Oura OAuth app
OURA_CLIENT_SECRETFrom your Oura OAuth app
NODE_ENVproduction
MCP_SECRET(Optional) Static bearer token for Claude Desktop (openssl rand -base64 32)
OURA_ACCESS_TOKEN(Optional) PAT fallback if not using OAuth (MCP_SECRET required)

Railway automatically sets PORT and RAILWAY_PUBLIC_DOMAIN.

4. Connect from Claude.ai

Use the connector in Claude.ai:

  1. Go to Settings > MCP Connectors > Add
  2. Enter your server URL: https://your-app.railway.app (without /mcp)
  3. Leave OAuth Client ID and Secret empty (dynamic registration handles it)
  4. You'll be redirected to Oura to authorize access to your data

5. Connect from Claude Desktop

For Claude Desktop, use MCP_SECRET + OURA_ACCESS_TOKEN:

json
{
  "mcpServers": {
    "oura-remote": {
      "url": "https://your-app.railway.app/mcp",
      "headers": {
        "Authorization": "Bearer your_mcp_secret_here"
      }
    }
  }
}

Local Testing

bash
# With Oura OAuth (full flow)
OURA_CLIENT_ID=your_id OURA_CLIENT_SECRET=your_secret pnpm start:http

# With static secret only (requires OURA_ACCESS_TOKEN)
OURA_ACCESS_TOKEN=your_pat MCP_SECRET=test-secret pnpm start:http

# Verify health endpoint
curl http://localhost:3000/health

# Check OAuth metadata (only available when OURA_CLIENT_ID is set)
curl http://localhost:3000/.well-known/oauth-authorization-server

# Test authenticated request (with static secret)
curl -X POST http://localhost:3000/mcp \
  -H "Authorization: Bearer test-secret" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{}},"id":1}'

Contributing

See CLAUDE.md for architecture details and development guidelines.

License

MIT

常见问题

io.github.mitchhankins01/oura-ring-mcp 是什么?

将 Oura Ring 连接到 Claude AI 助手,获取健康指标并结合智能分析工具进行解读,支持更便捷的健康洞察。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描111.8k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描111.8k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描111.8k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.1k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
51.8k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.2k

评论