Oura MCP Server
Integrates Oura Ring health data with Claude Desktop, providing resources, tools, and advanced analytics for sleep, activity, readiness, and health trends.
README
Oura MCP Server
A Model Context Protocol (MCP) server for Oura Ring health data integration with Claude Desktop.
📋 Prerequisites
Before setting up the Oura MCP Server, ensure you have the following:
System Requirements
- Python: 3.9+ (required for type annotations and modern features)
- Operating System: macOS, Linux, or Windows
- Memory: Minimum 512MB RAM (1GB+ recommended for advanced analytics)
- Network: Internet connection for Oura API access
Hardware Requirements
- Oura Ring
- Oura Account
Software Dependencies
- Claude Desktop: Latest version with MCP support
- Python Package Manager:
piporuv(uv recommended for faster installs)
Required Python Packages
The server depends on several Python packages (automatically installed via requirements.txt):
httpx- Async HTTP client for Oura APIstructlog- Structured loggingpydantic- Data validation and serializationnumpy- Numerical computations for analyticsscipy- Statistical analysis and correlation calculationsfastmcp- MCP server framework
Development Tools (Optional)
- Code Editor: VS Code, PyCharm, or similar with Python support
- Git: For version control and updates
- Virtual Environment:
venvorcondafor isolated Python environment
Oura API Access
- Personal Access Token: Required from Oura Cloud
- Data Permissions: The token provides access to all your personal health data
- Rate Limits: 5000 requests per day (automatically managed by the server)
Claude Desktop Configuration
- Config File Access: Ability to edit
claude_desktop_config.json - Environment Variables: Capability to set environment variables securely
🚀 Quick Start
1. Get Your Oura Personal Access Token
- Visit https://cloud.ouraring.com/personal-access-tokens
- Log in to your Oura account
- Click "Create New Personal Access Token"
- Copy the generated token (save it securely!)
2. Clone and Setup Project
# Clone the repository (if not already done)
git clone <repository-url>
cd oura-ai
# Verify Python version (should be 3.9+)
python3 --version
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies (choose one method)
# Method 1: Using uv (faster, recommended)
uv pip install -r requirements.txt
# Method 2: Using standard pip
pip install -r requirements.txt
# Verify installation
python3 -c "import httpx, structlog, pydantic; print('Dependencies installed successfully!')"
3. Configure Claude Desktop
Edit your claude_desktop_config.json:
{
"mcpServers": {
"oura-ai": {
"command": "python3",
"args": ["/path/to/oura-ai/mcp_server.py"],
"env": {
"OURA_PERSONAL_ACCESS_TOKEN": "your_token_here"
}
}
}
}
Important: Replace /path/to/oura-ai/ with your actual project path.
4. Test & Verify Setup
# Test server syntax and imports
python3 mcp_server.py --help
# Test with your Oura token (replace with your actual token)
OURA_PERSONAL_ACCESS_TOKEN=your_actual_token_here python3 mcp_server.py
# You should see output like:
# [INFO] Initializing Oura MCP Server with modular architecture
# [INFO] Starting Oura MCP Server
# [INFO] Features: 18 Resources, 20 Tools, 6 Prompts
# [INFO] Advanced Analytics: Correlations, Anomaly Detection, Trend Prediction
# [INFO] MCP Protocol: 2025-06-18 compatible
# Stop the test server (Ctrl+C) and restart Claude Desktop
✨ Features
📊 18 MCP Resources (Default: Last 7 Days)
- Core Health:
oura://personal_info,oura://daily_sleep,oura://daily_activity,oura://daily_readiness - Detailed Data:
oura://sleep,oura://sleep_time,oura://heart_rate - Fitness:
oura://workout,oura://session - Advanced Metrics:
oura://daily_spo2,oura://daily_stress,oura://daily_resilience - Performance:
oura://vO2_max,oura://daily_cardiovascular_age - Configuration:
oura://ring_configuration,oura://rest_mode_period - Tags:
oura://tags,oura://enhanced_tags
🛠️ 20 MCP Tools
🔄 Standard Data Tools:
- Core Data:
get_daily_sleep,get_daily_activity,get_daily_readiness,get_personal_info - Detailed Data:
get_sleep,get_heart_rate,get_workout,get_session - Advanced Metrics:
get_daily_spo2,get_vO2_max,get_tags,get_enhanced_tags - Trend Analysis:
analyze_health_trends,analyze_lifestyle_correlations
🧬 Advanced Analytics:
analyze_metric_correlations: Statistical correlation analysis between any health metricsdetect_health_anomalies: AI-powered anomaly detection with customizable sensitivitypredict_health_trends: Machine learning-based health forecasting and predictionsanalyze_circadian_rhythm: Comprehensive sleep timing and consistency analysiscalculate_stress_resilience: Advanced stress resilience and recovery capacity scoringoptimize_workout_timing: Performance-based workout timing recommendationsgenerate_health_visualization_data: Structured data for creating health charts and graphs
💬 6 Smart Prompts (Template-Based)
health_summary: Comprehensive health overview promptssleep_analysis: Detailed sleep optimization promptsactivity_coaching: Personalized fitness guidance promptsrecovery_insights: Recovery optimization promptshealth_goals_tracker: Goal tracking and progress promptslifestyle_analysis: Advanced lifestyle pattern analysis prompts
🔥 Advanced Analytics Prompts
Try these powerful prompts with Claude Desktop to unlock advanced health insights:
1. Sleep Quality Deep Dive
Analyze my sleep patterns over the past 2 weeks using analyze_circadian_rhythm and detect_health_anomalies. Find correlations between sleep timing consistency and sleep quality scores. What specific changes should I make to optimize my sleep?
2. Performance Optimization Analysis
Use analyze_metric_correlations to find relationships between my readiness scores, HRV, and workout performance over the past month. Then use optimize_workout_timing to recommend the best times for high-intensity training.
3. Health Trend Forecasting
Apply predict_health_trends to my sleep, activity, and readiness scores from the last 30 days. What patterns do you see emerging? Predict my health trajectory for the next 2 weeks with actionable recommendations.
4. Stress Resilience Assessment
Calculate my stress resilience using calculate_stress_resilience and analyze correlations between stress indicators (HRV, sleep quality, recovery time) and my daily activities. How can I build better resilience?
5. Comprehensive Health Anomaly Detection
Run detect_health_anomalies on all my key metrics (sleep score, activity score, readiness, HRV) over the past 3 weeks. Identify unusual patterns and correlate them with my lifestyle tags. What triggered these anomalies?
6. Circadian Rhythm Optimization
Use analyze_circadian_rhythm to assess my sleep timing consistency and correlate it with my daily energy levels and performance metrics. Design a personalized circadian optimization plan.
7. Activity-Recovery Balance Analysis
Analyze correlations between my workout intensity, recovery time, and readiness scores. Use the insights to optimize my training schedule and recovery protocols for peak performance.
8. Lifestyle Impact Assessment
Correlate my enhanced_tags data with sleep quality, stress levels, and recovery metrics. Which lifestyle factors (alcohol, late meals, travel, stress) have the biggest impact on my health metrics?
9. Personalized Health Visualization
Generate comprehensive visualization data for my key health metrics over the past month. Create charts showing trends, correlations, and patterns. What story does my health data tell?
10. Holistic Health Optimization Plan
Combine insights from all advanced analytics tools to create a personalized health optimization plan. Analyze my sleep, activity, recovery, and lifestyle patterns to recommend specific, actionable changes for the next 30 days.
Development
# Test the server locally
OURA_PERSONAL_ACCESS_TOKEN=your_token python3 mcp_server.py
# Install dependencies with uv (faster)
uv pip install -r requirements.txt
# Alternative: traditional pip
pip install -r requirements.txt
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。