Supports environment configuration through .env files for storing Oura access tokens and other configuration options.
Provides npm commands for installation, building, testing, and running the MCP server.
Provides access to Oura Ring health and fitness data through the Oura API v2, including sleep data, activity data, readiness scores, heart rate measurements, daily summaries, workout sessions, and user tags.
Implements TypeScript types and Zod schemas for the Oura API data structures.
Uses Zod schemas for data validation and typing of the JSON responses from the Oura API.
Oura Ring MCP Server
A Model Context Protocol (MCP) server that provides access to Oura Ring health and fitness data through the Oura API v2.
Features
This MCP server exposes all major Oura Ring data types as tools:
Health & Fitness Data
- Personal Info - User profile information (age, weight, height, biological sex, timezone)
- Sleep Data - Sleep scores, sleep stages, sleep contributors
- Activity Data - Steps, calories, activity levels, MET minutes
- Readiness Data - Daily readiness scores and contributing factors
- Heart Rate - Heart rate measurements with timestamps and sources
Daily Summaries
- Daily Activity - Daily activity summaries with scores and metrics
- Daily Sleep - Daily sleep summaries with scores and contributors
- Daily Readiness - Daily readiness summaries with temperature data
- Daily Stress - Daily stress levels and recovery metrics
Sessions & Workouts
- Workouts - Exercise sessions with activity type, duration, calories, distance
- Sessions - Breathing exercises, meditation, naps, relaxation sessions
- Tags - User-created tags and enhanced tags with metadata
Configuration & Time Data
- Sleep Time - Bedtime and wake time data
- Rest Mode Periods - Rest mode periods when enabled
- Ring Configuration - Ring settings and preferences
Webhooks (Advanced)
- Webhook Management - Create, list, and delete webhook subscriptions for real-time data updates
Installation
- Clone this repository:
- Install dependencies:
- Build the project:
Configuration
1. Get Your Oura Access Token
For personal use, create a Personal Access Token:
- Go to Oura Cloud Personal Access Tokens
- Click "Create New Personal Access Token"
- Copy the generated token
2. Environment Setup
Create a .env
file in the project root:
3. For Webhook Functionality (Optional)
If you want to use webhooks for real-time data updates:
- Register an API Application at Oura Cloud OAuth Applications
- Add your
OURA_CLIENT_ID
andOURA_CLIENT_SECRET
to the.env
file
Usage
Testing Locally
- Test server setup (no API calls needed):
- Test API connectivity (requires your Oura access token):
This will test actual API calls to verify your credentials and show sample data.
Running the MCP Server
Start the MCP server for use with MCP clients:
Or run in development mode:
Note: The server runs on stdio transport and waits for MCP protocol messages. You need an MCP client (like Claude Desktop, Continue, or other MCP-compatible tools) to interact with it.
Available Tools
Personal Information
get_personal_info
- Get user personal information
Sleep & Readiness
get_sleep
- Get sleep data with optional date rangeget_daily_sleep
- Get daily sleep summariesget_readiness
- Get readiness dataget_daily_readiness
- Get daily readiness summaries
Activity & Exercise
get_activity
- Get activity dataget_daily_activity
- Get daily activity summariesget_workouts
- Get workout sessionsget_heart_rate
- Get heart rate measurements
Sessions & Wellness
get_sessions
- Get breathing, meditation, and nap sessionsget_daily_stress
- Get daily stress and recovery dataget_tags
- Get user-created tagsget_enhanced_tags
- Get enhanced tags with metadata
Time & Configuration
get_sleep_time
- Get bedtime and wake time dataget_rest_mode_periods
- Get rest mode periodsget_ring_configuration
- Get ring settings
Webhooks (Advanced)
get_webhook_subscriptions
- List active webhook subscriptionscreate_webhook_subscription
- Create new webhook subscriptiondelete_webhook_subscription
- Delete webhook subscription
Date Range Parameters
Most tools accept optional date range parameters:
start_date
- Start date in YYYY-MM-DD formatend_date
- End date in YYYY-MM-DD formatnext_token
- Pagination token for large datasets
Example:
API Reference
This MCP server is built on the Oura API v2. Key features:
Authentication
- Uses Bearer token authentication with Personal Access Tokens
- Webhook operations require OAuth2 application credentials
Rate Limits
- 5000 requests per 5-minute period
- Webhooks are recommended to minimize API calls
Data Types
All data is returned as structured JSON with proper typing and validation using Zod schemas.
Error Handling
- Comprehensive error handling for API errors, network issues, and invalid responses
- Detailed error messages with status codes when available
Webhooks
Webhooks provide real-time notifications when your Oura data changes. This is the recommended approach for applications that need up-to-date data.
Setting Up Webhooks
- Ensure you have
OURA_CLIENT_ID
andOURA_CLIENT_SECRET
configured - Use the
create_webhook_subscription
tool with:callback_url
- Your endpoint URL (must be HTTPS)verification_token
- Secret token for verificationevent_type
- Type of events ('create', 'update', 'delete')data_type
- Type of data ('sleep', 'activity', etc.)
Webhook Data Types
tag
- User tagsenhanced_tag
- Enhanced tags with metadataworkout
- Exercise sessionssession
- Breathing, meditation, nap sessionssleep
- Sleep datadaily_sleep
- Daily sleep summariesdaily_readiness
- Daily readiness summariesdaily_activity
- Daily activity summariesdaily_stress
- Daily stress data
Development
Project Structure
Building
Testing
Linting
Troubleshooting
Common Issues
"Invalid or expired authentication token"
- Check that your
OURA_ACCESS_TOKEN
is correct - Verify the token hasn't expired
- Ensure you're using a Personal Access Token from the correct Oura account
"Access forbidden" (403 error)
- Your Oura subscription may have expired
- Some data types require an active Oura subscription
Rate limit exceeded (429 error)
- You've exceeded 5000 requests in 5 minutes
- Consider using webhooks to reduce API calls
- Implement proper rate limiting in your application
Webhook verification failed
- Ensure your webhook endpoint properly handles the verification challenge
- Check that your
verification_token
matches what you provided - Verify your endpoint responds with the challenge in the correct format
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please read the contributing guidelines and submit pull requests for any improvements.
Links
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that provides access to Oura Ring health and fitness data through the Oura API v2, enabling retrieval of sleep, activity, readiness, and other health metrics.
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server for tracking personal health and well-being, offering tools for workout logging, nutrition management, and daily journaling with AI-assisted analysis integration.Last updated -7Python
- AsecurityAlicenseAqualityEnables querying sleep, readiness, and resilience data from the Oura API via the Model Context Protocol (MCP), allowing natural language interaction and seamless integration with tools like Claude.Last updated -620PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server that provides language models with access to personal Whoop fitness data, allowing queries for cycles, recovery, strain, and workout information from the Whoop API.Last updated -8Python
- AsecurityAlicenseAqualityA Model Context Protocol server that provides language models with access to Strava API data, allowing them to query and analyze athlete activities from Strava.Last updated -413PythonMIT License