Oura Ring (read-only)

io.github.royreznik由 GitHub 帳號 royreznik 發布v1.0.0更新於 Oct 27, 2026

Read-only access to your Oura Ring readiness, sleep, activity, HRV, heart rate and trends.

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

唯讀 MCP 伺服器,讓助理查詢 Oura Ring 的整備度、睡眠、活動、HRV 與心率資料。

可以做什麼
  • 彙整單日的整備度、睡眠、小睡、活動、壓力、血氧、運動與標籤
  • 比較最多 90 天的逐日趨勢與平均值
  • 依日期範圍列出整備度、睡眠、活動、運動、冥想、健康與標籤紀錄
  • 檢視某一晚的睡眠階段圖與心率/HRV 曲線,以及彙總後的心率序列
  • 讀取個人資料,例如戒指型號、尺寸、韌體與電量
適用情境
適合想用 AI 用戶端詢問自己 Oura 資料的情況,例如昨晚睡得如何、整備度為何變化、一個月內 HRV 趨勢如何,同時不希望它有辦法修改資料。
執行需求
需要 Node.js 20.11+ 與 Oura 帳號。須自行建立 Oura API 應用程式並完成一次性 OAuth 登入(用戶端 ID 與密鑰,可透過 OURA_CLIENT_ID 與 OURA_CLIENT_SECRET 提供),權杖儲存在本機檔案。設定 OURA_SANDBOX=1 可使用公開範例資料、無需帳號。需要連線至 Oura API 的網路。
安裝前請注意
工具回傳的健康資料會由 MCP 用戶端傳送給其語言模型供應商,並受其條款約束。Oura 用戶端密鑰與 OAuth 權杖存放在本機權杖檔案中,需妥善保護;可透過 logout 或撤銷 Oura 授權來中斷連線。此伺服器依設計為唯讀,不會修改 Oura 資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Oura Ring (read-only),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Oura Ring MCP Server (read-only)

[npm] [CI] [oura-ring-mcp MCP server – quality and maintenance score on Glama] [M8ven Score] [Node] [Read-only] [License: MIT]

Ask Claude, Cursor, VS Code or any MCP client about your Oura Ring readiness, sleep, HRV, activity, stress and heart rate, without giving it any way to change your data.

"How did I sleep last night, and why is my readiness only 64?" "Compare my HRV and lowest heart rate over the last 30 days." "Show me last night's sleep stages and heart-rate curve." "Does my readiness drop after days I tagged alcohol?"

[Install in Cursor] [Install in VS Code]

(Run the one-time auth step before or after installing.)

Why this server

  • Read-only, enforced. Oura's API has no write endpoints for your data, and this client goes further: it can only send GET, refuses any URL outside /v2/usercollection/, never touches the webhook API, and every tool carries readOnlyHint: true. Tests fail the build otherwise.
  • Answers whole questions in one call. get_daily_overview returns a day's readiness, sleep, naps, activity, stress, resilience, SpO2, workouts and tags together. get_trends returns a day table plus averages and readiness zones over up to 90 days.
  • Model-friendly output. Compact JSON with hours, minutes, km and local times instead of seconds and meters; hypnograms as stage segments; heart rate aggregated into buckets. Pass raw: true for Oura's original objects.
  • Degrades gracefully. If you untick a data type on Oura's consent page, combined tools list it under unavailable instead of failing.
  • Your tokens stay on your machine. Your own Oura API application, OAuth with PKCE, a 0600 token file, and safe handling of Oura's single-use refresh tokens. No third-party servers, no telemetry.
  • Try it without an account. OURA_SANDBOX=1 serves Oura's public sample data.

Quick start

You need Node.js 20.11+ and an Oura account. (Oura retired personal access tokens in December 2025, so OAuth is the only way in.)

1. Create an Oura API application (2 minutes)

  1. Open cloud.ouraring.com/oauth/applications and create a new application.
  2. Set the Redirect URI to http://localhost:8787/callback.
  3. Copy the Client ID and Client Secret.

Applications work for up to 10 users without Oura's approval, which is plenty for personal use.

2. Connect your Oura account

bash
npx -y @royreznik/oura-ring-mcp auth

