MCP for Oura

link.smirnov由 smirnov.link 发布官方发布者v0.1.1更新于 Nov 4, 2026

Multi-tenant hosted MCP server for Oura Ring — 21 read-only tools, OAuth per user.

已验证Streamable HTTP可网页运行位置与生活数据与分析

概览

AI 生成的概览

托管的 Oura Ring 连接器,经 OAuth 授权后让助手通过 21 个只读工具读取你的睡眠、准备度、活动与生理数据。

可以做什么
  • 读取每日快照与单指标区间数据:每日摘要、昨夜睡眠、日期区间序列、晨间简报与每周回顾。
  • 查看活动与标签数据:训练记录、正念会话、日内心率序列、自定义标签,以及与个人基线的对比。
  • 查询每日健康指标:压力、血氧、恢复力、心血管年龄、最大摄氧量、建议睡眠时间与休息模式时段。
  • 执行分析:标记异常日期,并将记录的标签与指定指标做相关性比较。
  • 运行诊断,确认连接器已通过认证且 Oura API 可响应。
适用场景
适合佩戴 Oura Ring 的用户,希望用自然语言向助手询问睡眠、恢复、压力与长期趋势,或需要标签与指标的相关性分析和异常标记,而不必打开 Oura 应用。
运行要求
远程 MCP 端点,无需本地安装。需要 Oura 账号,并通过服务器同意页与 Oura 自身的授权完成 OAuth。需要支持自定义连接器与 OAuth 的 MCP 客户端。目前受 Oura 开发模式限制,最多 10 名授权用户。
安装前请注意
服务器会持有你的 Oura OAuth 令牌并代你读取戒指数据;README 称令牌加密存储且不记录戒指数据,但健康数据仍会经过第三方托管服务。所有工具均为只读,不会向 Oura 写入内容。由于 Oura 公共 API 未开放,周期分析不可用。该服务为小型独立项目,与 Oura 无关联。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MCP for Oura,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/link.smirnov%2Fmcp-oura/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "for-oura": {
      "type": "http",
      "url": "https://mcp-oura.smirnov.link/mcp"
    }
  }
}

README

mcpforoura

[smithery badge] [mcp registry]

Ask your AI assistant about your Oura Ring data in plain language. mcpforoura is a hosted, multi-tenant Model Context Protocol server for Oura Ring, live at https://mcp-oura.smirnov.link/mcp. Connect it to Claude (or any MCP-compatible client), authorize once with Oura, and query your sleep, readiness, activity, biometrics, and long-term trends across 21 read-only tools. Multi-tenant OAuth: each user authenticates to their own Oura account. Read-only. Built on Cloudflare Workers.

[Add to Claude]

Listed on Smithery and the official MCP Registry.

Small-scale connector — currently in Oura's development-mode 10-user cap; production application is pending. Not affiliated with Oura Health Oy.

Status: deployed and serving. 21 tools live — core sleep/readiness/activity data plus biometrics, composite snapshots, and analytics. Phase 5 cycle tools removed pending Oura API support (see "Not available" below). Full build history is in the milestone table.

What you can ask

Once connected, your assistant can answer questions like:

  • "How did I sleep last night?" — stages, timing, HR and HRV
  • "Is my HRV normal for me this week?" — compared against your personal baseline
  • "How am I today?" — a morning briefing of readiness, recommended sleep, and yesterday's stats
  • "Does alcohol hurt my recovery?" — correlate a logged tag against any metric
  • "Flag any days this month that were unusual for me." — statistical anomaly detection

Those map onto 21 tools across 4 phases (Phase 5 cycle tools removed — see "Not available" below):

Core (M6 originals)

ToolWhen to use
get_daily_summary"How was my Saturday?" / "Show me yesterday's readiness." A single-day snapshot of sleep + readiness + activity.
get_date_range"How was my sleep this week?" / "Show me my HRV over the past month." A single metric over up to 180 days.
get_last_night_sleep"How did I sleep last night?" Most recent night's score, stage breakdown, timing, HR/HRV.
pingDiagnostic. Verifies the connector is authenticated and reachable.
_internal_personal_infoDiagnostic. Verifies the Oura token works and the API is responding.

Phase 1 — Activity & tagging

