Oura Ring MCP Server
A Model Context Protocol (MCP) server for accessing your Oura Ring health data including sleep, activity, readiness, heart rate, and workout information.
Built with Smithery SDK
Features
🔧 Tools
- get-personal-info: Retrieve your personal information (age, weight, height, biological sex)
- get-daily-sleep: Get daily sleep data with total sleep time, sleep stages, and efficiency
- get-daily-activity: Access daily activity metrics including steps, calories, and distance
- get-daily-readiness: Check readiness score, temperature deviation, and recovery indicators
- get-heart-rate: View heart rate measurements and HRV data
- get-workouts: Retrieve workout sessions with duration, intensity, and calories
- get-sleep-sessions: Get detailed sleep session data with stages and metrics
- get-daily-stress: Access daily stress measurements and recovery indicators
📚 Resources
- Oura API Documentation: Quick reference guide for the Oura API V2
💬 Prompts
- analyze-sleep: Get an AI-powered analysis of your recent sleep quality and patterns
- activity-summary: Receive a comprehensive summary of your recent activity
- readiness-check: Check your current readiness and recovery status with recommendations
Prerequisites
- Oura Ring Account: Create an account using the Oura iOS or Android app
- Personal Access Token: Generate one at https://cloud.ouraring.com/personal-access-tokens
Getting Started
-
Install dependencies:
npm install -
Start the development server:
npm run dev -
When prompted in the Smithery playground, enter your Oura Personal Access Token
Usage Examples
Get Sleep Data
Use the get-daily-sleep tool to fetch your sleep data:
Start date: 2024-01-01
End date: 2024-01-07
Analyze Sleep Quality
Use the analyze-sleep prompt:
Days: 7
This will fetch your last 7 days of sleep data and provide AI-powered insights.
Check Activity
Use the get-daily-activity tool to see your daily steps, calories, and activity score.
Check Readiness
Use the readiness-check prompt to get personalized recommendations based on your recovery status.
Configuration
The server requires one configuration parameter:
- accessToken (required): Your Oura Personal Access Token
When running locally, pass the token as a URL parameter:
http://127.0.0.1:8081/mcp?accessToken=YOUR_TOKEN_HERE
API Endpoints Used
This MCP server uses the Oura API V2 endpoints:
/v2/usercollection/personal_info- Personal information/v2/usercollection/daily_sleep- Daily sleep summaries/v2/usercollection/daily_activity- Daily activity summaries/v2/usercollection/daily_readiness- Daily readiness scores/v2/usercollection/heartrate- Heart rate measurements/v2/usercollection/workout- Workout sessions/v2/usercollection/sleep- Detailed sleep sessions/v2/usercollection/daily_stress- Daily stress data
Date Formats
- Dates: Use
YYYY-MM-DDformat (e.g.,2024-01-15) - Datetimes: Use ISO 8601 format (e.g.,
2024-01-15T10:30:00Z)
Development
Edit src/index.ts to add new tools, resources, or prompts. The server will automatically reload in development mode.
Project Structure
oura-ring-mcp-server/
├── src/
│ └── index.ts # MCP server implementation
├── package.json # Project dependencies
├── smithery.yaml # Runtime configuration
└── README.md # This file
Build
To build for production:
npm run build
This creates a bundled server in the .smithery/ directory.
Deploy
Ready to deploy? Push your code to GitHub and deploy to Smithery:
-
Create a new repository at github.com/new
-
Initialize git and push to GitHub:
git init git add . git commit -m "Initial commit: Oura Ring MCP Server" git branch -M main git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git git push -u origin main -
Deploy your server at smithery.ai/new
Troubleshooting
Authentication Errors
- Verify your Personal Access Token is correct
- Check that you haven't revoked the token at cloud.ouraring.com
- Ensure the token is passed correctly in the configuration
No Data Returned
- Make sure you're wearing your Oura Ring regularly
- Data syncs when you open the Oura mobile app
- Some data types may not be available depending on your ring model
Rate Limiting
The Oura API has rate limits. If you encounter rate limit errors, wait a few minutes before making more requests.
Learn More
License
ISC