Paste your Client ID and Client Secret when asked (the secret isn't echoed). Your browser opens Oura's consent page; leave every data type ticked and approve. Tokens are saved to ~/.config/oura-ring-mcp/tokens.json and refreshed automatically from then on.

(For scripts, set OURA_CLIENT_ID and OURA_CLIENT_SECRET instead of answering the prompts.)

3. Add it to your MCP client

Claude Code

As a plugin (adds the server plus an /oura:auth skill that walks you through connecting):

text
/plugin marketplace add royreznik/oura-ring-mcp/plugin install oura@oura-ring-mcp

Or just the MCP server:

bash
claude mcp add oura --scope user -- npx -y @royreznik/oura-ring-mcp
Claude Desktop, Cursor, Windsurf

Add to the client's MCP config (Claude Desktop: Settings → Developer → Edit Config; Cursor: ~/.cursor/mcp.json; Windsurf: ~/.codeium/windsurf/mcp_config.json):

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

For Claude Desktop you can also install the .mcpb bundle from the latest release.

VS Code (GitHub Copilot)

.vscode/mcp.json (or your user mcp.json):

json
{  "servers": {    "oura": { "type": "stdio", "command": "npx", "args": ["-y", "@royreznik/oura-ring-mcp"] }  }}
OpenAI Codex CLI

~/.codex/config.toml:

toml
[mcp_servers.oura]command = "npx"args = ["-y", "@royreznik/oura-ring-mcp"]
Docker

Run auth on the host first, then mount the token directory:

bash
docker build -t oura-ring-mcp https://github.com/royreznik/oura-ring-mcp.gitdocker run -i --rm -v ~/.config/oura-ring-mcp:/home/node/.config/oura-ring-mcp oura-ring-mcp

Then ask: "Give me my Oura overview for today."

Try it without an account

bash
claude mcp add oura-sandbox --env OURA_SANDBOX=1 -- npx -y @royreznik/oura-ring-mcp

Sandbox mode serves Oura's public sample data. No auth step, no personal data.

Tools

ToolWhat it returns
get_daily_overviewOne day: readiness, sleep score and main sleep, naps, activity, stress, resilience, SpO2, cardiovascular age, VO2 max, bedtime guidance, workouts, sessions, tags (defaults to the latest scored day)
get_trendsDay-by-day table plus avg/min/max for readiness, sleep and activity scores, sleep stages, HRV, lowest HR, temperature, steps, calories and stress, over 1-90 days
get_profileAge, height, weight, sex, email; ring model, size, color, firmware; battery level
list_daily_readinessReadiness scores, contributors, temperature deviation
list_daily_sleepSleep scores and contributors
list_sleep_periods / get_sleep_periodNights and naps: stages, latency, efficiency, HR, HRV, breathing; one night's hypnogram and HR/HRV curves
list_daily_activityActivity score, steps, calories, activity minutes, sedentary time
list_workoutsActivity, intensity, duration, calories, distance (filterable by activity)
list_sessionsMeditation/breathing/relaxation sessions with mood, HR and HRV
list_daily_healthStress, resilience, SpO2 and breathing disturbance, cardiovascular age, VO2 max, bedtime window, joined by day
list_tagsTags and notes from the Oura app (alcohol, caffeine, sickness, custom...)
list_rest_mode_periodsRest Mode periods and their symptom tags
get_heart_rateHeart-rate time series aggregated to 5min/15min/hour/day (or raw), with per-source stats; up to 30 days per call

List tools accept start / end (YYYY-MM-DD, inclusive), a days shortcut and next_token. See the tool reference for details.

Configuration

VariableDefaultPurpose
OURA_CLIENT_IDfrom token fileYour app's client ID (auth asks if unset)
OURA_CLIENT_SECRETfrom token fileYour app's client secret (auth asks, without echoing, if unset)
OURA_REDIRECT_URIhttp://localhost:8787/callbackMust exactly match a redirect URI registered on your app
OURA_TOKEN_PATH~/.config/oura-ring-mcp/tokens.jsonWhere credentials are stored. Must be absolute (~/ is expanded). Honours XDG_CONFIG_HOME.
OURA_SANDBOXunset1 serves Oura's public sample data instead of your account
text
oura-ring-mcp            Start the MCP server on stdio (what your MCP client runs)oura-ring-mcp auth       Connect your Oura account (opens your browser)oura-ring-mcp status     Check the stored connectionoura-ring-mcp logout     Delete the locally stored tokensoura-ring-mcp --version

"Today" is computed in your computer's timezone, which should match the timezone your Oura app uses.

Privacy and security

  • oura-ring-mcp talks only to api.ouraring.com (plus your browser visiting cloud.ouraring.com during auth). No telemetry, no intermediary server.
  • Tokens and your client secret live in one file only your user can read (0600). They are never logged or returned by tools.
  • Your MCP client sends tool results to its language model. Health data you ask about is shared with that model provider under its terms.
  • To disconnect, run oura-ring-mcp logout. To revoke access completely, delete the application at cloud.ouraring.com/oauth/applications or revoke it in your Oura account.

Details: PRIVACY.md, SECURITY.md.

How authentication works

  • OAuth 2 authorization-code flow with PKCE (S256) and a random state, captured by a loopback-only callback server.
  • Oura refresh tokens are single-use. oura-ring-mcp refreshes shortly before expiry (and on a 401), one refresh at a time, under a lock file so several clients on one machine (e.g. Claude Desktop and Claude Code) never refresh at once, and writes new tokens atomically. If a write fails, the new tokens stay in memory so a full disk can't log you out.
  • Rate limits (429, honouring Retry-After), server errors, timeouts (30s) and network errors are retried with backoff. Cancelling a request in your client stops its Oura calls.

Troubleshooting

SymptomFix
Oura shows a redirect URI errorThe app's redirect URI must match OURA_REDIRECT_URI exactly, including http://, port and /callback.
Port 8787 is in useRegister another URI on your app (e.g. http://localhost:9876/callback) and run auth with OURA_REDIRECT_URI set to it.
Not connected to OuraRun auth. If your client runs as a different user or HOME, set OURA_TOKEN_PATH in the client config.
Oura rejected the refresh tokenRun auth again (app secret rotated, access revoked, or the token file was copied to another machine).
A data type appears under unavailable (403)It was unticked on Oura's consent page, or needs an active Oura membership. Run auth again and allow it.
426 errorUpdate the Oura app on your phone and open it so it syncs.
Today's data is missingOura only has data after the ring syncs through the Oura app. Open the app, then ask again.
bash
npx -y @royreznik/oura-ring-mcp status

Development

bash
npm installnpm test                 # unit, MCP integration, end-to-end and packaging tests (no network)npm run smoke:sandbox    # every tool against Oura's live sandbox APInpm run smoke:live       # every tool against your account (after auth); prints only countsnpm run inspect          # MCP Inspector

See CONTRIBUTING.md. The one hard rule: oura-ring-mcp stays read-only.

Credits and legal

Architecture, auth and test approach are adapted from whoop-mcp by Oryan Omer (MIT).

MIT © Roy Reznik. Unofficial project, not affiliated with or endorsed by Oura Health Oy. "Oura" is a trademark of Oura Health Oy. Nothing here is medical advice.

來源:README.md,提交 a862a38

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Oct 18, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。