oura-ring-mcp-server
MCP server for the Oura Ring API v2, enabling natural language queries about sleep, readiness, activity, heart rate, and more.
README
oura-ring-mcp-server
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/callbackand 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_healthin particular gatesvO2_maxanddaily_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:
# with OURA_CLIENT_ID and OURA_CLIENT_SECRET set in the environment
npx -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):
{
"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 var | Required | Default | Description |
|---|---|---|---|
OURA_CLIENT_ID |
for OAuth | — | Oura OAuth2 client ID. |
OURA_CLIENT_SECRET |
for OAuth | — | Oura OAuth2 client secret. |
OURA_API_KEY |
for legacy PAT | — | Legacy personal access token (Bearer). Alternative to the OAuth pair. |
OURA_REDIRECT_URI |
no | http://localhost:8080/callback |
Redirect URI for login; must match the Oura app registration. |
OURA_SCOPES |
no | full read set (see Requirements) | Space-separated scopes requested during login. |
OURA_TOKEN_STORE |
no | ~/.config/oura-ring-mcp/tokens.json |
Path to the OAuth token store. |
OURA_SANDBOX |
no | false |
Use Oura's /sandbox/ demo data instead of your real data. |
TRANSPORT_TYPE |
no | stdio |
stdio or httpStream. |
PORT |
no | 3000 |
Port for httpStream transport. |
HOST |
no | 0.0.0.0 |
Host for httpStream transport. |
OURA_TELEMETRY_FILE |
no | — | Write NDJSON telemetry events to this file path (safe under any transport). |
OURA_TELEMETRY_CONSOLE |
no | true |
Console telemetry, httpStream only (never enabled under stdio). |
HTTP transport
For a long-running / networked deployment:
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
| Parameter | Applies to | Notes |
|---|---|---|
collection |
all | Which data collection to fetch (see below). |
start_date / end_date |
daily collections | YYYY-MM-DD. Omitted → last 7 days. |
start_datetime / end_datetime |
heartrate, ring_battery_level |
ISO-8601. Omitted → last 24 hours. |
latest |
heartrate, ring_battery_level |
Return only the most recent sample. |
document_id |
collections with a detail route | Fetch a single record by id. |
next_token |
list collections | Pagination cursor from a previous response. |
fields |
list collections | Comma-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
pnpm install
pnpm validate # format + lint + typecheck + test + build
pnpm dev # watch build
pnpm inspect # run against the MCP Inspector
Try it without a ring by setting OURA_SANDBOX=true to hit Oura's demo dataset.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。