
Oura Mcp
io.github.proscar87由 GitHub 帳號 proscar87 發布v0.4.0更新於 Oct 24, 2026
The Oura v2 API as an MCP server. Paginates, fixes the date range, warns when data is missing.
概覽
面向 Oura v2 API 的唯讀 MCP 伺服器,讓助理讀取戒指的睡眠、準備度、活動與心率資料,並代為處理分頁與日期範圍。
- 可以做什麼
- 列出並說明 19 個 Oura 集合及其可用參數
- 依含頭含尾的日期範圍查詢單一集合,自動翻頁到底,可指定欄位並輸出 JSON 或 CSV
- 取得昨晚睡眠與今日準備度,連同前幾天的原始紀錄
- 比較兩個期間是否超出該指標本身的波動範圍,並檢驗兩項指標是否同步變動
- 執行自我檢查,回報憑證狀態而不揭露權杖或任何健康數值
- 適用情境
- 當你希望助理讀取自己的 Oura 資料並回答睡眠、準備度、活動或心率相關問題,或做謹慎的前後比較時使用。若你在意分頁不完整、日期範圍差一天這類問題被明確處理而非悄悄回傳,它更合適。
- 執行需求
- 以 stdio 在本機執行;可從 PyPI 安裝 mcp-oura(uvx 或 pip),或使用 Claude Desktop 安裝包。沙盒模式不需任何憑證。讀取真實資料需在 Oura 註冊 OAuth2 應用程式,設定 OURA_CLIENT_ID 與 OURA_CLIENT_SECRET 並完成授權;既有的個人權杖可透過 OURA_PAT 或 OURA_PAT_FILE 提供。可選 OURA_CREDENTIALS 指定憑證檔案路徑。需要連線至 Oura API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Oura Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
oura-mcp
[PyPI] [Glama score] [License: MIT]
English | 简体中文 | 한국어 | Español
The Oura v2 API as an MCP server. All 19 collections, six tools, no dependencies beyond the MCP SDK.
One local day of heart rate is 1,231 samples across 2 pages
A client that doesn't follow Oura's next_token returns 1,000 of them — 81%,
looking complete, with nothing saying otherwise. Measured against the real API
on 9 August 2026, one person, one ring, 24 hours.
The test to apply to any Oura MCP server, including this one: does it take
next_token — or a cursor, or a limit — as a tool parameter? If it does,
pagination is the model's job, and a model that forgets to ask again produces a
confident answer off partial data. This server paginates to exhaustion before it
returns, and tells you how many pages it took.
That's one of four ways Oura under-delivers without saying so. All four are measured below, and all four are corrected here.
Install
Download oura-mcp.mcpb from the
latest release and
double-click it. Claude Desktop does the rest — no terminal, no Python, no Node.
It runs on Oura's official sample data out of the box, and every sample response
says so, so nothing can pass for your own sleep.
Prefer the command line? uvx --from mcp-oura oura-mcp.
Prefer no Python on your machine at all?
-i is not optional: an MCP server speaks over stdin and stdout, not over a
port. Without it the container has no stdin, the handshake never arrives, and
the client reports a server that doesn't show up.
In claude.ai or ChatGPT, in a browser? Those connect by URL, so the server has to live somewhere public: deploy it as a Worker on your own Cloudflare account — free, about ten minutes, yours alone. See Remote: claude.ai and ChatGPT.
The problem, measured
Oura does not return errors when it can't give you what you asked for. It returns something different, shaped like a correct response. These are the four we found by measuring against the real API on 9 August 2026:
1. Skip the pagination and you get a fraction
If next_token comes back and you don't follow it, you receive the first page
and nothing warns you. One local day of heartrate — one person, one ring,
24 hours — is 1,231 samples across 2 pages. A client that doesn't paginate
gets 1,000 of 1,231: 81%, looking complete. A month is ~37,000.
2. Asking for a single day returned zero records
end_date does not behave the same across collections:
And on top of that, workout filters by UTC date while reporting day in
local time: at -06:00, asking for July 16–18 returned records from the 15th
and 16th — before the requested start.
Here the range is inclusive on both ends, always. Two extra days are requested on each side and then trimmed, which is correct whichever way a given collection behaves — and stays correct when Oura changes it.
3. latest=true is ignored where it doesn't apply
Only heartrate and ring_battery_level honor it. In the other seventeen Oura
doesn't error: it returns the entire collection. You ask for the latest
record, you get ten, and you believe it's one. Here it's rejected before the
request goes out.
4. A field that doesn't exist is silently ignored
fields=does_not_exist returns the complete record — the projection never
happens — and fields=score,does_not_exist applies the good one and drops the
bad one without a word. Here, fields that never appeared are reported under
ignored_fields.
The pattern is always the same: you ask for one thing, you get another, and nothing warns you. That's why this package would rather shout than quietly under-deliver.
Installation
Try it with no credentials
The sandbox is official — it's in Oura's OpenAPI spec, with 34 mirror routes —
and serves synthetic data without authentication. 18 of the 19 collections work
there: personal_info doesn't, which makes sense, since it's the one returning
email, age, weight and height.
This is the right order: first you watch the server work and learn the shape of the data, then you go get credentials.
With your own data
Oura stopped issuing Personal Access Tokens in December 2025. Existing ones still work; new ones can't be created. So there are two paths:
a) OAuth2 — the one that works today. Register an application at
cloud.ouraring.com/oauth/applications
with the redirect http://localhost:9876/callback/ — the trailing slash is
required, the portal rejects the other form with invalid_redirect_uri.
If you registered on
developer.ouraring.cominstead, your app belongs to Oura's newer portal, whose token endpoint is a different one. The legacy endpoint rejects those apps on every refresh — so the registration works exactly once, until the first access token expires, and then fails forever with nothing explaining why. This server tries the legacy endpoint and falls back to the new one automatically; nothing to configure either way.
The token is stored in ~/.config/oura-mcp/credenciales.json with mode 600 — or
in the system keychain if you happen to have keyring installed, which is not a
dependency of this package — and refreshes itself. oura-mcp --forget erases
it.
b) A personal token, if you already had one.
--check is the self-check: it reports which credential you're using, which
scopes were granted and how long the access has left, without returning the
token or a single health value. It reports the token's length, never the
token. Error messages get copied and pasted into chats and issues; they have no
business carrying anything else.
Connecting it to Claude Code
With the package installed (pip install mcp-oura):
Drop OURA_SANDBOX once you've run oura-mcp --authorize.
If you use uv, nothing needs to be installed permanently:
The --from is required because the distribution is named mcp-oura and the
executable oura-mcp. (This needs uv; without it the command above fails
with "command not found", and pip install is the path to take.)
As a Claude Code plugin:
Connecting it to Claude Desktop
One click: download oura-mcp.mcpb from the
releases page and double-click
it. Claude Desktop installs it — no terminal, no JSON, no Python. It ships with
sample data turned on, so it works before you have any credential at all.
When you want your own data, just ask it for something: it opens Oura's authorization page through Claude, waits for the callback, and retries what you asked. No terminal. That works because MCP has a mode for precisely this — URL elicitation — and the client does the opening.
The one thing Oura still requires is that every application be registered, so you
need a client ID and secret from
cloud.ouraring.com/oauth/applications
once. That's Oura's rule, not this server's. oura-mcp --authorize remains for
terminal users and for clients that can't show a URL.
Or by hand, in ~/Library/Application Support/Claude/claude_desktop_config.json:
which oura-mcp gives you the full path. Claude Desktop does not inherit your
terminal's PATH, so a bare name there fails silently — one of the most common
mistakes when configuring an MCP server.
Remote: claude.ai and ChatGPT
Experimental. Tested end to end on Cloudflare's real runtime with Oura's sample data, and its Oura login against a fake of Oura — but not yet against a real deployment, a real Oura account, or claude.ai and ChatGPT completing the connection. If you try it, an issue saying how it went helps.
claude.ai reaches a connector from Anthropic's cloud and ChatGPT from OpenAI's,
not from your computer — so a server on your machine is invisible to both.
ts/worker is the same server as a Cloudflare Worker
that you deploy on your own account, for your own Oura account only. Nobody
runs a shared instance, so your tokens and your data pass through no one else.
It adds three things the local server does not need: its own consent page, which shows which app is asking and where the result will go; a check, after Oura's login, that the account is the one you configured — anyone else is turned away, and with no owner configured nobody gets in; and a single place where Oura's single-use refresh token is renewed, one request at a time.
Deployment, step by step, and exactly what has and has not been verified: ts/worker/README.md.
The tools
Six, not nineteen. A server with one tool per collection forces the model to pick among 19 similar names before knowing what any of them contain. Here the collection is a parameter and the catalog is consulted when needed.
All six declare themselves read-only, and that isn't a promise: there is no
POST, PUT or DELETE anywhere in the package, and a test reads the source to
keep it that way.
oura_today is the only one that exists for convenience rather than for
correctness: "how did I sleep?" needs today's two records plus enough history
to know whether they are unusual, which was four round trips and four chances
to stop early. It computes nothing — no average, no delta, no "your HRV is
up 12%". The days come back raw and the comparison happens where the method
can be cited. Across nine years of real data, three out of four changes
between consecutive measurements fall inside the metric's own normal swing, so
a percentage without that context manufactures a signal rather than reporting
one. Its one parameter is days, from 1 to 30, defaulting to 7.
Examples
Each one was run against Oura's sample data (OURA_SANDBOX=1) on 8 October
2026. Responses are abridged; every sandbox response also carries synthetic,
saying the numbers aren't yours.
1. "Is it working?" → oura_check
2. "How did I sleep, and how ready am I today?" → oura_today
Last night's daily_sleep and today's daily_readiness, with the 7 days
before them, raw. It says so in the response: "computed": "raw records only: this call computed no average, no delta and no trend."
3. "What can you see in my Oura data?" → oura_collections
All 19 collections, each with what it carries and its shape:
"daily_sleep": {"shape": "date_range", "carries": "sleep score and its contributors"}, …
4. "Show me my sleep scores for the last three nights" →
oura_query(collection="daily_sleep", start=…, end=…)
pages counts what was followed to the end. The two extra days on each side
are how the range stays inclusive in every collection, and the response says
they were trimmed rather than leaving them unexplained.
5. "Did my sleep get better these last two weeks?" →
oura_compare(metric="daily_sleep.score", a_start=…, a_end=…, b_start=…, b_end=…)
6. "Do my steps affect my sleep the next night?" →
oura_relate(x="daily_activity.steps", y="daily_sleep.score", start=…, end=…, lag=1)
Oura's sample data repeats a short pattern, which leaves fewer than five effective pairs in 118 days. Real data usually needs about three months.
oura_compare: the one calculation, with its method
"Did my HRV go up since I stopped drinking?" is the question people actually bring, and handing over two averages answers it wrongly: daily metrics swing on their own, and a good night tends to follow a good night, so a textbook comparison calls ordinary noise a change about a third of the time (measured: 34–38% at the autocorrelation these metrics typically have).
oura_compare takes a metric — collection.field, such as
daily_readiness.score, sleep.average_hrv or daily_activity.steps — and two
periods, a_start/a_end and b_start/b_end. It answers with the two means,
the difference, and the band this metric moves in on its own over periods that
long, measured from your own preceding 120 days and corrected for that
day-to-day dependence. Then one of three verdicts:
outside_noise— the difference is larger than the band. The level differs; not why, and not that it will last.within_noise— it isn't. This is not "no change": with those days, a real change smaller than the band would be missed more often than seen, and the response says so.cannot_tell— fewer than 7 days with a value in a period, or fewer than 60 days of history to measure the band from, or a metric that never varied — Oura's sample data is like that. No band is guessed.
The method was chosen by simulation, not before it: with the band estimated
from your history and a t critical value, noise is called a change at most
about one time in twenty at every autocorrelation tried, and the test suite
holds it to that. Today is left out, because it is still accumulating. sleep
uses each day's longest main sleep, and the response states that rule. Asking
many comparisons and keeping the one that crosses finds a crossing by chance —
the response says that too.
Asked whether something is trending, the server tells the model to compare
the first half of the window with the second. A dedicated slope test was
simulated against that and caught only a few points more, and only over 60–90
days (tools/trend_study.md), so there is no trend tool.
oura_relate: correlation, with the ways it lies taken out
"Do hard training days lower my readiness the next morning?" Correlating two columns answers it wrongly in two familiar ways: two metrics that both rise on weekends correlate without touching each other, and so do two that both drift over months. Measured on unrelated simulated metrics, a plain correlation called them related 41–93% of the time with a shared weekly rhythm, and 58% with a shared trend.
oura_relate takes two metrics, x and y, a range start/end, and a
lag in days (0–7). It removes each weekday's usual level from each metric,
compares only day-to-day changes between consecutive days, corrects the
number of pairs for autocorrelation, and returns the correlation with its 95%
interval and the same three verdicts. Every null simulated — weekly rhythms,
random walks, shared trends, 30% of days missing — stays at about 5% (measured
up to 5.2%).
- Lag is yours to choose, once. Oura files a night's sleep and the next
morning's readiness under the day you woke up, so activity on a day meets the
sleep that followed it at
lag=1.first_pairshows which day met which, so a wrong alignment is visible. Trying several lags is several tests, and because the method works on changes, a real relation at one lag also shows up, reversed, next to it — the response says both. - It needs about three months. Under 20 effective pairs it answers
cannot_tell, and with gaps in the days it needs longer. - It measures co-movement, not cause and not direction. Something else can move both, and the response says so every time.
oura_query parameters
And what the response tells you when something didn't come out clean:
truncated with continue_from naming the last day reached, pagination_cycle if Oura
repeats a token, ignored_fields, discarded_out_of_range,
uneven_columns, empty when a query comes back empty, and
large_response when what's returned is heavy enough to matter.
Four more say something happened that you'd otherwise never learn:
synthetic— this is Oura's sample data, not yours. It rides on every response in sample mode, which is how the extension ships, so a model can't report made-up numbers as your sleep.rate_limited— Oura refused with a 429 and a retry got through. The data is complete; the warning is about the next query. Oura sends no rate-limit headers on successful responses, so being refused is the only signal there is that you're near the ceiling.fields_split—fieldsarrived as"day,score"instead of["day","score"]and was split. No Oura field name contains a comma, so splitting is unambiguous — but reinterpreting your input silently would be the same sin this whole package is about.cached— the answer came from this session's memory instead of from Oura. Only ever for a range that closed before today, because a day that has ended cannot gain records; today is never held, since the ring syncs whenever it likes. An empty answer is never held either — nothing tells "no data" apart from "the ring hadn't synced yet", and freezing the second would turn a temporary gap into a permanent one. It lives in memory and dies with the process: no health data is ever written to disk.
That last one comes from measuring: 30 days of daily_activity is 252,000
characters, and 87% of it is a single field, met, a per-minute MET series.
Asking for three columns with fields brings those same 30 days down to 5,000
characters — 99% less. The server doesn't trim on its own — that would be
under-delivering — but it does say what's heavy and how to ask for less.
(Parameter names are stable, documented here, and the tool descriptions the model reads carry the same information. They were Spanish through 0.2.0; the rename to English landed in 0.3.0 and is recorded in the CHANGELOG as a breaking change.)
What this server does NOT do
It doesn't analyze beyond oura_compare and oura_relate. No trends, no
anomaly detection, no advice — which is exactly where other servers place their
value.
The reason: an average computed in here reaches the model as a number without its method. Across nine years of real data, three out of four changes between two consecutive measurements fall within the metric's own normal oscillation. A server that hands over "your HRV is up 12%" without saying how much that metric swings on its own isn't informing you: it's manufacturing a signal.
oura_compare and oura_relate exist because they answer that objection
instead of ignoring it: the band comes with the number. Trends don't have a
method here yet that survives the same simulations — a slope over
autocorrelated days is the easiest signal of all to manufacture — so they
aren't here.
Everything else, you get raw. The analysis belongs where the method can be cited — for instance with cotejo, which draws exactly that distinction for blood biomarkers.
The 19 collections
Daily summaries — daily_sleep, daily_readiness, daily_activity,
daily_stress, daily_spo2, daily_resilience, daily_cardiovascular_age,
vO2_max
The detail the scores hide — sleep (stages, HRV, temperature, latency),
sleep_time, workout, session, rest_mode_period, tag, enhanced_tag
High resolution — heartrate, ring_battery_level
No range — personal_info, ring_configuration
Date-range collections use YYYY-MM-DD. heartrate and ring_battery_level
use ISO 8601 with time.
Other Oura MCP servers
There are several as of August 2026, and it's worth being precise about the
differences. benngermin/oura-mcp
paginates properly, with a resumable cursor.
daveremy/oura-mcp shipped the
end_date fix the same week we did.
davidmosiah/oura-mcp has the most
complete MCP surface. Pagination no longer distinguishes anyone.
What does, as far as we could verify: workout's UTC skew isn't documented in
any of them, nor is rejecting latest where Oura ignores it, nor warning about
fields that were never applied. And none of them treats not analyzing as a
stated position.
Privacy Policy
This section exists because the Claude connectors directory requires one. It is short because there is little to describe: the server runs on your machine and talks to a single service, the Oura API.
What is collected. Nothing, by us. The health data you request goes from the Oura API to your MCP client and passes through no server of ours, because there isn't one.
What is stored, and where. Only your credentials, and only on your machine:
No health data is written to disk, and that is the constraint the cache was designed around rather than a claim made after the fact. Answers for a day that has already closed are held in memory only, for the life of the process, and --forget clears them. Nothing about your sleep survives the server exiting.
If you deploy the remote Worker, the same holds with one difference: it runs on your Cloudflare account instead of your machine, so that is where your Oura tokens live — in a Durable Object — and the apps' tokens for it are kept in KV hashed, with what they carry encrypted. Health data is still never stored: it is fetched per request and held only in the Worker's memory. No one but you operates it. Details: ts/worker/README.md.
Who it is shared with. No one. The only outbound connection is to
api.ouraring.com, with your token, to fetch what you asked for. Oura's use of
your data is governed by their privacy
policy, not by this one.
How long it is retained. Credentials, until you delete them:
oura-mcp --forget, or by removing the file. Health data isn't retained at all
— it lives in the response and that's it.
Diagnostics expose nothing. oura_check reports the token's length, never
the token; the profile's field names, never their values. The token is wrapped
in a type that won't print even in a stack trace.
Contact. Repository issues.
A note on language
The repository is in English: the code, its comments, the tests, and the
internal documents (AGENTS.md, ROADMAP.md, CHANGELOG.md).
It was written in Spanish through 0.2.0. The tool parameters were renamed in 0.3.0 — a breaking change, recorded as one in the CHANGELOG — and the prose followed. Anything still in Spanish is a storage key that cannot be renamed without orphaning credentials someone already saved, and there is a test saying so by name.
License
MIT.
mcp-name: io.github.proscar87/oura-mcp
來源:README.md,提交 ab51641
工具
0版本歷史
3- v0.4.0最新Sep 27, 2026
- v0.3.6Sep 23, 2026
- v0.3.5Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分