ToolWhen to use
get_workoutsList logged or auto-detected workouts over a date range (up to 180 days).
get_sessionsList mindfulness sessions (meditation, breathing, relaxation).
get_heart_rate_seriesIntraday HR time-series within a 24h window, bucketed to 5min/15min/raw.
get_tagsCustom tags users log (caffeine, alcohol, custom notes).
compare_to_baseline"Is this normal for me?" Compares a day's metric to 30- and 90-day personal baselines.

Phase 2 — Tier A daily metrics

ToolWhen to use
get_stressDaily high-stress and recovery seconds for a date.
get_spo2Nightly blood-oxygen (SpO2) average and breathing disturbance index.
get_resilienceOura's long-term stress recovery capacity score for a date.
get_cardio_ageCardiovascular-age estimate derived from HRV, resting HR, and other signals.
get_vo2_maxMost recent VO2 max measurement within 30 days of the queried date.
get_recommended_sleep_timeOura's recommended bedtime window for a date.
get_rest_mode_periodsList illness/recovery rest-mode periods over a date range.

Phase 3 — Composite tools

ToolWhen to use
get_morning_briefing"How am I today?" Structured snapshot: readiness + recommended sleep time + yesterday's stats.
get_weekly_recap1–28 day window with per-metric mean/min/max. Default 7 days.

Phase 4 — Analytics

ToolWhen to use
find_anomaliesFlag days whose metric deviates >N σ from the rolling-window mean.
correlate_tag_with_metric"Does alcohol hurt my HRV?" Compare metric stats on tagged vs. untagged days.

Not available

Cycle analytics (get_cycle_phase, get_cycle_history, compare_metric_across_cycle_phases) were initially planned for Phase 5 but Oura's public v2 API does not expose menstrual cycle endpoints — the Cycle Insights feature lives in the Oura app only. The tools were removed after a beta user hit 404s; see git history (feat/phase-5-cycle and feat/remove-cycle-tools branches) for the reasoning trail. Tag-based logging via get_tags can serve as a partial workaround if users tag period start days manually.

Adding the connector in Claude

[Add to Claude]

  1. Click Add to Claude. It opens the Add custom connector dialog on claude.ai with the name (Oura) and URL filled in. Check both values, then click Add.
  2. Approve on this server's consent page → redirected to Oura → consent there → returned to Claude.

To add it by hand, go to Customize → Connectors → Add custom connector and enter https://mcp-oura.smirnov.link/mcp as the URL.

On a Team or Enterprise plan, an Owner adds custom connectors for the whole organization. Owners can use the organization version of the link. Members then connect from Customize → Connectors with their own Oura account.

