oura-mcp-server
Enables Claude Desktop and Claude Code to access your personal Oura Ring health data—including sleep, readiness, activity, heart rate, and workouts—through local MCP tools.
README
oura-mcp-server
A personal MCP (Model Context Protocol) server that exposes your own Oura Ring data — sleep, readiness, activity, heart rate, workouts, tags — as tools Claude Desktop or Claude Code can call directly.
Important scope note: this only works with Claude Desktop or Claude Code, which can launch local MCP servers as subprocesses. It does not work with claude.ai in a browser or the mobile app — those can only use hosted (remote) connectors, and there is no first-party hosted Oura connector from Anthropic as of this writing.
Also important: Oura deprecated Personal Access Tokens in December 2025. The old "generate a token in your account settings and paste it into a script" shortcut you may see in older blog posts no longer works. This server uses the full OAuth2 flow, which is now mandatory even for pulling just your own data.
Using this if you didn't write it
This repo is a template, not a shared service — there's no account or data tied to it. If you're setting this up for yourself:
- Register your own OAuth application in step 1 below. Don't reuse someone else's Client ID/Secret — each person needs their own app registration, since Oura ties API access to the app that requests it.
- Everything stays local to your machine. Your
.env(Client ID/Secret) and~/.oura-mcp/tokens.json(access/refresh tokens) are created fresh when you run through the setup steps, are gitignored, and are never read from or written to this repo. Cloning this code gives you the program, not anyone's credentials or health data. - You authorize your own Oura account in step 3 — the OAuth login screen is Oura's, not this project's, so you're logging into (and granting access to) your own account only.
- Per Oura's API agreement, personal use to access your own data is fine, but the data can't be cached/stored beyond what's needed to serve a request, shared with third parties, or used to train/fine-tune an AI model. This server already follows that: it fetches data live on each tool call and never writes API responses to disk (only OAuth tokens are persisted, which is required for auth).
What this gives you
10 MCP tools:
| Tool | What it returns |
|---|---|
oura_get_daily_sleep |
Daily sleep score + contributors (REM, deep, efficiency, restfulness) |
oura_get_daily_readiness |
Daily readiness score + contributors (HRV balance, resting HR, recovery index) |
oura_get_daily_activity |
Daily activity score, steps, active calories |
oura_get_daily_spo2 |
Nightly average blood oxygen saturation |
oura_get_sleep_periods |
Raw per-sleep-period data: actual HRV average, lowest/avg HR during sleep, stage durations, bedtime start/end |
oura_get_heartrate |
Raw 5-minute-resolution heart rate time series between two datetimes |
oura_get_workouts |
Logged/auto-detected workouts: type, duration, calories, intensity |
oura_get_tags |
User-entered tags/notes (e.g. "alcohol", "illness") |
oura_get_personal_info |
Age, weight, height, biological sex on file with Oura |
oura_call_endpoint |
Escape hatch for any other usercollection/* endpoint (e.g. usercollection/rest_mode_period, usercollection/ring_configuration) not covered above |
The escape-hatch tool and every other tool are hard-restricted to read-only
usercollection/* paths — the server refuses to call webhook/*
(subscription management) or anything else, so there's no path for this to
accidentally do anything beyond reading your own data.
Tokens auto-refresh. You authorize once; after that, npm start just works
until you manually revoke access on Oura's side.
1. Register an Oura OAuth application (one-time, ~2 minutes)
- Go to https://cloud.ouraring.com/oauth/applications and sign in with your Oura account.
- Create a new application. Name/website can be anything descriptive ("Personal MCP server" is fine).
- Set the redirect URI to exactly:
(If you want a different port, changehttp://localhost:8734/callbackOURA_AUTH_PORTin.envand update the redirect URI here to match — they must be identical.) - Copy the Client ID and Client Secret it gives you.
2. Install and configure
git clone https://github.com/BarnNorth/oura-mcp-server.git
cd oura-mcp-server
npm install
cp .env.example .env
Edit .env and paste in your Client ID and Client Secret:
OURA_CLIENT_ID=your_client_id_here
OURA_CLIENT_SECRET=your_client_secret_here
3. Run the one-time authorization
npm run authorize
This prints a URL — open it in your browser, log into Oura, and approve the
requested scopes. The script catches the redirect automatically, exchanges
the code for tokens, and saves them to ~/.oura-mcp/tokens.json (permissions
locked to your user only, chmod 600). You only need to do this once; after
that the server refreshes tokens on its own.
If you ever see an error about a revoked or invalid refresh token, just
re-run npm run authorize.
4. Point Claude Desktop at the server
Open (or create) Claude Desktop's config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Add an entry under mcpServers (merge with whatever's already there — don't
replace the whole file if you have other servers configured):
{
"mcpServers": {
"oura": {
"command": "node",
"args": [
"--env-file=/absolute/path/to/oura-mcp-server/.env",
"/absolute/path/to/oura-mcp-server/src/server.js"
]
}
}
}
Use absolute paths on your machine — relative paths won't resolve
correctly since Claude Desktop launches it as a subprocess from its own
working directory. The --env-file flag is required here: unlike npm run start, Claude Desktop invokes node directly, so nothing else loads .env
into the process.
Fully quit and reopen Claude Desktop (not just close the window — Cmd+Q on macOS, or quit from the system tray on Windows). Start a new conversation; you should see a tools/hammer icon indicating the server connected, and you can ask things like "pull my Oura readiness for the last 7 days."
For Claude Code, the equivalent is a project-level .mcp.json:
{
"mcpServers": {
"oura": {
"type": "stdio",
"command": "node",
"args": [
"--env-file=/absolute/path/to/oura-mcp-server/.env",
"/absolute/path/to/oura-mcp-server/src/server.js"
]
}
}
}
Security notes (read this once)
- Your Client Secret and tokens never leave your machine — everything runs
as a local subprocess talking directly to
api.ouraring.com. There's no third party in the middle. .envand~/.oura-mcp/tokens.jsonare both in.gitignore. If you ever put this project in a git repo (recommended, since it's your own code), double check those never get committed.- The server only requests read scopes and only calls
usercollection/*read endpoints — it cannot modify your Oura data, delete anything, or manage webhook subscriptions on your account. - Rate limit is 5,000 requests / 5 minutes per Oura's v2 API — you will not come close to this with normal conversational use.
Troubleshooting
- "No stored Oura tokens found" — run
npm run authorizebeforenpm start. - 401 after refresh — the refresh token was revoked (e.g. you removed
the app's access in your Oura account settings). Re-run
npm run authorize. - 403 Forbidden — either the granted scope doesn't cover that endpoint, or your Oura membership has lapsed (Oura requires an active membership for API access on Gen3+ rings).
- Claude Desktop doesn't show the tools — check the exact JSON syntax
(a stray comma breaks the whole config file silently), confirm the path in
argsis absolute, and check Claude's MCP logs (macOS:~/Library/Logs/Claude/).
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。