oura-ring-mcp
Enables importing Apple Health data (nutrition, steps, weight, etc.) into the local SQLite database via the Apple Health Import server.
Supports voice logging through Siri on iOS, using an iOS Shortcut to capture natural-language annotations for health context.
Integrates with the Shortcuts app to automate health data import and voice logging on iOS devices.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@oura-ring-mcpShow my last 7 days of sleep and readiness."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
oura-ring-mcp
Natural-language access to your Oura data through Claude. Local SQLite mirror, natural-language annotations, and MCP tools for actually asking questions about your health data.

Oura already tracks sleep, readiness, activity, heart rate, stress, and tags.
But the interesting questions are usually more personal:
"Does alcohol actually affect my readiness?"
"Do late coffees hurt my deep sleep?"
"Why has my energy been low lately?"
"How long do I take to recover after travel or hard workouts?"
"What changed on the nights where I slept really well?"
oura-ring-mcp lets Claude analyze your Oura data locally through MCP, with your own annotations and context stored in SQLite.
You can log things naturally:
"I had 2 beers Thursday from 7pm to midnight. Log it."
"I was sick from Monday to Wednesday."
"Late coffee today at 4pm."
And then actually ask questions about the patterns behind your health data.
Everything is local-first. After sync, most queries run against your local SQLite mirror instead of repeatedly hitting the Oura API.
Sensitive data warning: this project works with personal health data. Tokens and synced data are stored locally at
~/.config/oura-ring-mcp/with0600permissions and are never sent anywhere by this software except toapi.ouraring.comfor Oura API requests. Your MCP client may see whatever data you ask it to analyze.
Why I Built This
I wanted something more useful than another dashboard.
The raw metrics from Oura are already good. The missing piece is context: coffee, alcohol, illness, travel, late meals, stressful weeks, bad sleep hygiene, or whatever else was actually happening in life.
This project gives an LLM memory for the things Oura does not capture. The result feels much closer to talking to a health journal than scrolling through charts.
Related MCP server: Whoop MCP Server
What It Does
Syncs your Oura data into a local SQLite database.
Exposes your data through MCP tools for Claude Code and other MCP clients.
Lets you store natural-language annotations locally.
Makes it easy to analyze trends, recovery, sleep, stress, workouts, and habits over time.
Keeps everything local-first and your MCP client may see whatever data you ask it to analyze..
Currently supports:
sleep
readiness
activity
heart rate
stress
resilience
SpO2
VO2 max
cardiovascular age
sleep periods
workouts
sessions
rest mode periods
enhanced tags
local annotations
Example Prompts
Sleep and recovery
"Show me my last 14 days of sleep, readiness, and activity."
"Which night this month had the worst sleep, and what changed?"
"How long did it take my resting heart rate to recover after my last alcohol day?"
"Walk me through last night's sleep periods and heart-rate pattern."
Trends and comparisons
"Compare this week's sleep to the previous week."
"Show my readiness rolling average over the last 60 days."
"Compare weekdays vs weekends for sleep score and bedtime."
"What is my VO2 max trajectory?"
Logging context
"I had 2 beers Thursday from 7pm to midnight. Log it."
"I was sick from Monday to Wednesday. Log a cold annotation."
"I had a late coffee today at 4pm. Log it."
"List all my alcohol annotations from the last 3 months."
The fun part
"Across my alcohol annotations, what usually happens to next-day readiness?"
"Is there a relationship between caffeine days and deep sleep?"
"Do hard workout days change my sleep or recovery?"
"My energy has been low lately. What patterns should I look at?"
Quick Start
You need Node.js 20+ and an Oura account.
1. Register an Oura OAuth App
Go to https://cloud.ouraring.com/oauth/applications and create a new app.
Redirect URI:
http://127.0.0.1:8765/callbackPrivacy Policy URL:
https://github.com/FelixWag/oura-ring-mcp/blob/main/PRIVACY.mdTerms of Service URL:
https://github.com/FelixWag/oura-ring-mcp/blob/main/TERMS.md
Copy the Client ID and Client Secret.
2. Clone, Install, Build
git clone https://github.com/FelixWag/oura-ring-mcp.git
cd oura-ring-mcp
npm install
npm run build3. Configure, Authorize, Sync
npm run initThat one command:
writes your local
.env,opens the Oura OAuth login,
stores tokens locally,
syncs your recent Oura history into SQLite.
Want more history?
npm run sync -- --since 240Connect Claude Code
claude mcp add oura node "$(pwd)/dist/index.js"Restart Claude Code, run /mcp, and check that oura is listed.
Then try:
Show me my last 7 days of Oura summaries with annotations.Voice Logging via Siri (v0.6)
Talk to Siri, describe your day, and have a headless Claude agent extract structured annotations into your local SQLite database.
👤 "Hey Siri, log my day."
👤 "Two coffees this morning, cycled 11k, felt tired in the afternoon."
📱 Banner: "Logged 3: tag_generic_coffee, tag_generic_workout, tag_generic_tired"How it works:
iOS Shortcut dictates text and POSTs it (with
captured_at+timezone) to a tiny Express server running on a Mac mini.The server spawns a headless Claude Agent (using your Claude Code subscription credentials from
~/.claude/) with a tool allowlist that permits onlyoura_add_annotationand read-onlyoura_get_*tools.The agent extracts one tool call per distinct event and writes them into the same local SQLite as your manual annotations, linked back to a
voice_logsrow for provenance.
Run it:
echo "VOICE_LOG_TOKEN=$(openssl rand -hex 32)" >> .env
npm run build
npm run voice-serverThe server binds to 0.0.0.0:8770. Bearer token + Tailscale is the
security boundary — do not expose this port to the public internet.
Full setup (iOS Shortcut steps, Tailscale, troubleshooting):
docs/siri-shortcut.md.
Apple Health Import (v0.7)
Bring HealthKit data — nutrition (calories, protein, carbs), steps, weight, anything iOS apps write to Apple Health — into the same local SQLite. Useful because Oura's API doesn't expose meals or glucose; Apple Health does, and many apps (Cronometer, SnapCalorie, MyFitnessPal, Apple Watch) already write to it.
How it works:
A second Express server runs on
:8771next to the voice server.An iOS Shortcut (Personal Automation, scheduled daily) reads recent HealthKit samples and POSTs them to
/v1/health/import.Samples land in a generic
health_samplestable — same shape for every type, discriminated by asample_typecolumn.
Run it:
echo "HEALTH_IMPORT_TOKEN=$(openssl rand -hex 32)" >> .env
npm run build
npm run health-serverVoice and health are separate processes on separate ports with separate tokens — restart or rotate either independently. Bearer token
Tailscale is the security boundary.
Full setup (iOS Shortcut steps, sample types, troubleshooting):
docs/apple-health.md.
Why Local-First Matters
This project stores your synced data and annotations locally in SQLite instead of forwarding everything through another cloud service.
After sync, most reads happen locally:
faster queries,
less API usage,
offline-friendly access,
easier experimentation,
and more privacy.
The Oura API is read-only for user data. Local annotations intentionally stay local.
Development
npm run dev
npm test
npm run typecheck
npm run buildThe stack is intentionally simple:
TypeScript
Node.js
SQLite
MCP SDK
zod
Vitest
Security
Tokens and SQLite files use
0600permissions..envand local databases are ignored by git.SQL uses prepared statements.
No shell execution or arbitrary filesystem access.
The Oura API remains read-only.
This is not medical advice or a medical device.
Raw Access
Tool | Inputs | Notes |
|
| Merges daily sleep, readiness, and activity. Includes annotations by default. |
|
| Detailed sleep-period records. |
|
| Daily activity rows. |
|
| Local-first heart-rate query. Compact mode returns hourly summaries by source. |
| none | Basic profile metadata exposed by the Oura API. |
Derived Metrics
Tool | Inputs | Notes |
|
| Convenience wrapper for recent days. |
|
| Period averages, deltas, and direction. |
|
| Rolling averages and simple trend labels. |
Tags And Annotations
Tool | Inputs | Notes |
|
| Reads tags logged in the Oura app. |
| Oura-style tag fields | Stores a local annotation in SQLite. |
|
| Lists local annotations and synced Oura tags. Date filters use overlap. |
|
| Updates a local annotation. |
|
| Deletes a local annotation. |
Local annotations mirror Oura's EnhancedTagModel fields:
tag_type_code, custom_name, start_time, end_time, start_day,
end_day, and comment, plus source and oura_id for provenance.
Because the public Oura API is read-only for user data, annotation writes are local only. This is intentional: it gives the LLM memory for things Oura does not capture without pretending to write back to Oura.
Local Mirror
Tool | Inputs | Notes |
|
| Pulls Oura data into SQLite. Incremental by default with a 7-day re-fetch overlap. |
Read preference for local-first tools:
auto(default): use local data when available; fetch missing/recent data from Oura and upsert it locally.local: offline mode; only return what is already in SQLite.api: force a fresh Oura API read and upsert the result locally.
Configuration
Variable | Default | Purpose |
| - | Required. From your Oura OAuth app. |
| - | Required. From your Oura OAuth app. |
|
| Must match your Oura app exactly. |
|
| OAuth token file. |
|
| SQLite database for synced data/annotations. |
| unset | Set to |
| - | Required for |
|
| Port the voice server listens on. |
|
| Append-only activity log for voice ingestion. |
|
| MCP server entry the voice agent spawns. |
| unset (SDK default) | Optional model override for the voice agent. |
| - | Required for |
|
| Port the health server listens on. |
|
| Append-only activity log for health imports. |
.env is loaded from the project root, even when an MCP host starts the
binary from another working directory.
Keep the Mirror Fresh (auto-sync)
npm run sync is incremental and idempotent — every table upserts on
its primary key, so re-running never duplicates rows. To run it
automatically every hour on macOS, set up a launchd agent:
docs/launchd.md. One plist file, two commands,
no terminal needed afterwards.
Troubleshooting
No saved tokens at ...
Run npm run oauth-login.
invalid_client during OAuth
Check that OURA_CLIENT_ID and OURA_CLIENT_SECRET in .env match the Oura
application you created.
Address already in use :::8765
Change the port in OURA_REDIRECT_URI, update the same redirect URI in Oura's
application settings, then run npm run oauth-login again.
Scope-related 401 during sync
Run npm run oauth-login again so Oura grants the latest scope set.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FelixWag/oura-ring-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server