Oura Ring Mcp Server

io.github.jordanburke由 GitHub 账号 jordanburke 发布v0.2.0更新于 Oct 24, 2026

Oura Ring MCP server for the Oura API v2: sleep, readiness, activity, heart rate, and more.

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

让助手通过一个整合工具读取 Oura Ring 的睡眠、准备度、活动、心率和锻炼数据。

可以做什么
提供一个整合的 oura_data 工具,通过 collection 参数覆盖 Oura API v2 的 usercollection 端点:每日活动、睡眠、准备度、血氧、压力、恢复力、心血管年龄、最大摄氧量、会话、锻炼、标签、休息模式时段、心率、戒指电量、戒指配置和个人信息。参数包括日期或时间范围、最新样本、记录 id、分页游标和稀疏字段集。它会按集合校验参数并返回可操作的错误信息。
适用场景
适合让助手回答关于自己 Oura 数据的问题,例如上周平均准备度、某晚的睡眠阶段、最近一次心率读数,或本月锻炼次数与时长。
运行要求
通过 npm 包在本地以 stdio 运行,需要 Node.js 24 或更高版本。需要 Oura OAuth2 应用:OURA_CLIENT_ID 和 OURA_CLIENT_SECRET,并执行一次 login 命令打开浏览器授权,令牌写入本地令牌存储。也可改用旧版 OURA_API_KEY 个人访问令牌。可选的 httpStream 传输使用 PORT 和 HOST。
安装前请注意
需要 Oura OAuth2 凭据 OURA_CLIENT_SECRET 和 OURA_CLIENT_ID,并把刷新令牌保存在磁盘上;刷新令牌为一次性并由服务器轮换。默认权限范围较广,包含 email、personal、heartrate 和 heart health。该服务器只读取 Oura 数据,不写入。可选遥测可写入文件或控制台。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Oura Ring Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

oura-ring-mcp-server

[Node.js CI] [npm version] [License: MIT]

A Model Context Protocol server for the Oura Ring API v2. Point Claude (or any MCP client) at your Oura data and ask about your sleep, readiness, activity, heart rate, workouts, and more.

Built with somamcp (telemetry + introspection), functype (typed error handling), and zod.

Design

Rather than one tool per endpoint, the server exposes a single consolidated oura_data tool with a collection parameter. This keeps the tool schema small (low token cost) while covering every Oura usercollection endpoint. The tool validates that the parameters you pass are legal for the chosen collection and returns actionable messages when they are not.

Requirements

  • Node.js 24+ (pinned in .nvmrc)

  • An Oura OAuth2 application — register one at cloud.ouraring.com/oauth/applications to get a client ID and secret. Set the redirect URI to http://localhost:8080/callback and enable the read scopes you want. The default requests the full set — email personal daily heartrate tag workout session spo2 ring_configuration stress heart_health — so every collection works (heart_health in particular gates vO2_max and daily_cardiovascular_age).

    Oura stopped issuing new personal access tokens in December 2025, so OAuth2 is the path for new setups. A previously-issued PAT still works — see Authentication.

Authentication

The server authenticates to Oura with an OAuth2 access token that it refreshes automatically. You authorize once with the built-in login command:

bash
# with OURA_CLIENT_ID and OURA_CLIENT_SECRET set in the environmentnpx -y oura-ring-mcp-server login

This opens your browser for consent, captures the redirect on http://localhost:8080/callback, and writes the tokens to ~/.config/oura-ring-mcp/tokens.json (override with OURA_TOKEN_STORE). Oura refresh tokens are single-use, so the server owns and rotates them in that store from then on — you never put a refresh token in your environment. The MCP server reads the store on startup; re-run login only if the refresh token is ever revoked.

Legacy PAT: if you still have a valid personal access token, set OURA_API_KEY instead and skip the OAuth setup. When both are configured, OAuth takes precedence.

Usage

Claude Desktop / Claude Code

Add to your MCP client config (e.g. claude_desktop_config.json):

json
{  "mcpServers": {    "oura": {      "command": "npx",      "args": ["-y", "oura-ring-mcp-server"],      "env": {        "OURA_CLIENT_ID": "your-oauth-client-id",        "OURA_CLIENT_SECRET": "your-oauth-client-secret"      }    }  }}

That runs the server over stdio, which is what most MCP clients expect. Run login once first (see Authentication) so the token store exists.

Configuration

Env varRequiredDefaultDescription
OURA_CLIENT_IDfor OAuth—Oura OAuth2 client ID.
OURA_CLIENT_SECRETfor OAuth—Oura OAuth2 client secret.
OURA_API_KEYfor legacy PAT—Legacy personal access token (Bearer). Alternative to the OAuth pair.
OURA_REDIRECT_URInohttp://localhost:8080/callbackRedirect URI for login; must match the Oura app registration.
OURA_SCOPESnofull read set (see Requirements)Space-separated scopes requested during login.
OURA_TOKEN_STOREno~/.config/oura-ring-mcp/tokens.jsonPath to the OAuth token store.
OURA_SANDBOXnofalseUse Oura's /sandbox/ demo data instead of your real data.
TRANSPORT_TYPEnostdiostdio or httpStream.
PORTno3000Port for httpStream transport.
HOSTno0.0.0.0Host for httpStream transport.
OURA_TELEMETRY_FILEno—Write NDJSON telemetry events to this file path (safe under any transport).
OURA_TELEMETRY_CONSOLEnotrueConsole telemetry, httpStream only (never enabled under stdio).

HTTP transport

For a long-running / networked deployment:

bash
OURA_CLIENT_ID=... OURA_CLIENT_SECRET=... TRANSPORT_TYPE=httpStream PORT=3000 npx -y oura-ring-mcp-server

The MCP endpoint is served at /mcp; somamcp also exposes a public GET /health probe.

The oura_data tool

ParameterApplies toNotes
collectionallWhich data collection to fetch (see below).
start_date / end_datedaily collectionsYYYY-MM-DD. Omitted → last 7 days.
start_datetime / end_datetimeheartrate, ring_battery_levelISO-8601. Omitted → last 24 hours.
latestheartrate, ring_battery_levelReturn only the most recent sample.
document_idcollections with a detail routeFetch a single record by id.
next_tokenlist collectionsPagination cursor from a previous response.
fieldslist collectionsComma-separated sparse fieldset.

Collections

Daily (start_date/end_date): daily_activity, daily_sleep, daily_readiness, daily_spo2, daily_stress, daily_resilience, daily_cardiovascular_age, vO2_max, sleep, sleep_time, session, workout, tag, enhanced_tag, rest_mode_period

Time-series (start_datetime/end_datetime): heartrate, ring_battery_level

List / singleton: ring_configuration, personal_info

Example prompts

  • "What was my average readiness score last week?"
  • "Show my sleep stages for the night of 2026-06-20."
  • "Get my most recent heart rate reading."
  • "How many workouts did I log this month and how long were they?"

Development

bash
pnpm installpnpm validate   # format + lint + typecheck + test + buildpnpm dev        # watch buildpnpm inspect    # run against the MCP Inspector

Try it without a ring by setting OURA_SANDBOX=true to hit Oura's demo dataset.

License

MIT

来源:README.md,提交 8e5e956

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

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

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