
Oura Ring
io.github.YasuakiOmokawa由 GitHub 帳號 YasuakiOmokawa 發布v0.2.13更新於 Oct 24, 2026
MCP server for Oura Ring API v2 (sleep, activity, readiness, heart rate, workouts).
概覽
本機 MCP 伺服器,透過 OAuth 連接 Oura Ring API v2,讓助理讀取睡眠、活動、準備度、心率與運動資料。
- 可以做什麼
- 透過瀏覽器 OAuth 流程完成 Oura 授權、檢查權杖有效性與到期時間,並清除已儲存的權杖
- 列出 Oura API v2 所有支援的 GET 端點與摘要
- 對 /v2 路徑發出通用 GET 請求,可用 max_pages 或 next_token 參數自動分頁
- 回傳包含狀態、資料、下一頁權杖、已抓取頁數與是否還有更多資料的結構化結果
- 適用情境
- 適合想讓助理在桌面 MCP 用戶端讀取自己的 Oura Ring 健康資料(睡眠、活動、準備度、心率或運動),用於每週回顧、趨勢檢視或恢復狀況摘要的情境。
- 執行需求
- 透過 npx 在本機執行(需要 Node.js)。需要一個 Oura 開發者應用程式,重新導向 URI 需與回呼埠(預設 54321)一致,並啟用所需的唯讀權限範圍。憑證為 Oura Client ID 與 Client Secret,可透過 configure 精靈寫入設定檔,或以 OURA_CLIENT_ID 與 OURA_CLIENT_SECRET 環境變數提供;OURA_CALLBACK_PORT 為選用。OAuth 步驟需要瀏覽器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Oura Ring,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
oura-mcp
A Model Context Protocol server for the Oura Ring API v2. Exposes sleep, activity, readiness, heart rate, and workout data to MCP-compatible clients (Claude Desktop, Claude Code, Cursor, ...) via OAuth.
Quick start
The wizard collects your Oura Client ID/Secret, walks through browser OAuth, saves tokens to ~/.config/oura-mcp/, and adds an mcpServers.oura entry to any detected MCP client config. Restart the client and the tools below are available.
Re-running configure pre-fills the saved Client ID / port so you only need to press Enter to keep them. Type --force to wipe saved state and start from scratch:
Prerequisites
- Register an Oura developer app at https://cloud.ouraring.com/oauth/applications
- Redirect URI must be exactly:
http://localhost:54321/callback(orhttp://localhost:<port>/callbackif you customizeOURA_CALLBACK_PORT) - Enable the read scopes you need (Email, Personal info, Daily activity, Heart rate, Workout, Tag, Session, SpO2, Ring configuration, Stress, Heart health)
- Note the Client ID and Client Secret — you'll enter them in
npx @yasuakiomokawa/oura-mcp configure
Installation
Three paths depending on your client:
1. MCP Registry (auto-discovery clients)
Once published to the official MCP Registry, supported clients can install io.github.YasuakiOmokawa/oura-mcp from their UI. The wizard step still has to run once to obtain OAuth tokens.
2. Manual config (Claude Desktop / Claude Code / Cursor)
Run npx @yasuakiomokawa/oura-mcp configure — Step 4 of the wizard auto-detects:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows) - Claude Code (user):
~/.claude.json - Claude Code (project):
./.mcp.json - Cursor (user):
~/.cursor/mcp.json - Cursor (project):
./.cursor/mcp.json
Each detected file is backed up to <file>.bak.<ISO-timestamp> before an atomic write.
To configure manually, add to your client config:
3. Skill (optional)
The companion oura-api-skill ships per-endpoint reference and three workflow recipes (weekly review / sleep trend / recovery check). Bundle it as a Claude Code plugin or import into your skills directory.
Tools provided
oura_api_get returns structuredContent with { status, data, next_token, pages_fetched, has_more }.
Configuration
Two ways. The config file (Option A) is the recommended path — it stores secrets at-rest with 0600 and is self-healing. Environment variables (Option B) are kept for CI / Docker / ephemeral environments where writing a file is impractical, but they leak more easily and are not recommended for daily use.
Option A — config file (recommended)
Run the wizard once and forget about it:
This writes:
Permissions are re-checked on every load and chmod'd back to 0600 if anything else touched them.
config.json schema:
Option B — environment variables (CI / Docker only)
When the server boots and both OURA_CLIENT_ID and OURA_CLIENT_SECRET are set, it uses them and emits a config.env_credentials warning to stderr.
Why not recommended:
process.envis readable from/proc/<pid>/environby any process running as the same user.- Environment is inherited by every child process the server spawns.
- Crash dumps and observability tools that capture
process.envwill leak the secret. OURA_CLIENT_SECRET=... npx ...typed at the shell ends up in shell history.
OURA_CALLBACK_PORT is not a secret and is fine to pass via env in either mode.
Never use args for secrets
Process arguments are visible to other users via ps / /proc/<pid>/cmdline. Use the env block of your MCP client config:
Troubleshooting
- "refresh_token expired" — run
oura_authenticate(in chat) ornpx @yasuakiomokawa/oura-mcp configure(in terminal). - Port 54321 already in use — set
OURA_CALLBACK_PORT=<other port>and update the redirect URI in your Oura developer app to match. - "Path not found" — verify the path with
oura_api_list_paths. Common slips: missing/v2/prefix, typo indaily_sleep. - Setup hangs at "Waiting for authorization" — you haven't approved in the browser yet, or the authorize page was opened in a different browser session than the one with localhost reachability.
- No log output — set
OURA_LOG_LEVEL=debugfor verbose stderr logging.
Development
Useful scripts:
npm run lint/npm run typecheck— Biome + TypeScript checksnpm run test:coverage— Vitest with V8 coveragenpm run update:docs— re-fetch the Oura OpenAPI schema and regenerateskills/oura-api-skill/references/
License
來源:README.md,提交 92b0c66
工具
0版本歷史
1- v0.2.13最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分