
Oura Ring
io.github.osjayaprakash由 GitHub 账号 osjayaprakash 发布v0.1.0更新于 Oct 27, 2026
Read-only Oura Ring sleep, readiness, activity, stress and heart rate data (OAuth2)
概览
只读 MCP 服务器,让助手通过 Oura API v2 查询你的 Oura Ring 睡眠、准备度、活动、压力、血氧、锻炼和心率数据。
- 可以做什么
- 读取个人资料,如年龄、体重、身高和生理性别
- 获取睡眠、准备度、活动、压力、血氧和恢复力的每日评分及构成因素
- 获取每晚睡眠与小睡的分期、效率、心率和 HRV
- 列出锻炼以及冥想、呼吸和休息会话
- 按时间窗口拉取心率样本的最小、最大和平均 bpm
- 每日查询默认最近 7 天(上限 90 天),心率默认最近 24 小时(上限 7 天)
- 适用场景
- 适合让助手回顾你的 Oura 指标、发现睡眠或准备度的趋势,或按日期范围汇总活动与压力,而无需手动导出数据。
- 运行要求
- 以 stdio 本地运行,可通过 uvx、Docker 或克隆仓库配合 uv 启动。需要一个 Oura API 应用,提供 OURA_CLIENT_ID 和 OURA_CLIENT_SECRET,重定向 URI 为 OAuth 登录会把令牌保存到本地文件;OURA_TIMEZONE 和 OURA_TOKEN_FILE 可选。Gen3 和 Ring 4 用户需有有效的 Oura 会员。
安装
在 SourceWeft 中
- 打开 控制台中的 Oura Ring,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
oura-ring-python-mcp
[CI] [PyPI] [Python] [Docker] [License: MIT]
An MCP server that gives Claude (or any MCP client) read-only access to your Oura Ring
data: sleep, readiness, activity, stress, SpO2, resilience, workouts, sessions and heart
rate. It talks to the Oura API v2 with its own small
async client (oura_ring_mcp.core).
Tools
Daily tools take optional start_date and end_date (YYYY-MM-DD, both inclusive).
Without them they cover the 7 days ending today; ranges are limited to 90 days. Each
result echoes the range it covers, so the model always knows what "today" meant.
get_heart_rate takes optional start_datetime and end_datetime (ISO 8601). Without
them it covers the last 24 hours; windows are limited to 7 days.
Per-interval series (5-minute activity classes, MET, sleep phases, in-sleep heart rate and HRV curves) are left out of results to keep them small; the scores, totals and averages are kept.
Setup
For a step-by-step guide, including creating the Oura application and troubleshooting, see the installation guide. Full documentation is at https://oura-ring-python-mcp.readthedocs.io.
The server signs in with OAuth2, since Oura has deprecated personal access tokens. You
need an Oura API application (a client ID and secret) whose redirect URIs include
http://localhost:47651/callback, with the scopes email, personal, daily,
heartrate, workout, session, spo2 and stress allowed (resilience needs
stress). Gen3 and Oura Ring 4 users need an active Oura
membership for the API to return data.
Sign in once. This opens the browser, catches Oura's redirect on localhost, and saves
the tokens to ~/.config/oura-ring-mcp/tokens.json (readable only by you):
From then on the server refreshes the access token by itself (Oura issues them for 30 days)
and saves each new single-use refresh token. Run auth again only if you revoke access
or the saved refresh token is lost.
If the redirect URI isn't http://localhost:<port>/... (or you're signing in over SSH
or in Docker), auth asks you to paste the URL the browser ended up on instead; force
that with auth --paste.
Run from PyPI
No clone needed; uv fetches and runs the published package:
In a client config, use "command": "uvx", "args": ["oura-ring-python-mcp"].
Run with Docker
Sign in on the host first (above), then mount the token folder so the container can
read the tokens and save refreshed ones. The server speaks MCP over stdio, so keep -i:
The image reads the tokens from /tokens/tokens.json. --user lets the container read
and update your token file on Linux; Docker Desktop on macOS and Windows doesn't need it.
To sign in from the container instead, run it with -it and the command auth --paste.
In a client config, use "command": "docker" with those arguments, and pass the
variables through the client's env block.
Claude Desktop
Add to claude_desktop_config.json:
Claude Code
Langfuse tracing (optional)
Each tool call becomes a Langfuse trace, with a child span for each Oura API call. Install the extra and set the keys:
In the server command, use run --extra langfuse oura-ring-python-mcp instead of
run oura-ring-python-mcp.
Privacy: sleep, heart rate and activity data are health data. By default, traces hold
only tool names, timings and error class names. Setting LANGFUSE_CAPTURE_DATA=true
sends your data to your Langfuse instance; only do that with an instance you trust, such
as a self-hosted one.
Development
Releasing
Bump version in pyproject.toml and both versions in server.json (a test checks they
match), commit, then push a tag:
The tag publishes to PyPI (pypi.yml, needs the PYPI_API_TOKEN secret), to
ghcr.io/osjayaprakash/oura-ring-python-mcp (docker.yml), and then to the
MCP Registry (mcp-registry.yml).
License
来源:README.md,提交 b9c92a3
工具
0版本历史
1- v0.1.0最新Sep 27, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分