mcpField
O
oura-ring-mcp-server

oura-ring-mcp-server

Local
github.com/jordanburkeHealth1Updated 2w ago

About oura-ring-mcp-server

oura-ring-mcp-server connects Oura Ring API v2 data to MCP clients. It is for people examining sleep, readiness, activity, heart rate, and related records, using one collection-based tool rather than a separate tool for each endpoint.

Key features

  1. 01Fetch data across Oura collections
  2. 02Query daily and time-series records
  3. 03Retrieve individual records by ID
  4. 04Paginate and select response fields
  5. 05OAuth2 login with token refresh
  6. 06Use Oura sandbox demo data

Use cases

  1. 01Review sleep stages for a date
  2. 02Check a recent heart rate sample
  3. 03Compare readiness over a date range
  4. 04Count and inspect logged workouts

MCP support

Exposes a consolidated `oura_data` tool to MCP clients, with a collection parameter for accessing Oura usercollection endpoints. Supports stdio and HTTP streaming transports.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"jordanburke-oura-ring": {
"command": "npx",
"args": [
"-y",
"oura-ring-mcp-server"
],
"env": {
"OURA_CLIENT_ID": "<OURA_CLIENT_ID>",
"OURA_CLIENT_SECRET": "<OURA_CLIENT_SECRET>",
"OURA_SANDBOX": "<OURA_SANDBOX>",
"TRANSPORT_TYPE": "<TRANSPORT_TYPE>",
"PORT": "<PORT>",
"HOST": "<HOST>",
"OURA_TELEMETRY_FILE": "<OURA_TELEMETRY_FILE>",
"OURA_TELEMETRY_CONSOLE": "<OURA_TELEMETRY_CONSOLE>"
}
}
}
}
Run commandnpx -y oura-ring-mcp-server
Environment variables to set
OURA_CLIENT_IDOura OAuth2 client ID (register an app at https://cloud.ouraring.com/oauth/applications, then run `oura-ring-mcp-server login` once to authorize)
OURA_CLIENT_SECRETSecretOura OAuth2 client secret from the same application
OURA_SANDBOXUse Oura's /sandbox/ demo data instead of real data (true/false, default false)
TRANSPORT_TYPETransport: 'stdio' (default) or 'httpStream' for remote/Docker deployments
PORTHTTP port for httpStream transport (default 3000)
HOSTHTTP host for httpStream transport (default 0.0.0.0)
OURA_TELEMETRY_FILEWrite NDJSON telemetry events to this file path (safe under any transport)
OURA_TELEMETRY_CONSOLEConsole telemetry under httpStream transport: true (default) or false

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmoura-ring-mcp-server0.2.0

Tools

2

Saved tool list · updated 2w ago

This tool takes no parameters.

Details

From the project README

oura-ring-mcp-server

Node.js CI npm version License: MIT

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/callback and 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_health in particular gates vO2_max and daily_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 varRequiredDefaultDescription
OURA_CLIENT_IDfor OAuth—Oura OAuth2 client ID.
OURA_CLIENT_SECRETfor OAuth—Oura OAuth2 client secret.
OURA_API_KEYfor legacy PAT—Legacy personal access token (Bearer). Alternative to the OAuth pair.
OURA_REDIRECT_URInohttp://localhost:8080/callbackRedirect URI for login; must match the Oura app registration.
OURA_SCOPESnofull read set (see Requirements)Space-separated scopes requested during login.
OURA_TOKEN_STOREno~/.config/oura-ring-mcp/tokens.jsonPath to the OAuth token store.
OURA_SANDBOXnofalseUse Oura's /sandbox/ demo data instead of your real data.
TRANSPORT_TYPEnostdiostdio or httpStream.
PORTno3000Port for httpStream transport.
HOSTno0.0.0.0Host for httpStream transport.
OURA_TELEMETRY_FILEno—Write NDJSON telemetry events to this file path (safe under any transport).
OURA_TELEMETRY_CONSOLEnotrueConsole 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

ParameterApplies toNotes
collectionallWhich data collection to fetch (see below).
start_date / end_datedaily collectionsYYYY-MM-DD. Omitted → last 7 days.
start_datetime / end_datetimeheartrate, ring_battery_levelISO-8601. Omitted → last 24 hours.
latestheartrate, ring_battery_levelReturn only the most recent sample.
document_idcollections with a detail routeFetch a single record by id.
next_tokenlist collectionsPagination cursor from a previous response.
fieldslist collectionsComma-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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.