The connector currently caps at 10 authorized users (Oura's default development-mode limit). To lift the cap, the Oura developer application must be approved for production by Oura.

Architecture

Two-stage OAuth on Cloudflare Workers:

  • Flow A (MCP client ↔ this server). Handled by @cloudflare/workers-oauth-provider. Standard OAuth2 + PKCE + dynamic client registration. Consent page is rendered server-side and includes a CSRF token.
  • Flow B (this server ↔ Oura). Hand-rolled. Triggered inside Flow A: redirect to cloud.ouraring.com, exchange the returned code for tokens, fetch /personal_info to derive a stable user id, store the token AES-GCM encrypted in Cloudflare KV, then complete Flow A with that user id attached as props.

The /mcp endpoint is stateless: for each request, createMcpHandler from Cloudflare's agents SDK builds an MCP server for the signed-in user, and that server routes the call to a typed tool handler. Each tool builds an OuraClient per call that handles token refresh, 401 disambiguation (re-auth vs. endpoint gated vs. account membership inactive), and 429 exponential backoff.

See CLAUDE.md for the full file-by-file walkthrough.

Setup (operator)

One-time:

  1. Oura developer app — cloud.ouraring.com → API Applications → New.

    • Redirect URI: https://<your-host>/oura/callback
    • Privacy Policy URL: https://<your-host>/privacy
    • Terms of Service URL: https://<your-host>/tos
  2. Cloudflare KV namespaces (paste IDs into wrangler.jsonc):

    bash
    npx wrangler kv namespace create mcpforoura-OAUTH_KVnpx wrangler kv namespace create OURA_TOKENSnpx wrangler kv namespace create OURA_CACHE

    The mcpforoura- prefix on OAUTH_KV avoids colliding with other workers in the same CF account that also use a binding called OAUTH_KV.

  3. First deploy (registers the worker so secrets can attach to it):

    bash
    npx wrangler deploy
  4. Secrets:

    bash
    echo -n "$CLIENT_ID"     | npx wrangler secret put OURA_CLIENT_IDecho -n "$CLIENT_SECRET" | npx wrangler secret put OURA_CLIENT_SECRETopenssl rand -base64 32  | tr -d '\n' | npx wrangler secret put ENCRYPTION_SECRET

    Keep a copy of ENCRYPTION_SECRET somewhere safe — if it's lost, stored tokens cannot be decrypted and all users have to re-authorize.

  5. Custom domain — if the apex zone is in the same Cloudflare account, the routes block in wrangler.jsonc (with custom_domain: true) attaches the subdomain automatically on next deploy. Otherwise, configure it manually in the Cloudflare dashboard.

Discoverability

The server publishes the following metadata for MCP registry aggregators:

PathPurpose
/.well-known/oauth-authorization-serverOAuth2 authorization-server metadata (served by @cloudflare/workers-oauth-provider).
/.well-known/oauth-protected-resourceOAuth2 protected-resource metadata (served by @cloudflare/workers-oauth-provider).
/.well-known/glama.jsonGlama directory discovery — https://glama.ai/mcp.
/.well-known/mcp/server-card.jsonSmithery scan fallback (only used when their auto-scanner can't pull the tool list through OAuth).
server.json (repo root)Official MCP Registry submission file — namespace link.smirnov/mcp-oura, DNS-verified against smirnov.link. Published with mcp-publisher.

Submitting the server to the official MCP Registry (which PulseMCP, mcp.so, and other aggregators consume from):

bash
# One-time, from this repo rootgo install github.com/modelcontextprotocol/registry/cmd/mcp-publisher@latestmcp-publisher login dns smirnov.link   # prints a TXT record to add in Cloudflare DNSmcp-publisher publish                  # uses server.json in the repo root

Submitting to Smithery: paste https://mcp-oura.smirnov.link/mcp at smithery.ai/new and walk through OAuth during their scan.

Submitting to Glama: use "Add Server" on glama.ai/mcp/servers (they pick up maintainer info from /.well-known/glama.json automatically).

Development

bash
cp .dev.vars.example .dev.vars      # fill innpm installnpm run dev

Local development hits the same Oura redirect URI as production, so it's usually easier to test via wrangler dev --remote so the consent flow completes against deployed infrastructure.

Privacy & data handling

  • Oura OAuth tokens are encrypted at rest (AES-GCM, per-user HKDF-derived key) in Cloudflare Workers KV.
  • Oura ring data is fetched on demand and (when the cache layer ships) may be briefly cached in KV with TTLs ranging from 5 minutes (today's data) to 24 hours (historical).
  • Ring data is not logged.
  • Disconnecting the connector revokes the OAuth grant; tokens become unreachable.
  • See /privacy on the deployed site for the full policy.

Status

Deployed at https://mcp-oura.smirnov.link on the Smirnov Labs Cloudflare account. Custom domain mapped via the routes block in wrangler.jsonc. Three KV namespaces provisioned (mcpforoura-OAUTH_KV, OURA_TOKENS, OURA_CACHE). Three secrets set (OURA_CLIENT_ID, OURA_CLIENT_SECRET, ENCRYPTION_SECRET).

Build progress

MilestoneStatus
M1 — Worker scaffold✅
M2 — OAuth provider + Hono consent + ping✅
M3 — Oura OAuth flow B✅
M4 — OuraClient (refresh, 401 disambig, 429 backoff)✅
M5 — AES-GCM token encryption✅
M6 — Tools 1–3✅
D1 — First deploy to mcp-oura.smirnov.link✅
D2 — CLAUDE.md + expanded README + LICENSE✅
D3 — Push to Smirnov-Labs/mcpforoura on GitHub✅
M7 — KV response cache with date-aware TTLs✅
M8 — Tools 4–8 (workouts, sessions, HR series, tags, baseline)✅
Phase 1–4 — 16 additional tools (Tier A, composites, analytics)✅
Phase 5 — cycle tools (removed; Oura v2 API has no public cycle endpoints)❌
M9 — Vitest tests + deploy-docs polish✅

License

MIT. See LICENSE.

来源:README.md,提交 6669c83

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分