MCP HubMCP Hub
tomekkorbak

oura-mcp-server

by: tomekkorbak

MCP server for Oura API integration

9created 27/02/2025
Visit
API
integration

📌Overview

Purpose: To provide a Model Context Protocol (MCP) server that enables access to sleep, readiness, and resilience data from Oura API for language models.

Overview: The Oura MCP Server facilitates smooth interaction with the Oura API, allowing users to retrieve various health metrics efficiently. It specializes in handling queries related to specific dates as well as today’s data, making it suitable for applications that require real-time health insights.

Key Features:

  • Date Range Queries: Offers methods to fetch sleep, readiness, and resilience data for a specified date range, supporting ISO date formats for consistency and accuracy.

  • Today's Data Queries: Provides direct access to today’s health data, allowing users to quickly check current metrics without additional configuration.


Oura MCP Server

A Model Context Protocol (MCP) server that provides access to the Oura API, allowing language models to query sleep, readiness, and resilience data.

Available Tools

Date Range Queries

  • get_sleep_data(start_date: str, end_date: str): Get sleep data for a specific date range.
  • get_readiness_data(start_date: str, end_date: str): Get readiness data for a specific date range.
  • get_resilience_data(start_date: str, end_date: str): Get resilience data for a specific date range.

Dates should be provided in ISO format (YYYY-MM-DD).

Today's Data Queries

  • get_today_sleep_data(): Get sleep data for today.
  • get_today_readiness_data(): Get readiness data for today.
  • get_today_resilience_data(): Get resilience data for today.

Usage

You'll need an Oura API token to use this server. Obtain one by:

  1. Visiting the Oura Developer Portal.
  2. Creating a Personal Access Token.

Configuration for Claude Desktop

Update your claude_desktop_config.json file to include the following configuration:

{
    "mcpServers": {
        "oura": {
            "command": "uvx",
            "args": [
                "oura-mcp-server"
            ],
            "env": {
                "OURA_API_TOKEN": "YOUR_OURA_API_TOKEN"
            }
        }
    }
}

Example Queries

Once connected, you can ask questions like:

  • "What's my sleep score for today?"
  • "Show me my readiness data for the past week."
  • "How was my sleep from January 1st to January 7th?"
  • "What's my resilience score today?"

Error Handling

The server provides human-readable error messages for common issues like:

  • Invalid date formats
  • API authentication errors
  • Network connectivity problems

License

This project is licensed under the MIT License. See the LICENSE file for details.