Skip to content

nwthomas/oura-ring-mcp-server

Oura Ring MCP Server

This repository contains a Model Context Protocol (MCP) implementation wrapping calls to the Oura Ring API. It can be used by any LLM that implements the MCP client protocol in order to interface with it. It's currently setup to run locally.

Table of Contents

  1. Setup
  2. Oura Ring API Overview
  3. Built With
  4. Resources

Setup

First, you'll need to ensure that you have uv and the right Python versions.

Run these commands (assuming you don't already have them installed):

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version

# First, install pyenv
brew update
brew install pyenv
curl https://pyenv.run | bash

# Then, add these to your shell
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

# Restart your shell using one of these commands
source ~/.zshrc
source ~/.bashrc

# Install Python 3.12.4 in Pyenv and set it as global
pyenv install 3.12.14
pyenv global 3.12.14

# Finally, verify via these commands
python --version
pyenv version

Next, you'll need to setup the environment for this repository and install dependencies. You can do that with this command (assuming you already completed the above Python version and uv install process) as uv automatically manages the virtual environment:

# Synchronize dependencies inside an automatic virtual environment
make sync

Finally, you can run the project with the following command:

make run

This MCP server is currently setup to be run/accessed by a model locally (on your local computer with something like Claude Desktop). I will eventually wire up a Docker build process, but you can follow the Anthropic local MCP server setup options until then to run it locally. It will integrate with any LLM that has MCP client wrappers setup.

In order to use this MCP server, you will need to register with the Oura Ring developer portal and get your own keys to plug into a .env file (copied over from the .env.example). This repo is currently using the Personal Access Token (PAT), but Oura Ring has plans to deprecate this at the end of 2025.

If you're using Claude Desktop, you can easily set up the connection to this repo (after adding the appropriate environment variables to your .env file) by following this guide. For brevity, here's a snippet you can add to your claude_desktop_config.json file that will work for this repository:

{
  "mcpServers": {
    "oura-ring": {
      "command": "/Users/<your username here>/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/<your username here>/<path to repository here>/oura-ring-mcp-server",
        "run",
        "main.py"
      ]
    }
  }
}

This MCP server will work with other agents, but you will need to figure out the connections. Any setup following the MCP client protocol should be able to utilize it.

Oura Ring API Overview

Different data has different sync policies for different types of data they collect:

  • Sleep data only syncs when users open the app
  • Daily activity and stress sync in the background without using the app

This can explain any descrepencies you see when your LLM tries to fetch most recent data. You might not have the most recent sleep data available until you (as a human) open up your Oura Ring app next.\

More information can be found in the Oura Ring API Documentation, particularly the section on core concepts).

Built With

Resources

About

Oura Ring API model context protocol implementation

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •